Propagate address spaces to builtins.
[gcc.git] / gcc / ChangeLog
1 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
2 Julian Brown <julian@codesourcery.com>
3
4 * builtins.c (get_builtin_sync_mem): Handle address spaces.
5
6 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
7
8 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
9 if the call takes a static chain.
10
11 2018-09-21 Martin Liska <mliska@suse.cz>
12
13 * auto-profile.c (autofdo_source_profile::read): Do not
14 set sum_all.
15 (read_profile): Do not add working sets.
16 (read_autofdo_file): Remove sum_all.
17 (afdo_callsite_hot_enough_for_early_inline): Remove const
18 qualifier.
19 * coverage.c (struct counts_entry): Remove gcov_summary.
20 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
21 do not support GCOV_TAG_PROGRAM_SUMMARY.
22 (get_coverage_counts): Remove summary and expected
23 arguments.
24 * coverage.h (get_coverage_counts): Likewise.
25 * doc/gcov-dump.texi: Remove -w option.
26 * gcov-dump.c (dump_working_sets): Remove.
27 (main): Do not support '-w' option.
28 (print_usage): Likewise.
29 (tag_summary): Likewise.
30 * gcov-io.c (gcov_write_summary): Do not dump
31 histogram.
32 (gcov_read_summary): Likewise.
33 (gcov_histo_index): Remove.
34 (gcov_histogram_merge): Likewise.
35 (compute_working_sets): Likewise.
36 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
37 it not obsolete.
38 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
39 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
40 (GCOV_HISTOGRAM_SIZE): Remove.
41 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
42 (struct gcov_summary): Simplify rapidly just
43 to runs and sum_max fields.
44 (gcov_histo_index): Remove.
45 (NUM_GCOV_WORKING_SETS): Likewise.
46 (compute_working_sets): Likewise.
47 * gcov-tool.c (print_overlap_usage_message): Remove
48 trailing empty line.
49 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
50 (output_lines): Remove program related line.
51 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
52 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
53 histogram.
54 (input_profile_summary): Do not read it.
55 (merge_profile_summaries): And do not merge it.
56 (input_symtab): Do not call removed function.
57 * modulo-sched.c (sms_schedule): Do not print sum_max.
58 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
59 removed when histogram method was invented.
60 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
61 mode.
62 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
63 GCOV coding style.
64 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
65 and dump selected value.
66 * profile.c (add_working_set): Remove.
67 (get_working_sets): Likewise.
68 (find_working_set): Likewise.
69 (get_exec_counts): Do not work with working sets.
70 (read_profile_edge_counts): Do not inform as sum_max is removed.
71 (compute_branch_probabilities): Likewise.
72 (compute_value_histograms): Remove argument for call of
73 get_coverage_counts.
74 * profile.h: Do not make gcov_summary const.
75
76 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
77
78 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
79
80 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
81
82 PR tree-optimization/86990
83 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
84 Check that the entire merged store group is made of constants only for
85 overlapping stores.
86
87 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
88
89 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
90 (VTABLE_VERIFICATION_SPEC): Likewise.
91 (SANITIZER_EARLY_SPEC): Likewise.
92 (SANITIZER_SPEC): Likewise.
93 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
94 * doc/invoke.texi (Link Options): Document -r.
95
96 2018-09-20 Richard Biener <rguenther@suse.de>
97
98 PR middle-end/87054
99 * gimplify.c (gimplify_expr): Retain alignment of
100 addressable lvalue in dereference.
101
102 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
103
104 PR bootstrap/87013
105 * configure.ac: Check for .loc is_stmt support.
106 * configure, config.in: Rebuilt.
107 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
108 if not supported.
109
110 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
111
112 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
113 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
114 -misel=no.
115
116 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
117
118 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
119 VECTOR_OTHER.
120 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
121 case VECTOR_OTHER.
122
123 2018-09-20 Marek Polacek <polacek@redhat.com>
124
125 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
126
127 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
128
129 PR tree-optimization/87288
130 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
131 into account when determining PEELING_FOR_NITERS.
132
133 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
134
135 PR tree-optimization/86877
136 * tree-vect-loop.c (vect_analyze_loop_2): Call
137 vect_verify_datarefs_alignment.
138
139 2018-09-19 Marek Polacek <polacek@redhat.com>
140
141 * doc/invoke.texi: Document -Wclass-conversion.
142
143 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
144
145 * config/pa/pa.c (pa_adjust_priority): Delete.
146 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
147
148 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
149 (atomic_storehi): Likewise.
150 (atomic_storesi): Likewise.
151 (atomic_loaddi): Restore compare and swap exchange loop code.
152
153 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
154
155 PR rtl-optimization/86902
156 * combine.c (try_combine): When changing the CC mode used, don't change
157 an unrelated mode in other_insn to that new CC mode.
158
159 2018-09-19 David Malcolm <dmalcolm@redhat.com>
160
161 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
162 with %T in place of calls to dump_generic_expr.
163 (prune_runtime_alias_test_list): Likewise.
164 (create_runtime_alias_checks): Likewise.
165 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
166 (vect_analyze_data_ref_dependence): Likewise.
167 (vect_slp_analyze_data_ref_dependence): Likewise.
168 (vect_record_base_alignment): Likewise. Use %G in place of call
169 to dump_gimple_stmt.
170 (vect_compute_data_ref_alignment): Likewise.
171 (verify_data_ref_alignment): Likewise.
172 (vect_find_same_alignment_drs): Likewise.
173 (vect_analyze_group_access_1): Likewise.
174 (vect_analyze_data_ref_accesses): Likewise.
175 (dependence_distance_ge_vf): Likewise.
176 (dump_lower_bound): Likewise.
177 (vect_prune_runtime_alias_test_list): Likewise.
178 (vect_find_stmt_data_reference): Likewise.
179 (vect_analyze_data_refs): Likewise.
180 (vect_create_addr_base_for_vector_ref): Likewise.
181 (vect_create_data_ref_ptr): Likewise.
182 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
183 (vect_can_advance_ivs_p): Likewise.
184 (vect_update_ivs_after_vectorizer): Likewise.
185 (vect_gen_prolog_loop_niters): Likewise.
186 (vect_prepare_for_masked_peels): Likewise.
187 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
188 (vect_determine_vectorization_factor): Likewise.
189 (vect_is_simple_iv_evolution): Likewise.
190 (vect_analyze_scalar_cycles_1): Likewise.
191 (vect_analyze_loop_operations): Likewise.
192 (report_vect_op): Likewise.
193 (vect_is_slp_reduction): Likewise.
194 (check_reduction_path): Likewise.
195 (vect_is_simple_reduction): Likewise.
196 (vect_create_epilog_for_reduction): Likewise.
197 (vect_finalize_reduction:): Likewise.
198 (vectorizable_induction): Likewise.
199 (vect_transform_loop_stmt): Likewise.
200 (vect_transform_loop): Likewise.
201 (optimize_mask_stores): Likewise.
202 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
203 (vect_split_statement): Likewise.
204 (vect_recog_over_widening_pattern): Likewise.
205 (vect_recog_average_pattern): Likewise.
206 (vect_determine_min_output_precision_1): Likewise.
207 (vect_determine_precisions_from_range): Likewise.
208 (vect_determine_precisions_from_users): Likewise.
209 (vect_mark_pattern_stmts): Likewise.
210 (vect_pattern_recog_1): Likewise.
211 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
212 (vect_record_max_nunits): Likewise.
213 (vect_build_slp_tree_1): Likewise.
214 (vect_build_slp_tree_2): Likewise.
215 (vect_print_slp_tree): Likewise.
216 (vect_analyze_slp_instance): Likewise.
217 (vect_detect_hybrid_slp_stmts): Likewise.
218 (vect_detect_hybrid_slp_1): Likewise.
219 (vect_slp_analyze_operations): Likewise.
220 (vect_slp_analyze_bb_1): Likewise.
221 (vect_transform_slp_perm_load): Likewise.
222 (vect_schedule_slp_instance): Likewise.
223 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
224 (vect_mark_stmts_to_be_vectorized): Likewise.
225 (vect_init_vector_1): Likewise.
226 (vect_get_vec_def_for_operand): Likewise.
227 (vect_finish_stmt_generation_1): Likewise.
228 (vect_check_load_store_mask): Likewise.
229 (vectorizable_call): Likewise.
230 (vectorizable_conversion): Likewise.
231 (vectorizable_operation): Likewise.
232 (vectorizable_load): Likewise.
233 (vect_analyze_stmt): Likewise.
234 (vect_is_simple_use): Likewise.
235 (vect_get_vector_types_for_stmt): Likewise.
236 (vect_get_mask_type_for_stmt): Likewise.
237 * tree-vectorizer.c (increase_alignment): Likewise.
238
239 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
240
241 * doc/rtl.texi: Adjust vec_select description.
242 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
243 non-constant selectors.
244
245 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
246
247 * config/aarch64/aarch64-protos.h
248 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
249 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
250 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
251 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
252 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
253 (AARCH64_FL_PROFILE): Move index so flags are ordered.
254 (AARCH64_ISA_RCPC8_4): New flag.
255 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
256 to aarch64_offset_9bit_signed_unscaled_p.
257 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
258 and use stlur.
259 * config/aarch64/constraints.md (Ust): New constraint.
260 * config/aarch64/predicates.md.
261 (aarch64_9bit_offset_memory_operand): New predicate.
262 (aarch64_rcpc_memory_operand): New predicate.
263
264 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
265
266 PR rtl-optimization/87361
267 * rtlanal.c (nonzero_bits1): Revert accidental change.
268
269 2018-09-19 Richard Biener <rguenther@suse.de>
270
271 PR tree-optimization/87349
272 PR tree-optimization/87342
273 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
274
275 2018-09-18 Marek Polacek <polacek@redhat.com>
276
277 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
278 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
279
280 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
281
282 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
283
284 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
285
286 PR rtl-optimization/86882
287 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
288
289 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
290
291 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
292 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
293
294 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
295
296 PR other/87353
297 * doc/invoke.texi (Link Options): Fix formatting and grammar.
298
299 2018-09-18 Richard Biener <rguenther@suse.de>
300
301 PR middle-end/63155
302 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
303 (compute_samebase_partition_bases): Likewise.
304 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
305 (gimple_can_coalesce_p): Simplify.
306
307 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
308
309 Handle a library implementation of ffs calling __builtin_ffs.
310 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
311 (mmix_init_libfuncs): New function: make __builtin_ffs expand
312 to __ffsdi2.
313
314 2018-09-17 David Malcolm <dmalcolm@redhat.com>
315
316 * diagnostic-show-locus.c (class layout_range): Add field
317 "m_original_idx".
318 (layout_range::layout_range): Add "original_idx" param and use it
319 to initialize new field.
320 (make_range): Use 0 for original_idx.
321 (layout::layout): Pass in index to calls to
322 maybe_add_location_range.
323 (layout::maybe_add_location_range): Add param "original_idx" and
324 pass it on to layout_range.
325 (layout::print_any_labels): Pass on range->m_original_idx to
326 get_text call.
327 (gcc_rich_location::add_location_if_nearby): Use 0 for
328 original_idx.
329 * gcc-rich-location.h (text_range_label::get_text): Update for new
330 param.
331 (range_label_for_type_mismatch::get_text): Likewise.
332
333 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
334
335 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
336
337 2018-09-17 David Malcolm <dmalcolm@redhat.com>
338
339 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
340 format_string_diagnostic_t.
341 (fmtwarn_n): Likewise.
342 * substring-locations.c
343 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
344 (format_warning_n_va): Convert to...
345 (format_string_diagnostic_t::emit_warning_n_va): ...this.
346 (format_warning_va): Convert to...
347 (format_string_diagnostic_t::emit_warning_va): ...this.
348 (format_warning_at_substring): Convert to...
349 (format_string_diagnostic_t::emit_warning): ...this.
350 (format_warning_at_substring_n): Convert to...
351 (format_string_diagnostic_t::emit_warning_n): ...this.
352 * substring-locations.h (class format_string_diagnostic_t): New
353 class.
354 (format_warning_va): Convert to
355 format_string_diagnostic_t::emit_warning_va.
356 (format_warning_n_va): Convert to
357 format_string_diagnostic_t::emit_warning_n_va.
358 (format_warning_at_substring): Convert to
359 format_string_diagnostic_t::emit_warning.
360 (format_warning_at_substring_n): Convert to
361 format_string_diagnostic_t::emit_warning_n.
362
363 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
364 Bernd Schmidt <bernds_cb1@t-online.de>
365
366 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
367 SImode args.
368
369 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
370
371 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
372 operand 0 predicate to nonimmediate operand.
373 (rint<mode>2_frndint): Remove insn pattern.
374 (rint<mode>2): Change operand 1 predicate to general_operand.
375 Extend operand 1 to XFmode and generate rintxf2 insn.
376 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
377 Do not use X87MODEF mode macro.
378 (frndintxf2_<rounding>_i387): Rename from
379 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
380 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
381 to XFmode and generate significandxf3 insn.
382
383 2018-09-17 Richard Biener <rguenther@suse.de>
384
385 PR tree-optimization/87328
386 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
387 visiting unexecutable backedges when not iterating.
388 (do_rpo_vn): Mark all edges not executable even when not
389 iterating.
390
391 2018-09-17 Martin Jambor <mjambor@suse.cz>
392
393 PR c/63886
394 * doc/invoke.texi (Warning Options): Likewise.
395
396 2018-09-17 Richard Biener <rguenther@suse.de>
397
398 PR tree-optimization/87301
399 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
400 clean EH info from leftover copy assignments.
401
402 2018-09-17 Martin Liska <mliska@suse.cz>
403
404 PR gcov-profile/85871
405 * gcov.c (output_intermediate_file): Fix out of bounds
406 access.
407
408 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
409
410 * config/arc/arc.c: Object attributes for core4 not reflected
411 correctly.
412 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
413 core3).
414
415 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
416
417 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
418
419 2018-09-17 Martin Liska <mliska@suse.cz>
420
421 * doc/gcov.texi: Document new option --use-hotness-colors.
422 * gcov.c (struct source_info): Declare new field.
423 (source_info::source_info): Set default for maximum_count.
424 (print_usage): Add new -q option.
425 (process_args): Process it.
426 (accumulate_line_info): Save src->maximum_count.
427 (output_line_beginning): Make color line number if
428 flag_use_hotness_colors is set.
429 (output_line_details): Pass default argument value.
430 (output_lines): Pass src->maximum_count.
431
432 2018-09-17 Martin Liska <mliska@suse.cz>
433
434 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
435 Use processor_names table.
436 * config/i386/i386.c (ix86_default_align): Use
437 processor_cost_table for alignment values.
438 (ix86_option_override_internal): Use processor_names.
439 (ix86_function_specific_print): Likewise.
440 * config/i386/i386.h (struct processor_costs):
441 Add alignment values.
442 (struct ptt): Remove and replace with const char *.
443 * config/i386/x86-tune-costs.h (struct processor_costs):
444 Declare default alignments for all costs.
445
446 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
447
448 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
449 symbolics or VR_VARYING ranges for ABS_EXPR.
450 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
451 when range will wrap.
452
453 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
454
455 PR middle-end/86864
456 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
457 before and after a JUMP_TABLE_DATA.
458
459 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
460
461 PR middle-end/87188
462 * dojump.c (do_compare_and_jump): Canonicalize function pointers
463 when one operand is a function pointer. Use POINTER_TYPE_P and
464 FUNC_OR_METHOD_TYPE_P.
465 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
466 * fold-const.c (build_range_check): Likewise.
467 * match.pd (simple_comparison): Likewise.
468
469 2018-09-14 David Malcolm <dmalcolm@redhat.com>
470
471 PR c/82967
472 * spellcheck.c (get_edit_distance_cutoff): New function.
473 (selftest::test_edit_distance_unit_test_oneway): Rename to...
474 (selftest::test_get_edit_distance_one_way): ...this.
475 (selftest::test_get_edit_distance_unit): Rename to...
476 (selftest::test_get_edit_distance_both_ways): ...this.
477 (selftest::test_edit_distances): Move tests to this new function,
478 and test some more pairs of strings. Update for above renaming.
479 (selftest::get_old_cutoff): New function.
480 (selftest::test_get_edit_distance_cutoff): New function.
481 (selftest::assert_suggested_for): New function.
482 (ASSERT_SUGGESTED_FOR): New macro.
483 (selftest::assert_not_suggested_for): New function.
484 (ASSERT_NOT_SUGGESTED_FOR): New macro.
485 (selftest::test_suggestions): New function.
486 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
487 tests to selftest::test_edit_distances and call it. Add calls to
488 selftest::test_get_edit_distance_cutoff and
489 selftest::test_suggestions.
490 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
491 (best_match::consider): Replace hard-coded cutoff calculation with
492 a call to...
493 (best_match::get_cutoff): New declaration.
494 (best_match::get_best_meaningful_candidate): Likewise.
495
496 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
497
498 * builtins.c (fold_builtin_strlen): Remove TODO comment.
499
500 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
501
502 revert:
503 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
504
505 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
506 terminated string literal.
507
508 2018-09-14 Martin Sebor <msebor@redhat.com>
509
510 * builtins.c (unterminated_array): Handle ARRAY_REF.
511 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
512 * builtins.h (unterminated_array): Declare extern.
513 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
514 arrays.
515 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
516 calls.
517
518 2018-09-14 Martin Sebor <msebor@redhat.com>
519 Jeff Law <law@redhat.com>
520
521 * builtins.c (unterminated_array): New.
522 (expand_builtin_strcpy): Adjust.
523 (expand_builtin_strcpy_args): Detect unterminated arrays.
524 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
525 unterminated arrays.
526 * gimple-fold.h (get_maxval_strlen): Add argument.
527 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
528
529 * gimple-fold.c (get_range_strlen): Add argument.
530 (get_maxval_strlen): Adjust.
531 * gimple-fold.h (get_range_strlen): Add argument.
532
533 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
534
535 * config/i386/movdirintrin.h: Fix copyright year.
536
537 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
538
539 * reg-stack.c: Include regs.h.
540 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
541 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
542 FIRST_STACK_REG, not DFmode.
543 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
544 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
545 (change stack): Default register mode to the reg_raw_mode of
546 FIRST_STACK_REG, not DFmode.
547 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
548 (*swapxf): Rename from swapxf.
549
550 2018-09-14 Carl Love <cel@us.ibm.com>
551
552 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
553 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
554
555 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
556
557 PR target/87224
558 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
559 alternatives.
560
561 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
562
563 PR target/85628
564 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
565
566 2018-09-14 Jason Merrill <jason@redhat.com>
567
568 Fix --enable-gather-detailed-mem-stats.
569 * hash-table.c (hash_table_usage): Change from variable to function.
570 * hash-table.h: Adjust.
571 * Makefile.in: Add missing dependencies on hash-table.h.
572
573 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
574
575 PR tree-optimization/87259
576 PR lto/87283
577 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
578 execute_cse_reciprocals_1 has tried transforming.
579
580 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
581
582 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
583 VR_VARYING for PLUS/MINUS_EXPR.
584
585 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
586
587 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
588 formatting.
589
590 2018-09-14 Richard Biener <rguenther@suse.de>
591
592 PR middle-end/63155
593 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
594 bits for the merged partition.
595
596 2018-09-13 Martin Sebor <msebor@redhat.com>
597 Bernd Edlinger <bernd.edlinger@hotmail.de>
598
599 * builtins.h (c_srlen): Add argument.
600 * builtins.c (warn_string_no_nul): New function.
601 (c_strlen): Add argument and use it. Update recursive calls.
602 Pass DECL argument to string_constant to get info on non
603 terminated strings. Update *NONSTR as needed.
604 (fold_builtin_strlen): Add argument to calls to c_strlen.
605 Warn for unterminated arrays.
606 (warn_string_no_null): Add prototype.
607 * expr.c (string_constant): Update arguments. Update recursive
608 calls appropriately. Detect missing NUL terminator and outermost
609 declaration its missing in.
610 Improve checks for arrays with nonzero lower bound or elements
611 that are not a single byte. Simplify offset computation.
612 Simplify checks for non-NUL terminated strings.
613 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
614 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
615
616 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
617
618 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
619 correctly.
620 * fold-const.c (c_getstr): Fix function comment. Remove unused third
621 argument. Fix range checks.
622 * fold-const.h (c_getstr): Adjust protoype.
623 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
624 string is constant but contains no NUL byte.
625
626 * expr.c (string_constant): Adjust function comment.
627 Remove bogus check for zero termination.
628
629 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
630
631 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
632 (get_constant_size): Don't make STRING_CSTs larger than they are.
633 (check_string_literal): New check function for STRING_CSTs.
634 (output_constant): Use it.
635
636 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
637
638 PR target/86812
639 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
640
641 2018-09-13 Richard Biener <rguenther@suse.de>
642
643 PR tree-optimization/87263
644 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
645 (struct unwind_state): Add max_rpo field.
646 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
647 Compute max_rpo, the max RPO number a block can be backwards reached
648 from. Re-write non-iterating mode to a RPO ordered worklist approach,
649 separating it from the iterating mode.
650
651 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
652
653 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
654 (rfs_decision): New scheduling decision.
655
656 2018-09-13 Richard Biener <rguenther@suse.de>
657
658 PR bootstrap/87134
659 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
660 (vn_nary_op_insert_pieces_predicated): Do not write useless
661 valid_dominated_by_p entry outside of the allocated storage.
662
663 2018-09-13 Omar Sandoval <osandov@osandov.com>
664 Tom de Vries <tdevries@suse.de>
665
666 PR debug/86985
667 * dwarf2out.c (is_c): New function.
668 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
669
670 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
671
672 PR target/85628
673 * config/aarch64/aarch64.md (*aarch64_bfxil):
674 Define.
675 * config/aarch64/constraints.md (Ulc): Define.
676 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
677 Define.
678 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
679 New function.
680
681 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
682
683 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
684 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
685 aarch64_layout_frame call.
686 (aarch64_expand_epilogue): Likewise.
687 (aarch64_initial_elimination_offset): Likewise.
688 (aarch64_get_separate_components): Likewise.
689 (aarch64_use_return_insn_p): Likewise.
690 (aarch64_layout_frame): Remove unneeded check.
691
692 2018-09-13 Jakub Jelinek <jakub@redhat.com>
693
694 * configure.ac: Only append
695 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
696 gcc_config_arguments if it was never reconfigured or last reconfigure
697 was with different arguments.
698 * configure: Regenerated.
699
700 2018-09-13 Jakub Jelinek <jakub@redhat.com>
701 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
702
703 PR middle-end/87290
704 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
705 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
706
707 2018-09-13 Jakub Jelinek <jakub@redhat.com>
708
709 PR tree-optimization/87287
710 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
711 X % C == 0 to X % (unsigned) C == 0 optimization to ...
712 * match.pd (X % C == 0): ... here. New optimization.
713
714 2018-09-12 Jakub Jelinek <jakub@redhat.com>
715
716 PR middle-end/82853
717 * expr.h (maybe_optimize_mod_cmp): Declare.
718 * expr.c (mod_inv): New function.
719 (maybe_optimize_mod_cmp): New function.
720 (do_store_flag): Use it.
721 * cfgexpand.c (expand_gimple_cond): Likewise.
722
723 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
724 Julian Brown <julian@codesourcery.com>
725
726 PR middle-end/86336
727 * gimplify.c (gimplify_scan_omp_clauses): Set
728 target_firstprivatize_array_bases in OpenACC parallel and kernels
729 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
730 OpenACC data regions.
731
732 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
733
734 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
735 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
736
737 2018-09-12 Richard Biener <rguenther@suse.de>
738
739 PR tree-optimization/87280
740 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
741 edge but unreachable target.
742 (do_rpo_vn): For conservatively handling a PHI only mark
743 the backedge executable but not the block reachable.
744
745 2018-09-12 Richard Biener <rguenther@suse.de>
746
747 PR tree-optimization/87266
748 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
749 visited blocks.
750
751 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
752
753 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
754 constants.
755 ("trunc<BFP:mode><DFP_ALL:mode>2")
756 ("trunc<DFP_ALL:mode><BFP:mode>2")
757 ("extend<BFP:mode><DFP_ALL:mode>2")
758 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
759 according to the target operand type.
760
761 2018-09-12 Jakub Jelinek <jakub@redhat.com>
762 Andreas Krebbel <krebbel@linux.ibm.com>
763
764 PR tree-optimization/86844
765 * gimple-ssa-store-merging.c
766 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
767 there are any overlapping stores in between them, make sure they are
768 also coalesced or we give up completely.
769
770 2018-09-12 Jakub Jelinek <jakub@redhat.com>
771
772 PR middle-end/87248
773 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
774 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
775
776 2018-09-12 Tom de Vries <tdevries@suse.de>
777
778 * common.opt (gdescribe-dies): Add option.
779 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
780 attribute for artifical and nameless decls.
781 (dwarf2out_register_external_die): Add description attribute to
782 external reference die.
783 (add_desc_attribute): New functions.
784 (gen_subprogram_die): Add description attribute to
785 DW_TAG_call_site_parameter.
786 * tree-pretty-print.c (print_generic_expr_to_str): New function.
787 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
788 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
789 -gno-describe-dies.
790 (@item -gdescribe-dies): Add.
791
792 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
793
794 * tree-vrp.c (vrp_shift_undefined_p): Remove.
795 (extract_range_from_binary_expr_1: Call
796 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
797 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
798 depend on sign.
799
800 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
801
802 * gimple-ssa-warn-alloca.c
803 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
804 field for ALLOCA_BOUND_*_LARGE.
805
806 2018-09-11 Nathan Sidwell <nathan@acm.org>
807
808 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
809
810 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
811
812 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
813 for clobbers. Remove obsolete comment.
814
815 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
816
817 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
818 mpxchk, mpxld and mpxst types.
819 (define_attr length_immediate): Remove all processing of mpx types.
820 (define_attr prefix_0f): Ditto.
821 (define_attr memory): Ditto.
822
823 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
824
825 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
826 (log<mode>2): Change operand 1 predicate to general_operand.
827 Extend operand 1 to XFmode and generate logxf3 insn.
828 (log10<mode>2): Change operand 1 predicate to general_operand.
829 Extend operand 1 to XFmode and generate log10xf3 insn.
830 (log2<mode>2): Change operand 1 predicate to general_operand.
831 Extend operand 1 to XFmode and generate log2xf3 insn.
832 (fyl2xp1_extend<mode>xf3_i387): Remove.
833 (log1p<mode>2): Change operand 1 predicate to general_operand.
834 Extend operand 1 to XFmode and generate log1pxf3 insn.
835 (fxtract_extend<mode>xf3_i387): Remove.
836 (logb<mode>2): Change operand 1 predicate to general_operand.
837 Extend operand 1 to XFmode and generate logbxf3 insn.
838 (ilogb<mode>2): Change operand 1 predicate to general_operand.
839 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
840 (significand<mode>2): Change operand 1 predicate to general_operand.
841 Extend operand 1 to XFmode and generate significandxf3 insn.
842
843 2018-09-11 Nathan Sidwell <nathan@acm.org>
844
845 * gcc.c (perror_with_name, pfatal_with_name): Delete.
846 (load_specs): Use fatal_error.
847 (DELETE_IF_ORDINARY, process_command): Use error.
848 (execute, run_attempt): Use fatal_error.
849
850 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
851
852 * diagnostic-core.h (sorry_at): New prototype.
853 * diagnostic.c (sorry_at): New function.
854
855 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
856
857 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
858 by zero as VR_UNDEFINED.
859
860 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
861
862 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
863 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
864 (<sincos>mode2): New expander.
865 (sincos_extend<mode>xf3_i387): Remove insn pattern.
866 (sincos -> sin, cos splitters): Remove splitter patterns.
867 (sincos<mode>3): Change operand 2 predicate to general_operand.
868 Extend operand 2 to XFmode and generate sincosxf3 insn.
869 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
870 Change operand 3 predicate to const1_operand.
871 (fptan_extend<mode>xf4_i387): Remove insn pattern.
872 (tanxf2): Update operands in the call to fptanxf4_i387.
873 (tan<mode>2): Change operand 1 predicate to general_operand.
874 Extend operand 1 to XFmode and generate tanxf3 insn.
875 (atan2xf3): Rename from *fpatanxf3_i387.
876 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
877 (atan2xf3): Remove expander.
878 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
879 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
880 (atan<mode>2): Change operand 1 predicate to general_operand.
881 Extend operand 1 to XFmode and generate atanxf3 insn.
882
883 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
884
885 * config/i386/i386.md (x87/SSE constant load splitter): Use
886 memory_operand instead of nonimmediate_operand for input operand
887 predicate.
888
889 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
890
891 * config/i386/i386.md (float partial SSE register stall splitter): Move
892 splitter near its instruction pattern.
893 (float_extend partial SSE register stall splitter): Ditto.
894 (float_truncate partial SSE register stall splitter): Ditto.
895
896 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
897
898 PR target/86794
899 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
900 to speculation_safe_value_not_needed.
901
902 PR target/85666
903 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
904 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
905 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
906 leaf_function_p, instead use has_hard_reg_initial_val.
907
908 2018-09-09 Nathan Sidwell <nathan@acm.org>
909
910 * gcc.h (pfatal_with_name): Don't declare here.
911 * gcc.c (pfatal_with_name): Make static.
912
913 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
914
915 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
916 earlyclobber.
917
918 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
919
920 PR rtl-optimization/85458
921 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
922 priority hook to reduce the priority of EXPR.
923
924 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
925
926 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
927 DImode for x87 on 32bit targets. Conditionally disable x87 modes
928 with X87_ENABLE_FLOAT. Remove preparation code.
929 (*float<SWI48:mode><MODEF:mode>2): Rename from
930 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
931 math using "enabled" attribute.
932 (*floatdi<MODEF:mode>2_i387): Rename from
933 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
934 enable for 32bit targets only.
935 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
936 splitter.
937 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
938 as operand 1 predicate. Rewrite as define_insn_and_split.
939 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
940
941 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
942
943 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
944 to fallthru to FLOAT case.
945
946 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
947
948 PR target/86731
949 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
950 around folding of vec_sl to handle out of range shift values.
951
952 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
953
954 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
955 Update callers to gen_fix_trunc<mode>_i387_fisttp
956 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
957 nonimmediate_operand.
958 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
959 and corresponding splitters.
960 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
961 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
962 (fix_truncdi_i387_with_temp): Remove insn pattern
963 and corresponding splitters.
964 (fix_trunc<mode>_i387): Change operand 0 predicate to
965 nonimmediate_operand.
966 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
967 and corresponding splitters.
968 (*fistdi2_1): Remove.
969 (fistdi2): Ditto.
970 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
971 (lrintxfdi2): Remove expander. Reimplement as define_insn.
972 (*fist<mode>2_1): Remove.
973 (fist<mode>2): Ditto.
974 (fist<mode>2_with_temp): Remove insn pattern and corresponding
975 splitters.
976 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
977 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
978 (fistdi2_<rounding>): Change operand 0 predicate to
979 nonimmediate_operand.
980 (fistdi2_<rounding>_with_temp): Remove insn pattern
981 and corresponding splitters.
982 (fist<mode>2_<rounding>): Change operand 0 predicate to
983 nonimmediate_operand.
984 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
985 and corresponding splitters.
986
987 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
988
989 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
990
991 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
992 the init value.
993
994 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
995
996 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
997 early gimple folding of vec_splat().
998 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
999 * gimple-fold.h: Add an extern define for tree_vec_extract().
1000
1001 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1002
1003 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
1004 wrappers around TREE_TYPE comparisons.
1005
1006 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1007
1008 PR target/80080
1009 * config/s390/predicates.md: Add nonsym_memory_operand.
1010 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
1011 contains a SYMBOL_REF, load it into an intermediate pseudo.
1012 (s390_emit_compare_and_swap): Legitimize operand.
1013 * config/s390/s390.md: Use the new nonsym_memory_operand
1014 with UNSPECV_CAS patterns.
1015
1016 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1017
1018 PR target/80080
1019 * config/s390/s390-passes.def: New file.
1020 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
1021 declaration.
1022 (make_pass_s390_early_mach): Add declaration.
1023 * config/s390/s390.c (make_pass_s390_early_mach):
1024 (s390_option_override): Remove dynamic registration.
1025 * config/s390/t-s390: Add s390-passes.def.
1026
1027 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1028
1029 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1030 Remove UNSPEC_LTREL_BASE check.
1031 (annotate_constant_pool_refs): Likewise.
1032 (find_constant_pool_ref): Likewise.
1033 (find_ltrel_base): Removed.
1034 (replace_ltrel_base): Removed.
1035 (s390_mainpool_finish): Remove replace_ltrel_base call.
1036 (s390_chunkify_start): Remove pending LTREL_BASE logic.
1037 (s390_chunkify_finish): Remove replace_ltrel_base call.
1038 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
1039
1040 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
1041
1042 PR target/86779
1043 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1044 to speculation_safe_value_not_needed.
1045
1046 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
1047 Bernd Schmidt <bernds_cb1@t-online.de>
1048
1049 * config/nvptx/nvptx-opts.h: New file.
1050 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
1051 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
1052 (ASM_SPEC): Define.
1053 (TARGET_SM35): New macro.
1054 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
1055 correct predicate.
1056 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
1057 values.
1058 (misa=): New option.
1059 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
1060
1061 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
1062
1063 * config/i386/i386.md (truncdfsf2): Remove expander.
1064 (truncdfsf2_with_temp): Ditto.
1065 (truncxf<mode>2): Ditto.
1066 (*truncdfsf_fast_mixed): Remove insn pattern.
1067 (*truncdfsf_fast_i387): Ditto.
1068 (*truncdfsf_mixed): Ditto.
1069 (*truncdfsf_i387): Ditto.
1070 (*truncdfsf2_i387_1): Ditto.
1071 (*truncxfsf2_mixed): Ditto.
1072 (*truncxfdf2_mixed): Ditto.
1073 (*truncxf<mode>2_i387_noop): Ditto. Update callers
1074 to call gen_truncxf<mode>2 instead.
1075 (*truncxf<mode>2_i387): Remove.
1076 (reg->reg splitters): Remove splitter pattern.
1077 (reg->mem splitters): Ditto.
1078
1079 (truncdfsf2): New insn pattern.
1080 (truncxf<mode>2): Ditto.
1081
1082 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1083
1084 * tree-ssa-math-opts.c (is_mult_by): New function.
1085 (is_square_of): Use the above.
1086 (optimize_recip_sqrt): New function.
1087 (pass_cse_reciprocals::execute): Use the above.
1088
1089 2018-09-05 Richard Biener <rguenther@suse.de>
1090
1091 PR bootstrap/87134
1092 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
1093 to zero-init the emplaced vec.
1094
1095 2018-09-05 Martin Liska <mliska@suse.cz>
1096
1097 PR tree-optimization/87205
1098 * tree-switch-conversion.c (pass_lower_switch::execute):
1099 Group cases for switch statements.
1100
1101 2018-09-05 Richard Biener <rguenther@suse.de>
1102
1103 PR tree-optimization/87217
1104 * tree-ssa-sccvn.c (vuse_valueize): New.
1105 (vn_reference_lookup_pieces): Use it.
1106 (vn_reference_lookup): Likewise.
1107
1108 2018-09-05 Nathan Sidwell <nathan@acm.org>
1109
1110 PR c++/87137
1111 * stor-layout.c (place_field): Scan forwards to check last
1112 bitfield when ms_bitfield_placement is in effect.
1113
1114 2018-09-05 Richard Biener <rguenther@suse.de>
1115
1116 PR bootstrap/87225
1117 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
1118 return.
1119
1120 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
1121 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1122
1123 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
1124 * config.gcc (extra_objs): Build it.
1125 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
1126 Likewise.
1127 * config/aarch64/aarch64-passes.def
1128 (pass_tag_collision_avoidance): New pass.
1129 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
1130 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
1131 (aarch64_classify_address): Remove static qualifier.
1132 (aarch64_address_info, aarch64_address_type): Move to...
1133 * config/aarch64/aarch64-protos.h: ... here.
1134 (make_pass_tag_collision_avoidance): New function.
1135 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
1136 New tuning flag.
1137
1138 2018-09-05 Martin Liska <mliska@suse.cz>
1139
1140 * doc/gcov.texi: Update documentation of humar
1141 readable mode.
1142 * gcov.c (format_count): Print one decimal place, it provides
1143 more fine number of situations like '1G' vs. '1.4G'.
1144
1145 2018-09-05 Martin Liska <mliska@suse.cz>
1146
1147 PR target/87164
1148 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
1149 * optc-gen.awk: Allow 'Var' for Deprecated options in order
1150 to generate a MASK value.
1151
1152 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
1153
1154 PR debug/86593
1155 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
1156 if frame pointer isn't used.
1157 (compute_frame_pointer_to_fb_displacement): Likewise.
1158
1159 2018-09-04 Jakub Jelinek <jakub@redhat.com>
1160
1161 PR target/87198
1162 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
1163 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
1164 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
1165 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
1166 and OPTION_MASK_ISA_XSAVEC_UNSET.
1167
1168 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
1169
1170 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
1171 XOR operations in NAND case.
1172
1173 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1174
1175 * wide-int-range.cc (wide_int_range_convert): New.
1176 * wide-int-range.h (wide_int_range_convert): New.
1177 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
1178 code into wide_int_range_convert.
1179 (extract_range_into_wide_ints): Do not munge anti range constants
1180 into the entire domain. Just return the range back.
1181
1182 2018-09-04 Martin Liska <mliska@suse.cz>
1183
1184 * genmatch.c (output_line_directive): Add new argument
1185 fnargs.
1186 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
1187
1188 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1189
1190 * doc/invoke.texi (Option Summary): Add whitespace.
1191
1192 * doc/invoke.texi (Option Summary): Add -Waligned-new.
1193
1194 2018-09-04 Richard Biener <rguenther@suse.de>
1195
1196 PR tree-optimization/87211
1197 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
1198 backedge value we're supposed to treat as VARYING also number
1199 the PHI to VARYING in case it got a different value-number already.
1200
1201 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1202
1203 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
1204 (extract_range_from_binary_expr_1): Do not call
1205 vrp_can_optimize_bit_op.
1206 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
1207 static.
1208 (wide_int_range_get_mask_and_bounds): New.
1209 (wide_int_range_optimize_bit_op): New.
1210 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
1211 (wide_int_range_bit_and): Same.
1212 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
1213 (wide_int_range_optimize_bit_op): New.
1214 (wide_int_range_get_mask_and_bounds): New.
1215
1216 2018-09-04 Richard Biener <rguenther@suse.de>
1217
1218 PR tree-optimization/87176
1219 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
1220 variable. When value-numbering a virtual PHI node make sure
1221 to not value-number to the backedge value.
1222
1223 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1224
1225 * doc/extend.texi (Long Long, Hex Floats): Document support for
1226 long long and hex floats in more recent versions of ISO C++.
1227
1228 2018-09-03 Richard Biener <rguenther@suse.de>
1229
1230 PR tree-optimization/87177
1231 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
1232 cleanup.
1233
1234 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1235
1236 * bb-reorder.c (edge_order): Convert to C-qsort-style
1237 tri-state comparator.
1238 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
1239
1240 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1241
1242 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
1243 tri-state comparator.
1244 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
1245
1246 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1247
1248 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
1249 (mergesort): ... here as maximum count for using netsort.
1250 (gcc_qsort): Set nlim to 3 if stable sort is requested.
1251 (gcc_stablesort): New.
1252 * system.h (gcc_stablesort): Declare.
1253
1254 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1255
1256 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
1257 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
1258 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
1259
1260 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
1261
1262 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
1263 lxsdx and stxsdx alternatives.
1264 (*mov<mode>_hardfloat64): Ditto.
1265 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
1266
1267 2018-09-03 Richard Biener <rguenther@suse.de>
1268
1269 PR tree-optimization/87200
1270 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
1271 simplify result.
1272
1273 2018-09-03 Martin Liska <mliska@suse.cz>
1274
1275 PR tree-optimization/87201
1276 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1277 Fix parenthesis in an expression.
1278
1279 2018-09-03 Richard Biener <rguenther@suse.de>
1280
1281 PR tree-optimization/87197
1282 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
1283 visited. CSE the VN_INFO hashtable lookup.
1284
1285 PR tree-optimization/87169
1286 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
1287 iterating make sure there's no extra backedges from irreducible
1288 regions feeding the header. Mark the destination block
1289 executable.
1290
1291 2018-09-03 Martin Liska <mliska@suse.cz>
1292
1293 PR driver/83193
1294 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
1295 * common/common-targhooks.c (default_get_valid_option_values):
1296 New function.
1297 * common/common-targhooks.h (default_get_valid_option_values):
1298 Likewise.
1299 * common/config/i386/i386-common.c: Move processor_target_table
1300 from i386.c.
1301 (ix86_get_valid_option_values): New function.
1302 (TARGET_GET_VALID_OPTION_VALUES): New macro.
1303 * config/i386/i386.c (struct ptt): Move to i386-common.c.
1304 (PTA_*): Move all defined masks into i386-common.c.
1305 (ix86_function_specific_restore): Use new processor_cost_table.
1306 * config/i386/i386.h (struct ptt): Moved from i386.c.
1307 (struct pta): Likewise.
1308 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
1309 * doc/tm.texi.in: Likewise.
1310 * opt-suggestions.c (option_proposer::suggest_option):
1311 Pass prefix to build_option_suggestions.
1312 (option_proposer::get_completions): Likewise.
1313 (option_proposer::build_option_suggestions): Use the new target
1314 hook.
1315 * opts.c (struct option_help_tuple): New struct.
1316 (print_filtered_help): Use the new target hook.
1317
1318 2018-09-03 Martin Liska <mliska@suse.cz>
1319
1320 PR middle-end/59521
1321 * predict.c (set_even_probabilities): Add likely_edges
1322 argument and handle cases where we have precisely one
1323 likely edge.
1324 (combine_predictions_for_bb): Catch also likely_edges.
1325 (tree_predict_by_opcode): Handle gswitch statements.
1326 * tree-cfg.h (find_case_label_for_value): New declaration.
1327 (find_taken_edge_switch_expr): Likewise.
1328 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1329 Find pivot in decision tree based on probabily, not by number of
1330 nodes.
1331
1332 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
1333
1334 * doc/standards.texi (Standards): Update Objective-C reference.
1335
1336 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1337
1338 * doc/install.texi (Prerequisites): Update link for MPC.
1339
1340 2018-09-01 Michael Matz <matz@suse.de>
1341
1342 PR tree-optimization/87074
1343 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1344 PHIs for outer-loop uses.
1345
1346 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1347
1348 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1349 * doc/invoke.texi (C Dialect Options): Ditto.
1350
1351 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1352
1353 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1354
1355 2018-08-31 Richard Biener <rguenther@suse.de>
1356
1357 PR tree-optimization/87168
1358 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1359 (rpo_elim::eliminate_avail): When OP was not visited it must
1360 be available.
1361
1362 2018-08-31 David Malcolm <dmalcolm@redhat.com>
1363
1364 * tree-vrp.c (copy_value_range): Convert param "from" from
1365 "value_range *" to "const value_range *".
1366 (range_is_null): Likewise for param "vr".
1367 (range_int_cst_p): Likewise.
1368 (range_int_cst_singleton_p): Likewise.
1369 (symbolic_range_p): Likewise.
1370 (value_ranges_intersect_p): Likewise for both params.
1371 (value_range_nonnegative_p): Likewise for param "vr".
1372 (value_range_constant_singleton): Likewise.
1373 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1374 (extract_range_into_wide_ints): Likewise for param "vr".
1375 (extract_range_from_multiplicative_op): Likewise for params "vr0"
1376 and "vr1".
1377 (vrp_can_optimize_bit_op): Likewise.
1378 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1379 "vr1_".
1380 (extract_range_from_unary_expr): Likewise.
1381 (debug_value_range): Likewise for param "vr".
1382 (value_range::dump): Add "const" qualifier.
1383 (vrp_prop::check_array_ref): Convert local "vr" from
1384 "value_range *" to "const value_range *".
1385 (vrp_prop::check_mem_ref): Likewise.
1386 (vrp_prop::visit_stmt): Likewise for local "old_vr".
1387 (vrp_intersect_ranges_1): Likewise for param "vr_1".
1388 (vrp_intersect_ranges): Likewise.
1389 (simplify_stmt_for_jump_threading): Likewise for local "vr".
1390 (vrp_prop::vrp_finalize): Likewise.
1391 * tree-vrp.h (value_range::dump): Add "const" qualifier.
1392 (vrp_intersect_ranges): Add "const" qualifier to params as above.
1393 (extract_range_from_unary_expr): Likewise.
1394 (value_range_constant_singleton): Likewise.
1395 (symbolic_range_p): Likewise.
1396 (copy_value_range): Likewise.
1397 (extract_range_from_binary_expr_1): Likewise.
1398 (range_int_cst_p): Likewise.
1399 (vrp_set_zero_nonzero_bits): Likewise.
1400 (range_int_cst_singleton_p): Likewise.
1401
1402 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
1403
1404 * config/aarch64/arm_neon.h (vabsd_s64): New.
1405 (vnegd_s64): Likewise.
1406
1407 2018-08-31 Martin Jambor <mjambor@suse.cz>
1408
1409 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1410
1411 2018-08-31 Martin Liska <mliska@suse.cz>
1412
1413 * ipa-icf.c (sem_item::add_type): Use
1414 sem_item::m_type_hash_cache.
1415 * ipa-icf.h: Move the cache from sem_item_optimizer
1416 to sem_item.
1417
1418 2018-08-31 Nathan Sidwell <nathan@acm.org>
1419
1420 * doc/extend.texi (Backwards Compatibility): Remove implicit
1421 extern C leeway of () being (...).
1422
1423 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1424
1425 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1426
1427 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
1428
1429 PR target/86684
1430 PR target/87149
1431 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1432
1433 2018-08-31 Jakub Jelinek <jakub@redhat.com>
1434
1435 PR middle-end/87138
1436 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1437 gen_int_mode. Formatting fixes.
1438
1439 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
1440
1441 * target.def (custom_function_descriptors): Improve documentation.
1442 * doc/tm.texi.in (Trampolines): Expand discussion of function
1443 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1444 beginning of the section.
1445 * doc/tm.texi: Regenerated.
1446
1447 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
1448
1449 * cfg.h (class auto_edge_flag): Spell out the template-id of the
1450 base class in the initializer list. This is a workaround for
1451 building with older GCC.
1452 (class auto_bb_flag): Likewise.
1453
1454 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1455
1456 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1457 (altivec_vcmpequ<VI_char>_p): Remove star.
1458 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1459 vector load modes.
1460 (expand_strncmp_vec_sequence): New function.
1461 (emit_final_str_compare_vec): New function.
1462 (expand_strn_compare): Add support for vector strncmp.
1463 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1464 length specification to bytes.
1465 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1466 (vcmpnezb_p): New pattern.
1467 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1468 for option -mstring-compare-inline-limit.
1469
1470 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
1471
1472 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1473 (PTA_SKYLAKE): Add PTA_AES.
1474 (PTA_GOLDMONT): Likewise.
1475
1476 2018-08-29 Jan Hubicka <jh@suse.cz>
1477
1478 PR lto/86517
1479 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1480 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1481
1482 2018-08-29 Jan Hubicka <jh@suse.cz>
1483
1484 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1485 TYPE_STUB_DECL.
1486 (hash_tree): Do not visit TYPE_STUB_DECL.
1487 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1488 stream TYPE_STUB_DECL.
1489 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1490 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1491 after free_lang_data.
1492 (type_in_anonymous_namespace_p): Likewise.
1493
1494 2018-08-29 Jan Hubicka <jh@suse.cz>
1495
1496 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1497 comment that it has to be even number.
1498 (class sreal): Change m_sig type to int32_t.
1499 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1500 int64_t for temporary calculations.
1501 (sreal_verify_basics): Drop one bit from minimum and maximum.
1502
1503 2018-08-30 Richard Biener <rguenther@suse.de>
1504
1505 PR tree-optimization/87147
1506 * tree-ssa-sccvn.c (SSA_VISITED): New function.
1507 (visit_phi): When the degenerate result is from the backedge and
1508 we didn't visit its definition yet drop to VARYING.
1509 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1510
1511 2018-08-29 Jan Hubicka <jh@suse.cz>
1512
1513 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1514 DECL_VINDEX.
1515 (hash_tree): Likewise.
1516
1517 2018-08-29 Jan Hubicka <jh@suse.cz>
1518
1519 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1520 and TYPE_NEXT_REF_TO.
1521
1522 2018-08-29 Jan Hubicka <jh@suse.cz>
1523
1524 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1525 comment that it has to be even number.
1526 (class sreal): Change m_sig type to int32_t.
1527 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1528 int64_t for temporary calculations.
1529 (sreal_verify_basics): Drop one bit from minimum and maximum.
1530
1531 2018-08-30 Tamar Christina <tamar.christina@arm.com>
1532
1533 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1534
1535 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1536
1537 PR middle-end/86995
1538 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1539 if to_add is negative.
1540
1541 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1542
1543 PR middle-end/87053
1544 * builtins.c (c_strlen): Improve range checks.
1545
1546 2018-08-29 Martin Sebor <msebor@redhat.com>
1547 Jeff Law <law@redhat.com>
1548
1549 PR tree-optimization/86714
1550 PR tree-optimization/86711
1551 * builtins.c (c_strlen): Add arguments to call to string_constant.
1552 * expr.c (string_constant): Add argument. Detect missing nul
1553 terminator and outermost declaration it's missing in.
1554 * expr.h (string_constant): Add argument.
1555 * fold-const.c (read_from_constant_string): Add arguments to call to
1556 string_constant.
1557 (c_getstr): Likewise.
1558 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1559 to string_constant.
1560 * tree-ssa-strlen.c (get_stridx): Likewise.
1561
1562 2018-08-29 Jan Hubicka <jh@suse.cz>
1563
1564 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1565 Do not stream DECL_VINDEX.
1566 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1567 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1568 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1569
1570 2018-08-29 Richard Biener <rguenther@suse.de>
1571
1572 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1573 virtual operands that are not default defs to honor region
1574 boundaries.
1575 (rpo_vn_valueize): Remove ineffective code here.
1576
1577 2018-08-29 Richard Biener <rguenther@suse.de>
1578
1579 PR tree-optimization/87132
1580 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1581 when skipping defs reachable over backedges.
1582
1583 2018-08-29 Richard Biener <rguenther@suse.de>
1584
1585 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1586 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1587 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1588 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1589 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1590 (vn_reference_lookup_3): Remove use of const_parms.
1591 (free_rpo_vn): Do not free const_parms.
1592 (do_rpo_vn): Do not call init_const_parms.
1593 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1594 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1595 (call_may_clobber_ref_p_1): Likewise.
1596
1597 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1598
1599 PR other/86726
1600 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1601 (-O): Ditto.
1602 (-ftree-scev-cprop): Document.
1603
1604 2018-08-29 Jan Hubicka <jh@suse.cz>
1605
1606 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1607 parameters.
1608 (sreal constructor): Update.
1609 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1610 sreal:operator/): Update.
1611
1612 2018-08-29 Martin Liska <mliska@suse.cz>
1613
1614 * tree-switch-conversion.c (switch_conversion::expand):
1615 Strenghten assumption about gswitch statements.
1616
1617 2018-08-29 Richard Biener <rguenther@suse.de>
1618
1619 PR tree-optimization/87117
1620 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1621 re-value-number released SSA VDEFs.
1622
1623 2018-08-29 Richard Biener <rguenther@suse.de>
1624
1625 PR tree-optimization/87126
1626 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1627
1628 2018-08-28 Jim Wilson <jimw@sifive.com>
1629
1630 * config/riscv/pic.md: Rewrite.
1631 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1632 invalid address.
1633 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1634 (SOFTF, default_load, softload, softstore): New.
1635
1636 2018-08-28 Jeff Law <law@redhat.com>
1637
1638 * fold-const.c (fold_binary_loc): Remove recently added assert.
1639
1640 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1641
1642 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1643 to OP parmeter of generated function.
1644
1645 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1646
1647 PR tree-optimization/87009
1648 * match.pd: Add boolean optimizations.
1649
1650 2018-08-28 Martin Sebor <msebor@redhat.com>
1651
1652 PR middle-end/86631
1653 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1654 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1655 (pass_walloca::gate): Use it.
1656 (alloca_call_type): Same.
1657 (pass_walloca::execute): Same.
1658 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1659
1660 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1661
1662 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1663 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1664 >= 3005 to >= 9000.
1665
1666 2018-08-28 Richard Biener <rguenther@suse.de>
1667
1668 PR tree-optimization/87124
1669 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1670 constants before looking up avail.
1671
1672 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1673
1674 PR middle-end/87099
1675 * calls.c (maybe_warn_nonstring_arg): Punt early if
1676 warn_stringop_overflow is zero. Don't call get_range_strlen
1677 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1678 Swap comparison operands to have constants on rhs. Only use
1679 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1680 increment lenrng[0].
1681
1682 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1683
1684 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1685 use of tree_to_shwi. Remove duplicated test for the size being
1686 a whole number of bytes.
1687
1688 2018-08-28 Richard Biener <rguenther@suse.de>
1689
1690 PR tree-optimization/87117
1691 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1692 Handle removed stmt without LHS (GIMPLE_NOP).
1693
1694 2018-08-28 Richard Biener <rguenther@suse.de>
1695
1696 PR tree-optimization/87117
1697 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1698 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1699
1700 2018-08-28 Richard Biener <rguenther@suse.de>
1701
1702 PR tree-optimization/87117
1703 * tree-ssa-pre.c (compute_avail): Do not make expressions
1704 with predicated values available.
1705 (get_expr_value_id): Assert we do not run into predicated value
1706 expressions.
1707
1708 2018-08-28 Richard Biener <rguenther@suse.de>
1709
1710 PR tree-optimization/87117
1711 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1712 get virtual operands.
1713 (get_expr_operands): Handle STRING_CST like other decls.
1714
1715 2018-08-28 Martin Liska <mliska@suse.cz>
1716
1717 * tree.h: Update documentation of fndecl_built_in_p
1718 functions.
1719
1720
1721 2018-08-27 Jeff Law <law@redhat.com>
1722 PR tree-optimization/87110
1723 * tree-ssa-dse.c (compute_trims): Handle non-constant
1724 TYPE_SIZE_UNIT.
1725
1726 2018-08-27 Martin Sebor <msebor@redhat.com>
1727
1728 PR tree-optimization/86914
1729 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1730
1731 2018-08-27 Martin Sebor <msebor@redhat.com>
1732
1733 PR tree-optimization/87112
1734 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1735 the type of the bound argument.
1736
1737 2018-08-27 Jeff Law <law@redhat.com>
1738
1739 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1740 type does not have a TYPE_SIZE_UNIT.
1741
1742 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1743
1744 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1745 with include of backend.h.
1746
1747 2018-08-27 Richard Biener <rguenther@suse.de>
1748
1749 PR tree-optimization/86927
1750 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1751 use const cond reduction code.
1752
1753 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1754
1755 PR tree-optimization/85758
1756 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1757
1758 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1759
1760 PR c++/87091
1761 * diagnostic-show-locus.c (class layout_range): Update for
1762 conversion of show_caret_p to a tri-state.
1763 (layout_range::layout_range): Likewise.
1764 (make_range): Likewise.
1765 (layout::maybe_add_location_range): Likewise.
1766 (layout::should_print_annotation_line_p): Don't show annotation
1767 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1768 (layout::get_state_at_point): Update for conversion of
1769 show_caret_p to a tri-state. Bail out early for
1770 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1771 underlining or source colorization.
1772 (gcc_rich_location::add_location_if_nearby): Update for conversion
1773 of show_caret_p to a tri-state.
1774 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1775 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1776 Likewise.
1777 (selftest::test_one_liner_labels): Likewise.
1778 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1779 conversion of show_caret_p to a tri-state.
1780 * pretty-print.c (text_info::set_location): Likewise.
1781 * pretty-print.h (text_info::set_location): Likewise.
1782 * substring-locations.c (format_warning_n_va): Likewise.
1783 * tree-diagnostic.c (default_tree_printer): Likewise.
1784 * tree-pretty-print.c (newline_and_indent): Likewise.
1785
1786 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1787
1788 PR c++/87091
1789 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1790 line above for line-insertion fix-it hints.
1791 (selftest::test_fixit_insert_containing_newline): Update the
1792 expected results, and add a test with line-numbering enabled.
1793
1794 2018-08-27 Martin Liska <mliska@suse.cz>
1795
1796 PR sanitizer/86962
1797 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1798 params with DECL_HAS_VALUE_EXPR_P.
1799
1800 2018-08-27 Martin Liska <mliska@suse.cz>
1801
1802 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1803 selected expansion strategy.
1804
1805 2018-08-27 Martin Liska <mliska@suse.cz>
1806
1807 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1808 * builtins.c (is_builtin_fn): Likewise.
1809 * attribs.c (diag_attr_exclusions): Use new function
1810 fndecl_built_in_p and remove check for FUNCTION_DECL if
1811 possible.
1812 (builtin_mathfn_code): Likewise.
1813 (fold_builtin_expect): Likewise.
1814 (fold_call_expr): Likewise.
1815 (fold_builtin_call_array): Likewise.
1816 (fold_call_stmt): Likewise.
1817 (set_builtin_user_assembler_name): Likewise.
1818 (is_simple_builtin): Likewise.
1819 * calls.c (gimple_alloca_call_p): Likewise.
1820 (maybe_warn_nonstring_arg): Likewise.
1821 * cfgexpand.c (expand_call_stmt): Likewise.
1822 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1823 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1824 (cgraph_node::verify_node): Likewise.
1825 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1826 (cgraph_node::create_clone): Likewise.
1827 * config/arm/arm.c (arm_insert_attributes): Likewise.
1828 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1829 * dse.c (scan_insn): Likewise.
1830 * expr.c (expand_expr_real_1): Likewise.
1831 * fold-const.c (operand_equal_p): Likewise.
1832 (fold_binary_loc): Likewise.
1833 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1834 * gimple-low.c (lower_stmt): Likewise.
1835 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1836 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1837 * gimple.c (gimple_build_call_from_tree): Likewise.
1838 (gimple_call_builtin_p): Likewise.
1839 (gimple_call_combined_fn): Likewise.
1840 * gimplify.c (gimplify_call_expr): Likewise.
1841 (gimple_boolify): Likewise.
1842 (gimplify_modify_expr): Likewise.
1843 (gimplify_addr_expr): Likewise.
1844 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1845 * ipa-cp.c (determine_versionability): Likewise.
1846 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1847 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1848 * ipa-split.c (visit_bb): Likewise.
1849 (split_function): Likewise.
1850 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1851 * lto-cgraph.c (input_node): Likewise.
1852 * lto-streamer-out.c (write_symbol): Likewise.
1853 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1854 (lower_omp_1): Likewise.
1855 * predict.c (strip_predict_hints): Likewise.
1856 * print-tree.c (print_node): Likewise.
1857 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1858 * trans-mem.c (is_tm_irrevocable): Likewise.
1859 (is_tm_load): Likewise.
1860 (is_tm_simple_load): Likewise.
1861 (is_tm_store): Likewise.
1862 (is_tm_simple_store): Likewise.
1863 (is_tm_abort): Likewise.
1864 (tm_region_init_1): Likewise.
1865 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1866 * tree-cfg.c (verify_gimple_call): Likewise.
1867 (move_stmt_r): Likewise.
1868 (stmt_can_terminate_bb_p): Likewise.
1869 * tree-eh.c (lower_eh_constructs_2): Likewise.
1870 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1871 * tree-inline.c (remap_gimple_stmt): Likewise.
1872 (copy_bb): Likewise.
1873 (estimate_num_insns): Likewise.
1874 (fold_marked_statements): Likewise.
1875 * tree-sra.c (scan_function): Likewise.
1876 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1877 (optimize_stack_restore): Likewise.
1878 (pass_fold_builtins::execute): Likewise.
1879 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1880 (mark_all_reaching_defs_necessary_1): Likewise.
1881 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1882 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1883 (pass_forwprop::execute): Likewise.
1884 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1885 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1886 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1887 * tree-ssa-strlen.c (get_string_length): Likewise.
1888 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1889 (find_func_aliases_for_call): Likewise.
1890 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1891 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1892 * tree-tailcall.c (find_tail_calls): Likewise.
1893 * tree.c (need_assembler_name_p): Likewise.
1894 (free_lang_data_in_decl): Likewise.
1895 (get_call_combined_fn): Likewise.
1896 * ubsan.c (is_ubsan_builtin_p): Likewise.
1897 * varasm.c (incorporeal_function_p): Likewise.
1898 * tree.h (DECL_BUILT_IN): Remove and replace with
1899 fndecl_built_in_p.
1900 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1901 (fndecl_built_in_p): New.
1902
1903 2018-08-27 Martin Liska <mliska@suse.cz>
1904
1905 PR tree-optimization/86847
1906 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1907 Dump also subtree probability.
1908 (switch_decision_tree::do_jump_if_equal): New function.
1909 (switch_decision_tree::emit_case_nodes): Handle special
1910 situations in balanced tree that can be emitted much simpler.
1911 Fix calculation of probabilities that happen in tree expansion.
1912 * tree-switch-conversion.h (struct cluster): Add
1913 is_single_value_p.
1914 (struct simple_cluster): Likewise.
1915 (struct case_tree_node): Add new function has_child.
1916 (do_jump_if_equal): New.
1917
1918 2018-08-27 Martin Liska <mliska@suse.cz>
1919
1920 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1921 Add new argument to bit_test_cluster constructor.
1922 (bit_test_cluster::emit): Set bits really number of values
1923 handlel by a test.
1924 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1925 probability argument.
1926 * tree-switch-conversion.h (struct bit_test_cluster):
1927 Add m_handles_entire_switch.
1928
1929 2018-08-27 Martin Liska <mliska@suse.cz>
1930
1931 PR tree-optimization/86702
1932 * tree-switch-conversion.c (jump_table_cluster::emit):
1933 Make probabilities even for values in jump table
1934 according to number of cases handled.
1935 (switch_decision_tree::compute_cases_per_edge): Pass
1936 argument to reset_out_edges_aux function.
1937 (switch_decision_tree::analyze_switch_statement): Likewise.
1938 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1939 Make it static.
1940
1941 2018-08-27 Martin Liska <mliska@suse.cz>
1942
1943 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1944 cfun argument explicitly.
1945 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1946 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1947 function gimple_switch_default_bb.
1948 (convert_switch_statements):
1949 (expand_builtins):
1950 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1951 * stmt.c (label_to_block_fn): Use label_to_block and pass
1952 cfun argument explicitly and use gimple_switch_label_bb.
1953 (expand_case): Likewise.
1954 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1955 cfun argument explicitly. Likewise.
1956 (make_edges_bb): Likewise.
1957 (make_cond_expr_edges): Likewise.
1958 (get_cases_for_edge): Likewise.
1959 (make_gimple_switch_edges): Likewise.
1960 (label_to_block_fn): Likewise.
1961 (label_to_block): Likewise.
1962 (make_goto_expr_edges): Likewise.
1963 (make_gimple_asm_edges): Likewise.
1964 (main_block_label): Likewise.
1965 (group_case_labels_stmt): Likewise.
1966 (find_taken_edge_computed_goto): Likewise.
1967 (find_taken_edge_switch_expr): Likewise.
1968 (gimple_verify_flow_info): Likewise.
1969 (gimple_redirect_edge_and_branch): Likewise.
1970 (gimple_switch_label_bb): New function.
1971 (gimple_switch_default_bb): Likewise.
1972 (gimple_switch_edge): Likewise.
1973 (gimple_switch_default_edge): Likewise.
1974 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1975 (label_to_block): ... with this.
1976 (gimple_switch_label_bb): New.
1977 (gimple_switch_default_bb): Likewise.
1978 (gimple_switch_edge): Likewise.
1979 (gimple_switch_default_edge): Likewise.
1980 * tree-cfgcleanup.c (convert_single_case_switch): Use
1981 new gimple functions and pass new argument to label_to_block.
1982 (cleanup_control_flow_bb):
1983 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1984 cfun argument explicitly.
1985 (make_eh_edges): Likewise.
1986 (redirect_eh_dispatch_edge): Likewise.
1987 (lower_resx): Likewise.
1988 (lower_eh_dispatch): Likewise.
1989 (maybe_remove_unreachable_handlers): Likewise.
1990 (unsplit_eh): Likewise.
1991 (cleanup_empty_eh): Likewise.
1992 (verify_eh_edges): Likewise.
1993 (verify_eh_dispatch_edge): Likewise.
1994 * tree-ssa-dom.c (record_edge_info): Likewise.
1995 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1996 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1997 (thread_through_normal_block): Likewise.
1998 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1999 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
2000 * tree-switch-conversion.c (switch_conversion::collect): Use new
2001 gimple functions.
2002 (switch_conversion::check_final_bb): Likewise.
2003 (switch_conversion::gather_default_values): Pass new argument
2004 to label_to_block.
2005 (switch_conversion::build_constructors): Likewise.
2006 (switch_decision_tree::compute_cases_per_edge): Use new
2007 gimple_switch_edge function.
2008 (switch_decision_tree::analyze_switch_statement): Pass new argument
2009 to label_to_block.
2010 (switch_decision_tree::try_switch_expansion): Use
2011 gimple_switch_default_edge.
2012 * tree-vrp.c (find_switch_asserts): Pass new argument
2013 to label_to_block.
2014 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
2015 (vr_values::simplify_switch_using_ranges): Likewise.
2016
2017 2018-08-27 Richard Biener <rguenther@suse.de>
2018
2019 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
2020 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
2021
2022 * tree-ssa-sccvn.h (struct vn_pval): New structure.
2023 (struct vn_nary_op_s): Add unwind_to member. Add
2024 predicated_values flag and put result into a union together
2025 with a linked list of vn_pval.
2026 (struct vn_ssa_aux): Add name member to make maintaining
2027 a map of SSA name to vn_ssa_aux possible. Remove no longer
2028 needed info, dfsnum, low, visited, on_sccstack, use_processed
2029 and range_info_anti_range_p members.
2030 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
2031 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
2032 New functions.
2033 (vn_valueize): New global.
2034 (vn_context_bb): Likewise.
2035 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
2036 VN_INFO_PTR_INFO): Remove.
2037 * tree-ssa-sccvn.c: ... (rewrite)
2038 (pass_fre::execute): For -O2+ initialize loops and run
2039 RPO VN in optimistic mode (iterating). For -O1 and -Og
2040 run RPO VN in non-optimistic mode.
2041 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
2042 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
2043 * doc/invoke.texi (sccvn-max-scc-size): Remove.
2044 (rpo-vn-max-loop-depth): Document.
2045 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
2046 when valuezing the VUSE signals we walked out of the region.
2047 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
2048 (phi_translate): Set VN context block to use for availability
2049 lookup.
2050 (compute_avail): Likewise.
2051 (pre_valueize): New function.
2052 (pass_pre::execute): Adjust to the RPO VN API.
2053
2054 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
2055 (propagate_constants_for_unrolling): Remove.
2056 (tree_unroll_loops_completely): Perform value-numbering
2057 on the unrolled bodies loop parent.
2058
2059 2018-08-27 Richard Biener <rguenther@suse.de>
2060
2061 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
2062 for partial antic compute.
2063
2064 2018-08-27 Jakub Jelinek <jakub@redhat.com>
2065
2066 PR rtl-optimization/87065
2067 * combine.c (simplify_if_then_else): Formatting fix.
2068 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
2069 check.
2070 (known_cond): Don't return const_true_rtx for vector modes. Use
2071 CONST0_RTX instead of const0_rtx. Formatting fixes.
2072
2073 2018-08-27 Martin Liska <mliska@suse.cz>
2074
2075 PR gcov-profile/87069
2076 * gcov.c (process_file): Record files already processed
2077 and warn about a file being processed multiple times.
2078
2079 2018-08-27 Martin Liska <mliska@suse.cz>
2080
2081 PR driver/83193
2082 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2083 Set default values for x_aarch64_*_string strings.
2084 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
2085 prefix. For -mabi do not print '=ABI' in help and use
2086 <option_value> format for -msve-vector-bits and -moverride
2087 options.
2088
2089 2018-08-26 Jeff Law <law@redhat.com>
2090
2091 * config/mips/frame-header-opt.c: Include "backend.h" rather than
2092 "cfg.h"
2093
2094 2018-08-26 Marek Polacek <polacek@redhat.com>
2095
2096 PR c++/87029, Implement -Wredundant-move.
2097 * doc/invoke.texi: Document -Wredundant-move.
2098
2099 2018-08-25 Martin Sebor <msebor@redhat.com>
2100
2101 PR tree-optimization/87059
2102 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
2103 to the same type as the other.
2104 * fold-const.c (fold_binary_loc): Assert expectation.
2105
2106 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
2107
2108 * config/darwin.c (machopic_legitimize_pic_address): Clean up
2109 extraneous parentheses, dead code section and formatting.
2110
2111 2018-08-24 David Malcolm <dmalcolm@redhat.com>
2112
2113 PR c++/87091
2114 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
2115 wide enough for jumps in the line-numbering to be visible.
2116 (layout::print_gap_in_line_numbering): New member function.
2117 (layout::calculate_line_spans): When using line numbering, merge
2118 line spans that are only 1 line apart.
2119 (diagnostic_show_locus): When printing line numbers, show gaps in
2120 line numbering directly, rather than printing headers.
2121 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
2122 line-numbering with multiple line spans.
2123 (selftest::test_fixit_insert_containing_newline_2): Add test of
2124 line-numbering, in which the spans are close enough to be merged.
2125
2126 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2127
2128 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
2129 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
2130 * tree-vrp.c (range_is_nonnull): Remove.
2131 (range_includes_zero_p): Accept value_range instead of min/max.
2132 (extract_range_from_binary_expr_1): Do not early bail on
2133 POINTER_PLUS_EXPR.
2134 Use range_includes_zero_p instead of range_is_nonnull.
2135 (extract_range_from_unary_expr): Use range_includes_zero_p instead
2136 of range_is_nonnull.
2137 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
2138 special case VR_ANTI_RANGE.
2139 (vrp_finalize): Same.
2140 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
2141 instead of min/max.
2142 (range_is_nonnull): Remove.
2143 * vr-values.c (vrp_stmt_computes_nonzero): Use
2144 range_includes_zero_p instead of range_is_nonnull.
2145 (extract_range_basic): Pass value_range to range_includes_zero_p
2146 instead of range_is_nonnull.
2147
2148 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
2149
2150 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
2151 * emit-rtl.h (rtl_data): Remove return_bnd.
2152 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
2153 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
2154 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
2155 (POINTER_BOUNDS_MODE): Remove definition.
2156 (make_pointer_bounds_mode): Remove.
2157 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
2158 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
2159 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
2160 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
2161 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
2162 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
2163 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
2164
2165 * config/i386/i386-modes.def (BND32, BND64): Remove.
2166 * config/i386/i386.c (dbx_register_map): Remove bound registers.
2167 (dbx64_register_map): Ditto.
2168 (svr4_dbx_register_map): Ditto.
2169 (indirect_thunk_bnd_needed): Remove.
2170 (indirect_thunks_bnd_used): Ditto.
2171 (indirect_return_bnd_needed): Ditto.
2172 (indirect_return_via_cx_bnd): Ditto.
2173 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
2174 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
2175 (output_indirect_thunk): Ditto. Remove need_prefix argument.
2176 (output_indirect_thunk_function): Remove handling of
2177 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
2178 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
2179 (ix86_save_reg): Remove handling of crtl->return_bnd.
2180 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
2181 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
2182 and UNSPEC_BNDLX_ADDR.
2183 (ix86_output_indirect_branch_via_reg): Remove handling of
2184 indirect_thunk_prefix_bnd.
2185 (ix86_output_indirect_branch_via_push): Ditto.
2186 (ix86_output_function_return): Ditto.
2187 (ix86_output_indirect_function_return): Ditto.
2188 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
2189 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
2190 (CALL_USED_REGISTERS): Ditto.
2191 (REG_ALLOC_ORDER): Update for removal of bound registers.
2192 (HI_REGISTER_NAMES): Ditto.
2193 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
2194 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
2195 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
2196 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
2197 (FIRST_PSEUDO_REG): Update.
2198 (BND): Remove mode iterator.
2199 * config/i386/predicates.md (bnd_mem_operator): Remove.
2200
2201 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2202
2203 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
2204 vectors.
2205
2206 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2207
2208 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
2209 the case in which the permute needs only a single element and
2210 repeats for every vector of the result. Extend that case to
2211 handle variable-length vectors.
2212 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2213
2214 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
2215
2216 PR debug/79342
2217 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
2218 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2219
2220 2018-08-24 Richard Biener <rguenther@suse.de>
2221
2222 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
2223 bb_flags_allocated members.
2224 (auto_flag): New RAII class for allocating flags.
2225 (auto_edge_flag): New RAII class for allocating edge flags.
2226 (auto_bb_flag): New RAII class for allocating bb flags.
2227 * cfgloop.c (verify_loop_structure): Allocate temporary edge
2228 flag dynamically.
2229 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
2230 in favor of temporarily allocated BB flag.
2231 * hsa-brig.c: Re-order includes.
2232 * hsa-dump.c: Likewise.
2233 * hsa-regalloc.c: Likewise.
2234 * print-rtl.c: Likewise.
2235 * profile-count.c: Likewise.
2236
2237 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
2238
2239 PR target/86989
2240 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2241 the TOC register.
2242
2243 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2244
2245 PR 87073/bootstrap
2246 * wide-int-range.cc (wide_int_range_div): Do not ignore result
2247 from wide_int_range_multiplicative_op.
2248
2249 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2250
2251 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
2252 "permutaion".
2253
2254 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
2255
2256 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
2257 to 'expanded'.
2258
2259 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
2260
2261 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
2262 full GENERIC expression used for replacement.
2263
2264 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
2265
2266 * tree-vrp.c (abs_extent_range): Remove.
2267 (extract_range_into_wide_ints): Pass wide ints by reference.
2268 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
2269 Pass wide ints by reference in all calls to
2270 extract_range_into_wide_ints.
2271 * wide-int-range.cc (wide_int_range_div): New.
2272 * wide-int-range.h (wide_int_range_div): New.
2273 (wide_int_range_includes_zero_p): New.
2274 (wide_int_range_zero_p): New.
2275
2276 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
2277
2278 * config/aarch64/aarch64.md (arches): New enum.
2279 (arch): New enum attr.
2280 (arch_enabled): New attr.
2281 (enabled): Now uses arch_enabled only.
2282 (simd, sve, fp16): Removed attribute.
2283 (fp): Attr now defined in terms of 'arch'.
2284 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
2285 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
2286 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
2287 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
2288 attributes into 'arch'.
2289 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
2290 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
2291 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
2292 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
2293 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
2294 'simd' attribute into 'arch'.
2295 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
2296 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
2297 Convert use of 'fp' attribute to 'arch'.
2298 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
2299 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
2300 into 'arch'.
2301 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
2302 (different modes) Merge 'fp' and 'simd' into 'arch'.
2303 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
2304 'simd' into 'arch'.
2305
2306 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
2307
2308 PR rtl-optimization/87026
2309 * expmed.c (canonicalize_comparison): If we can no longer create
2310 pseudoregisters, don't.
2311
2312 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
2313
2314 PR target/86951
2315 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
2316 prototype.
2317 * config/arm/arm.c (speculation_barrier_libfunc): New static
2318 variable.
2319 (arm_init_libfuncs): Initialize it.
2320 (arm_emit_speculation_barrier): New function.
2321 * config/arm/arm.md (speculation_barrier): Call
2322 arm_emit_speculation_barrier for architectures that do not have
2323 DSB or ISB.
2324 (speculation_barrier_insn): Only match on Armv7 or later.
2325
2326 2018-08-23 Richard Biener <rguenther@suse.de>
2327
2328 PR middle-end/87024
2329 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2330 calls.
2331
2332 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2333
2334 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2335 of single-vector TBLs.
2336 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2337 one input is given.
2338
2339 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2340
2341 PR target/85910
2342 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2343 aarch64_evpc_tbl guard.
2344
2345 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
2346
2347 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2348 behaviour.
2349
2350 2018-08-22 Martin Sebor <msebor@redhat.com>
2351
2352 PR middle-end/87052
2353 * tree-pretty-print.c (pretty_print_string): Add argument.
2354 (dump_generic_node): Call to pretty_print_string with string size.
2355
2356 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
2357
2358 PR rtl-optimization/86771
2359 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2360 of two SETs into those two SETs, one to be placed at i2, if that SETs
2361 destination is modified between i2 and i3.
2362
2363 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2364
2365 PR tree-optimization/86725
2366 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2367 function.
2368 (vect_analyze_scalar_cycles_1): Check it.
2369
2370 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2371
2372 PR tree-optimization/86725
2373 * tree-vect-loop.c (vect_is_simple_reduction): When treating
2374 an outer loop phi as a double reduction, make sure that the
2375 single user of the phi result is an inner loop phi.
2376
2377 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2378
2379 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2380 grouped stores with gaps to a strided group.
2381
2382 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2383
2384 * tree-vect-stmts.c (get_group_load_store_type)
2385 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2386 first statement in a group.
2387
2388 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2389
2390 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2391 the sequence used in gcc/gcc.c.
2392
2393 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2394
2395 PR other/704
2396 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2397 building it.
2398
2399 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2400
2401 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2402 Darwin10-specific unwinder-shim.
2403 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2404 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
2405 New to cater for Darwin10 Rosetta.
2406
2407 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2408
2409 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2410 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2411
2412 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2413
2414 PR bootstrap/81033
2415 PR target/81733
2416 PR target/52795
2417 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2418 (dwarf2out_switch_text_section): Generate a local label for the
2419 second function sub-section and apply it as the second FDE start
2420 label.
2421 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2422 second sub-section start.
2423
2424 2018-08-22 Richard Biener <rguenther@suse.de>
2425
2426 PR tree-optimization/86988
2427 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2428
2429 2018-08-22 Richard Biener <rguenther@suse.de>
2430
2431 PR tree-optimization/86945
2432 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2433
2434 2018-08-22 Alexandre Oliva <oliva@adacore.com>
2435
2436 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2437 a comment about how uses of r2 for .sdata2 come about.
2438
2439 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
2440
2441 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2442
2443 2018-08-21 Marek Polacek <polacek@redhat.com>
2444
2445 PR c++/86981, Implement -Wpessimizing-move.
2446 * doc/invoke.texi: Document -Wpessimizing-move.
2447
2448 2018-08-21 Jan Hubicka <jh@suse.cz>
2449
2450 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2451 * tree.h (is_redundant_typedef): Remove.
2452 * dwarf2out.c (is_redundant_typedef): Turn into static function.
2453
2454 2018-08-21 Jan Hubicka <jh@suse.cz>
2455
2456 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2457 when possible.
2458
2459 2018-08-21 Tamar Christina <tamar.christina@arm.com>
2460
2461 * expmed.c (extract_low_bits): Reject invalid subregs early.
2462
2463 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2464
2465 PR middle-end/86121
2466 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2467 behaviour.
2468
2469 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2470
2471 * config/vxworks.h: Guard vxworks_asm_out_constructor and
2472 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2473 * config/vxworks.c: Likewise.
2474
2475 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2476
2477 * config/vxworks.c: Set targetm.have_ctors_dtors
2478 if HAVE_INITFINI_ARRAY_SUPPORT.
2479 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2480 if HAVE_INITFINI_ARRAY_SUPPORT.
2481
2482 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2483
2484 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2485 default search path for VxWorks < 7.
2486
2487 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2488
2489 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2490 (get_format_string): Refer to c_getstr.
2491
2492 2018-08-21 Tom de Vries <tdevries@suse.de>
2493
2494 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2495 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2496 (debuginfo_early_stop): Declare.
2497 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2498 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2499 (debuginfo_early_stop): New function.
2500 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2501 and debuginfo_early_stop.
2502 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2503 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2504 (general_init): Call debuginfo_early_init.
2505 (finalize): Call debuginfo_fini.
2506 (do_compile): Call debuginfo_init.
2507 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2508 -fdump-early-debug.
2509 (@item -fdump-debug, @item -fdump-earlydebug): Add.
2510
2511 2018-08-21 Tom de Vries <tdevries@suse.de>
2512
2513 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2514 flag_dump_noaddr and flag_dump_unnumbered.
2515
2516 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
2517
2518 * wide-int-range.cc (wide_int_range_abs): New.
2519 (wide_int_range_order_set): Rename from wide_int_range_min_max.
2520 * wide-int-range.h (wide_int_range_abs): New.
2521 (wide_int_range_min_max): New.
2522 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2523 case to call wide_int_range_abs.
2524 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2525 (extract_range_from_abs_expr): Delete.
2526
2527 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2528
2529 PR target/87033
2530 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2531 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2532 for indexed loads.
2533
2534 2018-08-20 Nathan Sidwell <nathan@acm.org>
2535 Jeff Law <law@redhat.com>
2536
2537 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2538 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2539
2540 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2541
2542 PR other/84889
2543 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2544 (decl_attributes): Likewise.
2545 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2546 instance.
2547 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2548 * diagnostic-core.h (class auto_diagnostic_group): New class.
2549 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2550 (diagnostic_report_diagnostic): Handle the first diagnostics within
2551 a group.
2552 (emit_diagnostic): Add auto_diagnostic_group instance.
2553 (inform): Likewise.
2554 (inform_n): Likewise.
2555 (warning): Likewise.
2556 (warning_at): Likewise.
2557 (warning_n): Likewise.
2558 (pedwarn): Likewise.
2559 (permerror): Likewise.
2560 (error): Likewise.
2561 (error_n): Likewise.
2562 (error_at): Likewise.
2563 (sorry): Likewise.
2564 (fatal_error): Likewise.
2565 (internal_error): Likewise.
2566 (internal_error_no_backtrace): Likewise.
2567 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2568 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2569 * diagnostic.h (struct diagnostic_context): Add fields
2570 "diagnostic_group_nesting_depth",
2571 "diagnostic_group_emission_count", "begin_group_cb",
2572 "end_group_cb".
2573 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2574 Add auto_diagnostic_group instance(s).
2575 (find_explicit_erroneous_behavior): Likewise.
2576 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2577 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2578 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2579 (gimplify_va_arg_expr): Likewise.
2580 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2581 (HSA_SORRY_AT): Likewise.
2582 * ipa-devirt.c (compare_virtual_tables): Likewise.
2583 (warn_odr): Likewise.
2584 * multiple_target.c (expand_target_clones): Likewise.
2585 * opts-common.c (cmdline_handle_error): Likewise.
2586 * reginfo.c (globalize_reg): Likewise.
2587 * substring-locations.c (format_warning_n_va): Likewise.
2588 * tree-inline.c (expand_call_inline): Likewise.
2589 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2590 * tree-ssa-loop-niter.c
2591 (do_warn_aggressive_loop_optimizations): Likewise.
2592 * tree-ssa-uninit.c (warn_uninit): Likewise.
2593 * tree.c (warn_deprecated_use): Likewise.
2594
2595 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2596
2597 PR target/87014
2598 * config/i386/i386.md (eh_return): Always update EH return
2599 address in word_mode.
2600
2601 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2602
2603 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2604 TARGET_SPLIT_COMPLEX_ARG is defined.
2605
2606 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2607
2608 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2609
2610 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2611
2612 PR target/86984
2613 * expr.c (expand_assignment): Assert that bitpos is positive.
2614 (store_field): Likewise
2615 (expand_expr_real_1): Make sure that bitpos is positive.
2616 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2617 integer overflow.
2618
2619 2018-08-20 Nathan Sidwell <nathan@acm.org>
2620
2621 * Makefile.in (CPP_ID_DATA_H): Delete.
2622 (CPP_INTERNAL_H): Don't add it.
2623 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2624 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2625
2626 2018-08-20 Richard Biener <rguenther@suse.de>
2627
2628 PR tree-optimization/78655
2629 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2630 pointer + offset nonnull if either operand is nonnull work.
2631
2632 2018-08-20 Tom de Vries <tdevries@suse.de>
2633
2634 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2635 unless the referenced die describes the added property using
2636 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2637 Otherwise, add a DW_AT_location to the referenced die.
2638
2639 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2640
2641 PR target/86994
2642 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2643 register_operand when calling ix86_set_reg_reg_cost.
2644 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2645 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2646 predicate and to 1 otherwise.
2647
2648 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2649
2650 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2651 emit a diagnostic that it is not supported and reset the option.
2652 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2653 supported and consume the option. (ASM_FINAL_SPEC): New.
2654
2655 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2656
2657 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2658 a sentence.
2659
2660 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2661
2662 C-SKY port: Documentation
2663
2664 * doc/extend.texi (C-SKY Function Attributes): New section.
2665 * doc/invoke.texi (Option Summary): Add C-SKY options.
2666 (C-SKY Options): New section.
2667 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2668
2669 2018-08-17 Jojo <jijie_rong@c-sky.com>
2670 Huibin Wang <huibin_wang@c-sky.com>
2671 Sandra Loosemore <sandra@codesourcery.com>
2672 Chung-Lin Tang <cltang@codesourcery.com>
2673
2674 C-SKY port: Backend implementation
2675
2676 * config/csky/*: New.
2677 * common/config/csky/*: New.
2678
2679 2018-08-17 Jojo <jijie_rong@c-sky.com>
2680 Huibin Wang <huibin_wang@c-sky.com>
2681 Sandra Loosemore <sandra@codesourcery.com>
2682 Chung-Lin Tang <cltang@codesourcery.com>
2683 Andrew Jenner <andrew@codesourcery.com>
2684
2685 C-SKY port: Configury
2686
2687 * config.gcc (csky-*-*): New.
2688 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2689 * configure: Regenerated.
2690
2691 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2692
2693 * dump-context.h: Include "dumpfile.h".
2694 (dump_context::dump_printf_va): Convert final param from va_list
2695 to va_list *. Convert from ATTRIBUTE_PRINTF to
2696 ATTRIBUTE_GCC_DUMP_PRINTF.
2697 (dump_context::dump_printf_loc_va): Likewise.
2698 * dumpfile.c: Include "stringpool.h".
2699 (make_item_for_dump_printf_va): Delete.
2700 (make_item_for_dump_printf): Delete.
2701 (class dump_pretty_printer): New class.
2702 (dump_pretty_printer::dump_pretty_printer): New ctor.
2703 (dump_pretty_printer::emit_items): New member function.
2704 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2705 function.
2706 (dump_pretty_printer::emit_item): New member function.
2707 (dump_pretty_printer::stash_item): New member function.
2708 (dump_pretty_printer::format_decoder_cb): New member function.
2709 (dump_pretty_printer::decode_format): New member function.
2710 (dump_context::dump_printf_va): Reimplement in terms of
2711 dump_pretty_printer.
2712 (dump_context::dump_printf_loc_va): Convert final param from va_list
2713 to va_list *.
2714 (dump_context::begin_scope): Reimplement call to
2715 make_item_for_dump_printf.
2716 (dump_printf): Update for change to dump_printf_va.
2717 (dump_printf_loc): Likewise.
2718 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2719 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2720 with %T, %E, and %G.
2721 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2722 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2723 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2724 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2725 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2726 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2727 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2728 within a dump_printf_loc call to "%wu".
2729 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2730 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2731 missing space after "=".
2732 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2733 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2734 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2735 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2736 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2737 duplicate "vectorized" from message.
2738
2739 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2740
2741 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2742 polyNxK_t element's TYPE_STRING_FLAG.
2743
2744 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2745
2746 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2747 (they were unnamed before). Fix comments.
2748
2749 2018-08-17 Nathan Sidwell <nathan@acm.org>
2750
2751 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2752
2753 2018-08-17 Richard Biener <rguenther@suse.de>
2754
2755 PR tree-optimization/86841
2756 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2757
2758 2018-08-17 Martin Liska <mliska@suse.cz>
2759
2760 * common.opt: Remove Warn, Init and Report for options with
2761 Ignore/Deprecated flag. Warning is done automatically for
2762 Deprecated flags.
2763 * config/i386/i386.opt: Likewise.
2764 * config/ia64/ia64.opt: Likewise.
2765 * config/rs6000/rs6000.opt: Likewise.
2766 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2767 Remove usage of flag_check_pointer_bounds.
2768 * lto-wrapper.c (merge_and_complain): Do not handle
2769 OPT_fcheck_pointer_bounds.
2770 (append_compiler_options): Likewise.
2771 * opt-functions.awk: Do not handle Deprecated.
2772 * optc-gen.awk: Check that Var, Report and Init are not
2773 used for an option with Ignore/Deprecated flag.
2774 * opts-common.c (decode_cmdline_option): Do not report
2775 CL_ERR_DEPRECATED.
2776 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2777 options.
2778 * opts.h (struct cl_option): Remove cl_deprecated flag.
2779 (CL_ERR_DEPRECATED): Remove error enum value.
2780
2781 2018-08-17 Richard Biener <rguenther@suse.de>
2782
2783 PR middle-end/86505
2784 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2785 across a va-arg-pack using call adjust its return value accordingly.
2786
2787 2018-08-16 Martin Sebor <msebor@redhat.com>
2788
2789 PR tree-optimization/86853
2790 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2791 (struct fmtresult): Add member and initialize it in ctors.
2792 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2793 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2794 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2795 (parse_directive): Handle %C same as %c.
2796 (sprintf_dom_walker::compute_format_length): Adjust.
2797 (is_call_safe): Adjust.
2798
2799 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2800
2801 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2802 for determining how to count the elements.
2803 * builtins.h (c_strlen): Adjust prototype.
2804 * expr.c (string_constant): Add new parameter mem_size.
2805 Set *mem_size appropriately.
2806 * expr.h (string_constant): Adjust protoype.
2807 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2808 * gimple-fold.h (get_range_strlen): Adjust prototype.
2809 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2810 (format_string): Call get_string_length with eltsize.
2811
2812 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2813
2814 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2815 to emit the span, rather than setting it as the prefix.
2816
2817 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2818
2819 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2820 "margin_char" parameter, defaulting to space. Use it in place
2821 of pp_space for the initial part of the margin.
2822 (layout::print_leading_fixits): Use '+' when filling the margin
2823 of line-insertion fix-it hints.
2824
2825 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2826
2827 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2828 Delete.
2829
2830 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2831
2832 * config/rs6000/altivec.md: Don't set length attribute to the default
2833 value.
2834 * config/rs6000/darwin.md: Ditto.
2835 * config/rs6000/dfp.md: Ditto.
2836 * config/rs6000/htm.md: Ditto.
2837 * config/rs6000/rs6000.md: Ditto.
2838 * config/rs6000/sync.md: Ditto.
2839 * config/rs6000/vsx.md: Ditto.
2840
2841 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2842
2843 * config/rs6000/altivec.md: Don't set length attribute to the default
2844 value, for branch instructions.
2845 * config/rs6000/darwin.md: Ditto.
2846 * config/rs6000/rs6000.md: Ditto.
2847
2848 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2849
2850 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2851 (unnamed conditional branch define_insn): Set length to 4 or 8
2852 depending on offset.
2853 (<bd>_<mode>): Similar, for alternative 0.
2854 (<bd>tf_<mode>): Ditto.
2855
2856 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2857
2858 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2859
2860 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2861
2862 * doc/rtl.texi: Replace old RTX class names with new names.
2863
2864
2865 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2866
2867 * expmed.h (canonicalize_comparison): New declaration.
2868 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2869 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2870 * optabs.c (prepare_cmp_insn): Likewise.
2871 * rtl.h (unsigned_condition_p): New function which checks if a
2872 comparison operator is unsigned.
2873
2874 2018-08-16 Nathan Sidwell <nathan@acm.org>
2875
2876 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2877 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2878
2879 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2880
2881 PR target/84711
2882 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2883 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2884 (mov<mov>): ..this and enable unconditionally.
2885
2886 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2887
2888 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2889
2890 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2891
2892 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2893 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2894 "Common" with "Target".
2895
2896 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2897
2898 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2899 * doc/invoke.texi (mmitigate-rop): Remove.
2900 * config/i386/i386.c: Do not include "regrename.h".
2901 (ix86_rop_should_change_byte_p, reg_encoded_number)
2902 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2903 Remove.
2904 (ix86_reorg): Remove call to ix86_mitigate_rop.
2905 * config/i386/i386.md (attr "modrm_class"): Remove.
2906 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2907 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2908 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2909
2910 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2911
2912 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2913 allow folding of mergeh() and mergel() for the float and double types.
2914 (fold_mergehl_helper): Rework to handle building a permute tree
2915 for float vectors.
2916
2917 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2918
2919 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2920 for TARGET_SSE.
2921
2922 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2923
2924 * common.opt (fdiagnostics-show-labels): New option.
2925 * diagnostic-show-locus.c (class layout_range): Add field
2926 "m_label".
2927 (class layout): Add field "m_show_labels_p".
2928 (layout_range::layout_range): Add param "label" and use it to
2929 initialize m_label.
2930 (make_range): Pass in NULL for new "label" param of layout_range's
2931 ctor.
2932 (layout::layout): Initialize m_show_labels_p.
2933 (layout::maybe_add_location_range): Pass in loc_range->m_label
2934 when constructing layout_range instances.
2935 (struct line_label): New struct.
2936 (layout::print_any_labels): New member function.
2937 (layout::print_line): Call it if label-printing is enabled.
2938 (selftest::test_one_liner_labels): New test.
2939 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2940 * diagnostic.c (diagnostic_initialize): Initialize
2941 context->show_labels_p.
2942 * diagnostic.h (struct diagnostic_context): Add field
2943 "show_labels_p".
2944 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2945 -fno-diagnostics-show-labels.
2946 * dwarf2out.c (gen_producer_string): Add
2947 OPT_fdiagnostics_show_labels to the ignored options.
2948 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2949 param.
2950 (gcc_rich_location::maybe_add_expr): Likewise.
2951 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2952 label" param, defaulting to NULL.
2953 (gcc_rich_location::add_expr): Add "label" param.
2954 (gcc_rich_location::maybe_add_expr): Likewise.
2955 (class text_range_label): New class.
2956 (class range_label_for_type_mismatch): New class.
2957 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2958 of format_warning_va.
2959 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2960 * lto-wrapper.c (merge_and_complain): Add
2961 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2962 (append_compiler_options): Likewise to the dropped options.
2963 (append_diag_options): Likewise to the passed-on options.
2964 * opts.c (common_handle_option): Handle the new option.
2965 * selftest-diagnostic.c
2966 (test_diagnostic_context::test_diagnostic_context): Enable
2967 show_labels_p.
2968 * substring-locations.c: Include "gcc-rich-location.h".
2969 (format_warning_n_va): Add "fmt_label" and "param_label" params
2970 and use them as appropriate.
2971 (format_warning_va): Add "fmt_label" and "param_label" params,
2972 passing them on to format_warning_n_va.
2973 (format_warning_at_substring): Likewise.
2974 (format_warning_at_substring_n): Likewise.
2975 * substring-locations.h (format_warning_va): Add "fmt_label" and
2976 "param_label" params.
2977 (format_warning_n_va): Likewise.
2978 (format_warning_at_substring): Likewise.
2979 (format_warning_at_substring_n): Likewise.
2980 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2981
2982 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2983
2984 PR testsuite/86519
2985 * builtins.c (expand_builtin_memcmp): Do not expand the call
2986 when overflow is detected.
2987
2988 2018-08-15 Martin Sebor <msebor@redhat.com>
2989
2990 PR tree-optimization/71625
2991 * config/aarch64/aarch64-builtins.c
2992 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2993
2994 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2995
2996 * config/s390/s390.c (s390_reorg): Remove loop.
2997
2998 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2999
3000 * config/darwin.c
3001 (darwin_function_switched_text_sections): Delete.
3002 * gcc/config/darwin.h
3003 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
3004
3005 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3006
3007 PR target/81685
3008 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
3009 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
3010 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
3011
3012 2018-08-15 Martin Liska <mliska@suse.cz>
3013
3014 PR tree-optimization/86925
3015 * predict.c (expr_expected_value_1): When taking
3016 later predictor, assign also probability.
3017 Use fold_build2_initializer_loc in order to fold
3018 the expression in -frounding-math.
3019
3020 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
3021
3022 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
3023 patterns.
3024 (expand_vec_perm_1): Try the new method.
3025
3026 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
3027
3028 PR target/86547
3029 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
3030 Check whether lra_live_max_point is 0 before dividing.
3031
3032 2018-08-14 Martin Sebor <msebor@redhat.com>
3033
3034 PR tree-optimization/86650
3035 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
3036 (vrp_prop::check_mem_ref): Same.
3037
3038 2018-08-13 Liu Hao <lh_mouse@126.com>
3039
3040 * pretty-print.c (eat_esc_sequence): Swap the foreground and
3041 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3042 and clear it thereafter, as it only works for DBCS.
3043
3044 2018-08-13 Liu Hao <lh_mouse@126.com>
3045
3046 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3047 handle returned by _get_osf_handle().
3048
3049 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3050
3051 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
3052 for folding vec_perm.
3053
3054 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3055
3056 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
3057 Add support for gimple-folding of vec_pack() and vec_unpack()
3058 intrinsics.
3059
3060 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3061
3062 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
3063 vec_xst variants to the list.
3064 (rs6000_gimple_fold_builtin): Add support for folding unaligned
3065 vector loads and stores.
3066
3067 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
3068
3069 * config.gcc (rs6000-ibm-aix4.x): Delete.
3070 (rs6000-ibm-aix5.1): Delete.
3071 (rs6000-ibm-aix5.2): Delete.
3072 (rs6000-ibm-aix5.3): Delete.
3073 * config/rs6000/aix43.h: Delete.
3074 * config/rs6000/aix51.h: Delete.
3075 * config/rs6000/aix52.h: Delete.
3076 * config/rs6000/t-aix43: Delete.
3077
3078 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
3079
3080 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3081 New function.
3082 (s390_decompose_address): Factor out constant pool ref
3083 decomposition.
3084
3085 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3086
3087 * config/nds32/nds32-predicates.c
3088 (nds32_can_use_bclr_p): Change return type as bool.
3089 (nds32_can_use_bset_p): Ditto.
3090 (nds32_can_use_btgl_p): Ditto.
3091 (nds32_can_use_bitci_p): Ditto.
3092 * config/nds32/nds32-protos.h
3093 (nds32_can_use_bclr_p): Change declaration.
3094 (nds32_can_use_bset_p): Ditto.
3095 (nds32_can_use_btgl_p): Ditto.
3096 (nds32_can_use_bitci_p): Ditto.
3097
3098 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3099
3100 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
3101 Support -msched-prolog-epilog option.
3102 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
3103
3104 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3105
3106 * common/config/nds32/nds32-common.c
3107 (nds32_option_optimization_table): Enalbe -malways-align.
3108
3109 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3110
3111 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
3112 extra_headers.
3113 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
3114 OPT_misr_secure_ case.
3115 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
3116 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
3117 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
3118 secure attribute.
3119 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
3120 (nds32_isr_info): New field security_level.
3121 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
3122 * config/nds32/nds32.md (return_internal): Consider critical attribute.
3123 * config/nds32/nds32.opt (misr-secure): New option.
3124 * config/nds32/nds32_init.inc: New file.
3125 * config/nds32/nds32_isr.h: New file.
3126
3127 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
3128
3129 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3130 Update comment for atomic instructions.
3131 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3132 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3133 Remove.
3134 (atomic_loaddi): Revise fence expansion to only emit fence prior to
3135 load for __ATOMIC_SEQ_CST model.
3136 (atomic_loaddi_1): Remove float register target.
3137 (atomic_storedi): Handle CONST_INT values.
3138 (atomic_storedi_1): Remove float register source. Add special case
3139 for zero value.
3140 (memory_barrier): New expander and insn.
3141
3142 2018-08-11 Jakub Jelinek <jakub@redhat.com>
3143
3144 PR tree-optimization/86835
3145 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3146 new_stmt after def_gsi, make sure to insert new_square_stmt after
3147 that stmt, not 2 stmts before it.
3148
3149 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
3150
3151 PR target/82418
3152 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
3153 instead of SWI48.
3154
3155 2018-08-10 Martin Liska <mliska@suse.cz>
3156
3157 PR target/83610
3158 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
3159 function type.
3160 * builtins.c (expand_builtin_expect_with_probability):
3161 New function.
3162 (expand_builtin_expect_with_probability): New function.
3163 (build_builtin_expect_predicate): Add new argumnet probability
3164 for BUILT_IN_EXPECT_WITH_PROBABILITY.
3165 (fold_builtin_expect):
3166 (fold_builtin_2):
3167 (fold_builtin_3):
3168 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
3169 * builtins.h (fold_builtin_expect): Set new argument.
3170 * doc/extend.texi: Document __builtin_expect_with_probability.
3171 * doc/invoke.texi: Likewise.
3172 * gimple-fold.c (gimple_fold_call): Pass new argument.
3173 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
3174 also BUILT_IN_EXPECT_WITH_PROBABILITY.
3175 * predict.c (get_predictor_value): New function.
3176 (expr_expected_value): Add new argument probability. Assume
3177 that predictor and probability are always non-null.
3178 (expr_expected_value_1): Likewise. For __builtin_expect and
3179 __builtin_expect_with_probability set probability. Handle
3180 combination in binary expressions.
3181 (tree_predict_by_opcode): Simplify code by simply calling
3182 get_predictor_value.
3183 (pass_strip_predict_hints::execute): Add handling of
3184 BUILT_IN_EXPECT_WITH_PROBABILITY.
3185 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
3186 new predictor.
3187 * tree.h (DECL_BUILT_IN_P): New function.
3188
3189 2018-08-10 Martin Liska <mliska@suse.cz>
3190
3191 PR tree-optimization/85799
3192 * passes.def: Add argument for pass_strip_predict_hints.
3193 * predict.c (class pass_strip_predict_hints): Add new argument
3194 early_p.
3195 (strip_predictor_early): New function.
3196 (pass_strip_predict_hints::execute): Call the function to
3197 strip predictors.
3198 (strip_predict_hints): New function.
3199 * predict.def: Fix comment.
3200
3201 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3202
3203 * Makefile.in: Clarify which tm.texi to copy over to assert the
3204 right to grant a GFDL license for all.
3205
3206 2018-08-09 Jeff Law <law@redhat.com>
3207
3208 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
3209 unused variable.
3210
3211 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
3212
3213 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
3214 prototype.
3215
3216 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3217
3218 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
3219 reductions for variable-length vectors.
3220
3221 2018-08-09 David Malcolm <dmalcolm@redhat.com>
3222
3223 PR other/84889
3224 * common.opt (fdiagnostics-show-line-numbers): New option.
3225 * diagnostic-show-locus.c (class layout): Add fields
3226 "m_show_line_numbers_p" and "m_linenum_width";
3227 (num_digits): New function.
3228 (test_num_digits): New function.
3229 (layout::layout): Initialize new fields. Update m_x_offset
3230 logic to handle any left margin.
3231 (layout::print_source_line): Print line number when requested.
3232 (layout::start_annotation_line): New member function.
3233 (layout::print_annotation_line): Call it.
3234 (layout::print_leading_fixits): Likewise.
3235 (layout::print_trailing_fixits): Likewise. Update calls to
3236 move_to_column for new parameter.
3237 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
3238 it to potentially call start_annotation_line.
3239 (layout::show_ruler): Call start_annotation_line.
3240 (selftest::test_line_numbers_multiline_range): New selftest.
3241 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
3242 and selftest::test_line_numbers_multiline_range.
3243 * diagnostic.c (diagnostic_initialize): Initialize
3244 show_line_numbers_p.
3245 * diagnostic.h (struct diagnostic_context): Add field
3246 "show_line_numbers_p".
3247 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3248 -fno-diagnostics-show-line-numbers.
3249 * dwarf2out.c (gen_producer_string): Add
3250 OPT_fdiagnostics_show_line_numbers to the ignored options.
3251 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
3252 one setting" options.
3253 (append_compiler_options): Likewise to the dropped options.
3254 (append_diag_options): Likewise to the passed-on options.
3255 * opts.c (common_handle_option): Handle the new option.
3256 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
3257
3258 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
3259
3260 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
3261 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
3262 third argument of type "const signed char" to descriptions of
3263 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
3264 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
3265 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
3266 __builtin_bcdsub_ov functions.
3267
3268 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3269
3270 PR tree-optimization/86858
3271 * tree-vect-loop.c (vect_is_simple_reduction): Restore
3272 flow_bb_inside_loop_p calls.
3273
3274 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3275
3276 PR tree-optimization/86871
3277 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3278 instead of gimple_assign_lhs.
3279
3280 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
3281
3282 PR target/86887
3283 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
3284 register constraint to operand 0.
3285 (add<mode>3_carryinC): Likewise.
3286 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
3287
3288 2018-08-09 Martin Liska <mliska@suse.cz>
3289
3290 PR c/86895
3291 * common.opt: Remove extra line.
3292
3293 2018-08-09 Martin Liska <mliska@suse.cz>
3294
3295 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
3296 at the end of a line, make first letter capital and end up
3297 a sentence with a dot.
3298 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
3299 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
3300 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
3301 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
3302 (PARAM_MAX_ISL_OPERATIONS): Likewise.
3303 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
3304 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
3305 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
3306 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
3307 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
3308 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
3309 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
3310 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
3311 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
3312 (PARAM_TREE_REASSOC_WIDTH): Likewise.
3313 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
3314 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
3315 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
3316
3317 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
3318
3319 PR target/84332
3320 * config/s390/s390.c (s390_option_override_internal): Reduce the
3321 stack-clash-protection-probe-interval param if it would be too big
3322 for z900.
3323
3324 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
3325
3326 PR target/46179
3327 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
3328 * config/m68k/m68k.c (handle_move_double): Don't call
3329 m68k_final_prescan_insn.
3330 (m68k_adjust_decorated_operand): Renamed from
3331 m68k_final_prescan_insn, remove first and third operand and
3332 simplify.
3333 (print_operand): Call it.
3334 (print_operand_address): Call it.
3335
3336 2018-08-08 Nathan Sidwell <nathan@acm.org>
3337
3338 * diagnostic.c (diagnostic_report_current_module): Use
3339 linemap_included_from & linemap_included_from_linemap.
3340
3341 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
3342
3343 * config/aarch64/aarch64-cores.def: Add phecda core.
3344 * config/aarch64/aarch64-tune.md: Regenerate.
3345 * doc/invoke.texi: Add phecda core.
3346
3347 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3348
3349 PR target/85295
3350 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3351 definitions.
3352 * config/s390/s390.md ("movti"): Add more alternatives for
3353 constant to GPR copies.
3354
3355 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3356
3357 * config/s390/s390.c: Fix whitespace damage throughout the file.
3358 * config/s390/s390.h: Likewise.
3359 * config/s390/tpf.h: Likewise.
3360
3361 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3362
3363 * config/s390/s390.c (s390_loadrelative_operand_p):
3364 Remove TARGET_CPU_ZARCH usages.
3365 (s390_rtx_costs): Likewise.
3366 (s390_legitimate_constant_p): Likewise.
3367 (s390_cannot_force_const_mem): Likewise.
3368 (legitimate_reload_constant_p): Likewise.
3369 (s390_preferred_reload_class): Likewise.
3370 (legitimize_pic_address): Likewise.
3371 (legitimize_tls_address): Likewise.
3372 (s390_split_branches): Removed.
3373 (s390_add_execute): Removed.
3374 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3375 (s390_mainpool_start): Likewise.
3376 (s390_mainpool_finish): Likewise.
3377 (s390_mainpool_cancel): Removed.
3378 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3379 (s390_chunkify_cancel): Likewise.
3380 (s390_return_addr_rtx): Likewise.
3381 (s390_register_info): Remove split_branches_pending_p uages.
3382 (s390_optimize_register_info): Likewise.
3383 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3384 split_branches_pending_p usages.
3385 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3386 (s390_load_got): Likewise.
3387 (s390_expand_split_stack_prologue): Likewise.
3388 (output_asm_nops): Likewise.
3389 (s390_function_profiler): Likewise.
3390 (s390_emit_call): Likewise.
3391 (s390_conditional_register_usage): Likewise.
3392 (s390_optimize_prologue): Likewise.
3393 (s390_reorg): Remove TARGET_CPU_ZARCH and
3394 split_branches_pending_p usages.
3395 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3396 usages.
3397 (s390_output_indirect_thunk_function): Likewise.
3398 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3399 (TARGET_CPU_ZARCH_P): Removed.
3400 (struct machine_function): Remove split_branches_pending_p.
3401 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3402
3403 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3404
3405 * common/config/s390/s390-common.c (processor_flags_table):
3406 Remove flags.
3407 * config.gcc: Remove with_arch/with_tune support.
3408 * config/s390/2064.md: Remove cpu attribute comparisons.
3409 * config/s390/driver-native.c (s390_host_detect_local_cpu):
3410 Remove MTN.
3411 * config/s390/linux.h (ASM_SPEC):
3412 Remove -march support.
3413 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3414 Use a table to get an arch level.
3415 * config/s390/s390-opts.h (enum processor_type):
3416 Remove enum values.
3417 * config/s390/s390.c
3418 (processor_table): Remove entries, add arch_level values.
3419 (s390_issue_rate): Remove cases.
3420 (s390_option_override): Adjust
3421 s390_option_override_internal() call.
3422 (s390_option_override_internal): Remove deprecation warning.
3423 (s390_valid_target_attribute_tree): Adjust
3424 s390_option_override_internal() call.
3425 * config/s390/s390.h (struct s390_processor):
3426 Share with s390-c.c, add arch_level field.
3427 * config/s390/s390.md:
3428 Remove occurrences in cpu attribute.
3429 * config/s390/s390.opt: Remove -march/-mtune support.
3430 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3431 * doc/invoke.texi: Remove deprecation warning.
3432
3433 2018-08-08 Luis Machado <luis.machado@linaro.org>
3434
3435 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3436 global.
3437 (qdf24xx_tunings): Set vector cost structure to
3438 qdf24xx_vector_cost.
3439
3440 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3441 <register_sextend>: Set to 3.
3442
3443 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
3444
3445 PR target/86838
3446 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3447 * config/aarch64/aarch64-simd.md
3448 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3449 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3450 (aarch64_frecpx<mode>): ...this new pattern.
3451 * config/aarch64/aarch64-simd-builtins.def: Remove comment
3452 about aarch64_frecp<FRECP:frecp_suffix><mode>.
3453
3454 2018-08-07 Martin Liska <mliska@suse.cz>
3455
3456 PR middle-end/83023
3457 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3458 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3459 * predict.def (PRED_MALLOC_NONNULL): New predictor.
3460 * doc/extend.texi: Document that malloc attribute adds
3461 hit to compiler.
3462
3463 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
3464
3465 PR target/86785
3466 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3467 Define to speculation_safe_value_not_needed.
3468
3469 2018-08-06 Jeff Law <law@redhat.com>
3470
3471 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3472 the vr_values instance to cprop_into_stmt.
3473 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3474 (cprop_operand): Also query EVRP to determine if OP is a constant.
3475
3476 2018-08-06 Nathan Sidwell <nathan@acm.org>
3477
3478 * diagnostic.c (diagnostic_report_current_module): Reroll
3479 included-at loop. Translate text.
3480
3481 2018-08-06 David Malcolm <dmalcolm@redhat.com>
3482
3483 * function-tests.c (selftest::test_expansion_to_rtl): Call
3484 free_after_compilation.
3485
3486 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3487
3488 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3489
3490 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
3491
3492 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3493 loops with memory block operations from getting unrolled.
3494
3495 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
3496
3497 PR target/86807
3498 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3499 Define to speculation_safe_value_not_needed.
3500
3501 2018-08-06 Jeff Law <law@redhat.com>
3502
3503 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3504 assert.
3505
3506 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3507
3508 PR target/86662
3509 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3510 with all enabled __intN types.
3511
3512 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3513
3514 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3515
3516 * alias.c (record_set): Check for clobber high.
3517 * cfgexpand.c (expand_gimple_stmt): Likewise.
3518 * combine-stack-adj.c (single_set_for_csa): Likewise.
3519 * combine.c (find_single_use_1): Likewise.
3520 (set_nonzero_bits_and_sign_copies): Likewise.
3521 (get_combine_src_dest): Likewise.
3522 (is_parallel_of_n_reg_sets): Likewise.
3523 (try_combine): Likewise.
3524 (record_dead_and_set_regs_1): Likewise.
3525 (reg_dead_at_p_1): Likewise.
3526 (reg_dead_at_p): Likewise.
3527 * dce.c (deletable_insn_p): Likewise.
3528 (mark_nonreg_stores_1): Likewise.
3529 (mark_nonreg_stores_2): Likewise.
3530 * df-scan.c (df_find_hard_reg_defs): Likewise.
3531 (df_uses_record): Likewise.
3532 (df_get_call_refs): Likewise.
3533 * dwarf2out.c (mem_loc_descriptor): Likewise.
3534 * haifa-sched.c (haifa_classify_rtx): Likewise.
3535 * ira-build.c (create_insn_allocnos): Likewise.
3536 * ira-costs.c (scan_one_insn): Likewise.
3537 * ira.c (equiv_init_movable_p): Likewise.
3538 (rtx_moveable_p): Likewise.
3539 (interesting_dest_for_shprep): Likewise.
3540 * jump.c (mark_jump_label_1): Likewise.
3541 * postreload-gcse.c (record_opr_changes): Likewise.
3542 * postreload.c (reload_cse_simplify): Likewise.
3543 (struct reg_use): Add source expr.
3544 (reload_combine): Check for clobber high.
3545 (reload_combine_note_use): Likewise.
3546 (reload_cse_move2add): Likewise.
3547 (move2add_note_store): Likewise.
3548 * print-rtl.c (print_pattern): Likewise.
3549 * recog.c (decode_asm_operands): Likewise.
3550 (store_data_bypass_p): Likewise.
3551 (if_test_bypass_p): Likewise.
3552 * regcprop.c (kill_clobbered_value): Likewise.
3553 (kill_set_value): Likewise.
3554 * reginfo.c (reg_scan_mark_refs): Likewise.
3555 * reload1.c (maybe_fix_stack_asms): Likewise.
3556 (eliminate_regs_1): Likewise.
3557 (elimination_effects): Likewise.
3558 (mark_not_eliminable): Likewise.
3559 (scan_paradoxical_subregs): Likewise.
3560 (forget_old_reloads_1): Likewise.
3561 * reorg.c (find_end_label): Likewise.
3562 (try_merge_delay_insns): Likewise.
3563 (redundant_insn): Likewise.
3564 (own_thread_p): Likewise.
3565 (fill_simple_delay_slots): Likewise.
3566 (fill_slots_from_thread): Likewise.
3567 (dbr_schedule): Likewise.
3568 * resource.c (update_live_status): Likewise.
3569 (mark_referenced_resources): Likewise.
3570 (mark_set_resources): Likewise.
3571 * rtl.c (copy_rtx): Likewise.
3572 * rtlanal.c (reg_referenced_p): Likewise.
3573 (single_set_2): Likewise.
3574 (noop_move_p): Likewise.
3575 (note_stores): Likewise.
3576 * sched-deps.c (sched_analyze_reg): Likewise.
3577 (sched_analyze_insn): Likewise.
3578
3579 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3580
3581 * cse.c (invalidate_reg): New function extracted from...
3582 (invalidate): ...here.
3583 (canonicalize_insn): Check for clobber high.
3584 (invalidate_from_clobbers): invalidate clobber highs.
3585 (invalidate_from_sets_and_clobbers): Likewise.
3586 (count_reg_usage): Check for clobber high.
3587 (insn_live_p): Likewise.
3588 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3589 (cselib_invalidate_regno): Check for clobber in setter.
3590 (cselib_invalidate_rtx): Pass through setter.
3591 (cselib_invalidate_rtx_note_stores):
3592 (cselib_process_insn): Check for clobber high.
3593 * cselib.h (cselib_invalidate_rtx): Add operand.
3594
3595 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3596
3597 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3598 (mark_not_eliminable): Likewise.
3599 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3600 * lra-lives.c (process_bb_lives): Check for clobber high.
3601 * lra.c (new_insn_reg): Remember clobber highs.
3602 (collect_non_operand_hard_regs): Check for clobber high.
3603 (lra_set_insn_recog_data): Likewise.
3604 (add_regs_to_insn_regno_info): Likewise.
3605 (lra_update_insn_regno_info): Likewise.
3606
3607 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3608
3609 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3610 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3611
3612 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3613
3614 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3615 (copy_insn_1): Likewise.
3616 (gen_hard_reg_clobber_high): New gen function.
3617 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3618 * genemit.c (gen_exp): Likewise.
3619 (gen_emit_seq): Pass through info.
3620 (gen_insn): Check for CLOBBER_HIGH.
3621 (gen_expand): Pass through info.
3622 (gen_split): Likewise.
3623 (output_add_clobbers): Likewise.
3624 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3625 (remove_clobbers): Likewise.
3626 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3627
3628 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3629
3630 * doc/rtl.texi (clobber_high): Add.
3631 (parallel): Add in clobber high
3632 * rtl.c (rtl_check_failed_code3): Add function.
3633 * rtl.def (CLOBBER_HIGH): Add expression.
3634 * rtl.h (RTL_CHECKC3): Add macro.
3635 (rtl_check_failed_code3): Add declaration.
3636 (XC3EXP): Add macro.
3637
3638 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3639
3640 PR target/86386
3641 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3642 cfun->machine->max_used_stack_alignment if needed.
3643
3644 2018-08-04 Martin Sebor <msebor@redhat.com>
3645
3646 PR tree-optimization/86571
3647 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3648 NaN output to 4.
3649
3650 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3651
3652 PR target/86799
3653 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3654 Define.
3655
3656 2018-08-03 Jeff Law <law@redhat.com>
3657
3658 PR target/86795
3659 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3660 Define to speculation_safe_value_not_needed.
3661
3662 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3663
3664 * doc/gcov.texi (-x): Remove duplicate "to".
3665 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3666 (-Wif-not-aligned): Remove duplicate "is".
3667 (-flto): Remove duplicate "the".
3668 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3669 duplicate "v5.00.b".
3670 (MSP430 Options): Remove duplicate "and" from the description
3671 of "-mgprel-sec=regexp".
3672 (x86 Options): Remove duplicate copies of "vmldLog102" and
3673 vmlsLog104 from description of "-mveclibabi=type".
3674
3675 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3676
3677 * internal-fn.h (first_commutative_argument): Declare.
3678 * internal-fn.c (first_commutative_argument): New function.
3679 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3680 restrictions for pattern statements. Use first_commutative_argument
3681 to look for commutative operands in calls to internal functions.
3682
3683 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3684
3685 * Makefile.in (wide-int-range.o): New.
3686 * tree-vrp.c: Move all the wide_int_* functions to...
3687 * wide-int-range.cc: ...here.
3688 * tree-vrp.h: Move all the wide_int_* prototypes to...
3689 * wide-int-range.h: ...here.
3690
3691 2018-08-03 Tom de Vries <tdevries@suse.de>
3692
3693 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3694 UI_NONE.
3695 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3696 * except.c (output_function_exception_table): Do early exit if
3697 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3698
3699 2018-08-03 Martin Liska <mliska@suse.cz>
3700
3701 * predict.c (dump_prediction): Change to 2 digits
3702 in fraction part.
3703
3704 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3705
3706 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3707 neon_dup_q to...
3708 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3709
3710 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3711
3712 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3713 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3714 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3715 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3716 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3717
3718 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3719
3720 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3721 pp_take_prefix when saving the existing prefix.
3722 * diagnostic.c (diagnostic_append_note): Likewise.
3723 * langhooks.c (lhd_print_error_function): Likewise.
3724 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3725 param's type. Free the existing prefix.
3726 (pp_take_prefix): New function.
3727 (pretty_printer::pretty_printer): Drop the prefix parameter.
3728 Rename the length parameter to match the comment.
3729 (pretty_printer::~pretty_printer): Free the prefix.
3730 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3731 parameter.
3732 (struct pretty_printer): Drop the "const" from "prefix" field's
3733 type and clarify memory management.
3734 (pp_set_prefix): Drop the "const" from the 2nd param.
3735 (pp_take_prefix): New decl.
3736
3737 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3738
3739 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3740 for word_mode_ok here instead of passing as argument.
3741 (expand_block_compare): Change select_block_compare_mode() call.
3742 (expand_strncmp_gpr_sequence): New function.
3743 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3744
3745 2018-08-02 Jeff Law <law@redhat.com>
3746
3747 PR target/86790
3748 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3749 Define to speculation_safe_value_not_needed.
3750
3751 PR target/86784
3752 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3753 Define to speculation_safe_value_not_needed.
3754
3755 2018-08-02 Tom de Vries <tdevries@suse.de>
3756
3757 PR target/86660
3758 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3759 function. Return UI_TARGET unconditionally.
3760 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3761 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3762
3763 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3764
3765 * genemit.c (print_overload_test): Fix typo.
3766
3767 2018-08-02 Richard Biener <rguenther@suse.de>
3768
3769 PR tree-optimization/86816
3770 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3771 which checks for value availability before querying it.
3772 (gvn_uses_equal): Use it.
3773 (same_succ_hash): Likewise.
3774 (gimple_equal_p): Likewise.
3775
3776 2018-08-02 Nick Clifton <nickc@redhat.com>
3777
3778 PR target/86813
3779 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3780 Define to speculation_safe_value_not_needed.
3781
3782 PR target/86810
3783 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3784 Define to speculation_safe_value_not_needed.
3785
3786 PR target/86810
3787 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3788 Define to speculation_safe_value_not_needed.
3789
3790 PR target/86803
3791 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3792 Define to speculation_safe_value_not_needed.
3793
3794 PR target/86797
3795 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3796 Define to speculation_safe_value_not_needed.
3797
3798 PR target/86791
3799 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3800 Define to speculation_safe_value_not_needed.
3801
3802 PR target/86789
3803 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3804 Define to speculation_safe_value_not_needed.
3805
3806 PR target/86787
3807 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3808 Define to speculation_safe_value_not_needed.
3809
3810 PR target/86782
3811 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3812 speculation_safe_value_not_needed.
3813
3814 PR target/86781
3815 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3816 to speculation_safe_value_not_needed.
3817
3818 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3819
3820 * doc/md.texi: Expand the documentation of instruction names
3821 to mention port-local uses. Document '@' in pattern names.
3822 * read-md.h (overloaded_instance, overloaded_name): New structs.
3823 (mapping): Declare.
3824 (md_reader::handle_overloaded_name): New member function.
3825 (md_reader::get_overloads): Likewise.
3826 (md_reader::m_first_overload): New member variable.
3827 (md_reader::m_next_overload_ptr): Likewise.
3828 (md_reader::m_overloads_htab): Likewise.
3829 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3830 m_next_overload_ptr and m_overloads_htab.
3831 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3832 (get_mode_token, get_code_token, get_int_token): New functions.
3833 (map_attr_string): Add an optional argument that passes back
3834 the associated iterator.
3835 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3836 (md_reader::handle_overloaded_name, add_overload_instance): New
3837 functions.
3838 (apply_iterators): Handle '@' names. Report an error if '@'
3839 is used without iterators.
3840 (initialize_iterators): Initialize the new iterator_group fields.
3841 * genopinit.c (handle_overloaded_code_for)
3842 (handle_overloaded_gen): New functions.
3843 (main): Use them to print declarations of maybe_code_for_* and
3844 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3845 * genemit.c (print_overload_arguments, print_overload_test)
3846 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3847 (main): Use it to print definitions of maybe_code_for_* and
3848 maybe_gen_* functions.
3849 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3850 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3851 instead of explicit mode checks.
3852 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3853 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3854 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3855 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3856 (aarch64_expand_compare_and_swap): Likewise
3857 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3858 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3859 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3860 (aarch64_constant_pool_reload_icode): Delete.
3861 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3862 instead of aarch64_constant_pool_reload_icode. Use
3863 code_for_aarch64_reload_mov instead of explicit mode checks.
3864 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3865 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3866 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3867 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3868 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3869 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3870 (aarch64_atomic_load_op_code): Delete.
3871 (aarch64_emit_atomic_load_op): Likewise.
3872 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3873 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3874 instead of aarch64_emit_atomic_load_op.
3875 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3876 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3877 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3878 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3879 character before the pattern name.
3880 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3881 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3882 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3883 (aarch64_frecps<mode>): Likewise.
3884 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3885 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3886 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3887 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3888 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3889
3890 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3891
3892 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3893 Allow HFmode constants if TARGET_FP_F16INST.
3894
3895 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3896
3897 PR target/86014
3898 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3899 No longer check last store for clobber of address register.
3900
3901 2018-08-02 Martin Liska <mliska@suse.cz>
3902
3903 PR gcov-profile/86817
3904 * gcov.c (process_all_functions): New function.
3905 (main): Call it.
3906 (process_file): Move functions processing to
3907 process_all_functions.
3908
3909 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3910
3911 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3912 "const" to the "gimple *" and "rtx_insn *" parameters.
3913 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3914 Likewise.
3915 (dump_location_t::dump_location_t): Likewise.
3916
3917 2018-08-01 Martin Sebor <msebor@redhat.com>
3918
3919 PR tree-optimization/86650
3920 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3921 rather than a "gcall *". Directly pass the data of interest
3922 to percent_K_format, rather than building a temporary CALL_EXPR
3923 to hold it.
3924 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3925 (gimple_fold_builtin_strncat): Adjust.
3926 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3927 gcall* argument with gimple*.
3928 * gimple-ssa-warn-restrict.c (check_call): Same.
3929 (wrestrict_dom_walker::before_dom_children): Same.
3930 (builtin_access::builtin_access): Same.
3931 (check_bounds_or_overlap): Same
3932 (maybe_diag_overlap): Same.
3933 (maybe_diag_offset_bounds): Same.
3934 * tree-diagnostic.c (default_tree_printer): Move usage of
3935 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3936 to this callsite.
3937 * tree-pretty-print.c (percent_K_format): Add argument.
3938 * tree-pretty-print.h: Add argument.
3939 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3940 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3941 (maybe_diag_stxncpy_trunc): Same.
3942 (handle_builtin_stxncpy): Same.
3943 (handle_builtin_strcat): Same.
3944
3945 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3946
3947 * match.pd: Optimise pointer range checks.
3948
3949 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3950
3951 PR tree-optimization/86758
3952 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3953 to remove pattern statements.
3954
3955 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3956
3957 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3958 result of dfs_enumerate_from when constructing stmt_vec_infos,
3959 instead of additionally calling get_loop_body.
3960
3961 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3962
3963 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3964 parameter.
3965 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3966 When creating an iv, assert that the step is not known to be zero.
3967 (vect_setup_realignment): Update call accordingly.
3968 * tree-vect-stmts.c (vectorizable_store): Likewise.
3969 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3970
3971 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3972
3973 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3974 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3975 (vectorizable_reduction): Likewise.
3976 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3977 (vect_detect_hybrid_slp_stmts): Likewise.
3978 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3979
3980 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3981
3982 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3983 (wide_int_set_zero_nonzero_bits): ...this.
3984 (zero_nonzero_bits_from_vr): Rename to...
3985 (vrp_set_zero_nonzero_bits): ...this.
3986 (extract_range_from_multiplicative_op_1): Abstract wide int
3987 code...
3988 (wide_int_range_multiplicative_op): ...here.
3989 (extract_range_from_binary_expr_1): Extract wide int binary
3990 operations into their own functions.
3991 (wide_int_range_lshift): New.
3992 (wide_int_range_can_optimize_bit_op): New.
3993 (wide_int_range_shift_undefined_p): New.
3994 (wide_int_range_bit_xor): New.
3995 (wide_int_range_bit_ior): New.
3996 (wide_int_range_bit_and): New.
3997 (wide_int_range_trunc_mod): New.
3998 (extract_range_into_wide_ints): New.
3999 (vrp_shift_undefined_p): New.
4000 (extract_range_from_multiplicative_op): New.
4001 (vrp_can_optimize_bit_op): New.
4002 * tree-vrp.h (value_range::dump): New.
4003 (wide_int_range_multiplicative_op): New.
4004 (wide_int_range_lshift):New.
4005 (wide_int_range_shift_undefined_p): New.
4006 (wide_int_range_bit_xor): New.
4007 (wide_int_range_bit_ior): New.
4008 (wide_int_range_bit_and): New.
4009 (wide_int_range_trunc_mod): New.
4010 (zero_nonzero_bits_from_bounds): Rename to...
4011 (wide_int_set_zero_nonzero_bits): ...this.
4012 (zero_nonzero_bits_from_vr): Rename to...
4013 (vrp_set_zero_nonzero_bits): ...this.
4014 (range_easy_mask_min_max): Rename to...
4015 (wide_int_range_can_optimize_bit_op): this.
4016 * vr-values.c (simplify_bit_ops_using_ranges): Rename
4017 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
4018
4019 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4020
4021 * tree-vectorizer.h (vect_orig_stmt): New function.
4022 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
4023 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
4024 (vect_create_epilog_for_reduction): Likewise.
4025 (vectorizable_live_operation): Likewise.
4026 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4027 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
4028 * tree-vect-stmts.c (vectorizable_call): Likewise.
4029 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
4030
4031 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4032
4033 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
4034 argument.
4035 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
4036 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
4037 (vect_transform_loop): Likewise.
4038 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4039
4040 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4041
4042 * tree-vectorizer.h (vect_schedule_slp): Return void.
4043 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4044 (vect_schedule_slp): Likewise.
4045
4046 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4047
4048 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
4049 argument.
4050 (vect_transform_loop): Update calls accordingly. Schedule SLP
4051 instances before the main loop, if any exist.
4052
4053 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4054
4055 PR tree-optimization/86749
4056 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
4057 If the lhs is used in a COND_EXPR, check that it is being used
4058 as the "then" or "else" value.
4059
4060 2018-08-01 Tom de Vries <tdevries@suse.de>
4061
4062 PR target/86800
4063 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4064 speculation_safe_value_not_needed.
4065
4066 2018-08-01 Richard Biener <rguenther@suse.de>
4067
4068 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
4069 as base and offset.
4070
4071 2018-08-01 Martin Liska <mliska@suse.cz>
4072
4073 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
4074 format how successful transformation is dumped.
4075 (gimple_mod_pow2_value_transform): Likewise.
4076 (gimple_mod_subtract_transform): Likewise.
4077 (gimple_stringops_transform): Likewise.
4078
4079 2018-08-01 Martin Liska <mliska@suse.cz>
4080
4081 PR value-prof/35543
4082 * value-prof.c (interesting_stringop_to_profile_p):
4083 Simplify the code and add BUILT_IN_MEMMOVE.
4084 (gimple_stringops_transform): Likewise.
4085
4086 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
4087
4088 * config/aarch64/aarch64-simd.md
4089 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
4090 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
4091 use GPI iterator instead of SI mode.
4092
4093 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4094
4095 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
4096 rs6000_speculation_barrier.
4097 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
4098 new barrier pattern name.
4099
4100 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4101
4102 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
4103 (speculation_barrier): New insn.
4104
4105 2018-08-01 Richard Biener <rguenther@suse.de>
4106
4107 PR bootstrap/86724
4108 * graphite.h: Include isl/id.h and isl/space.h to allow build
4109 with ISL 0.20.
4110
4111 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
4112
4113 PR target/86651
4114 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4115 mode for COFF targets.
4116 * defaults.h (TARGET_COFF): Define.
4117 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
4118 TARGET_COFF): Define.
4119 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
4120 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
4121 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
4122
4123 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4124
4125 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
4126 * gimple-streamer-out.c (output_bb): Save it.
4127 * lto-streamer-in.c (input_struct_function_base): Restore
4128 instance discriminator if available. Create map on demand.
4129 * lto-streamer-out.c (output_struct_function_base): Save it if
4130 available.
4131 * final.c (decl_to_instance_map): Document LTO strategy.
4132
4133 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4134 Olivier Hainque <hainque@adacore.com>
4135
4136 * debug.h (decl_to_instance_map_t): New type.
4137 (decl_to_instance_map): Declare.
4138 (maybe_create_decl_to_instance_map): New inline function.
4139 * final.c (bb_discriminator, last_bb_discriminator): New statics,
4140 to track basic block discriminators.
4141 (final_start_function_1): Initialize them.
4142 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
4143 bb_discriminator.
4144 (decl_to_instance_map): New variable.
4145 (map_decl_to_instance, maybe_set_discriminator): New functions.
4146 (notice_source_line): Set discriminator.
4147
4148 2018-07-31 Ian Lance Taylor <iant@golang.org>
4149
4150 * targhooks.c (default_have_speculation_safe_value): Add
4151 ATTRIBUTE_UNUSED.
4152
4153 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4154
4155 * dump-context.h: Include "pretty-print.h".
4156 (dump_context::refresh_dumps_are_enabled): New decl.
4157 (dump_context::emit_item): New decl.
4158 (class dump_context): Add fields "m_test_pp" and
4159 "m_test_pp_flags".
4160 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4161 (temp_dump_context::get_dumped_text): New decl.
4162 (class temp_dump_context): Add field "m_pp".
4163 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
4164 (dump_context::refresh_dumps_are_enabled): ...and add a test for
4165 m_test_pp.
4166 (set_dump_file): Update for above change.
4167 (set_alt_dump_file): Likewise.
4168 (dump_loc): New overload, taking a pretty_printer *.
4169 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
4170 to any test pretty-printer.
4171 (make_item_for_dump_gimple_stmt): New function, adapted from
4172 optinfo::add_gimple_stmt.
4173 (dump_context::dump_gimple_stmt): Call it, and use the result,
4174 eliminating the direct usage of dump_file and alt_dump_file in
4175 favor of indirectly using them via emit_item.
4176 (make_item_for_dump_gimple_expr): New function, adapted from
4177 optinfo::add_gimple_expr.
4178 (dump_context::dump_gimple_expr): Call it, and use the result,
4179 eliminating the direct usage of dump_file and alt_dump_file in
4180 favor of indirectly using them via emit_item.
4181 (make_item_for_dump_generic_expr): New function, adapted from
4182 optinfo::add_tree.
4183 (dump_context::dump_generic_expr): Call it, and use the result,
4184 eliminating the direct usage of dump_file and alt_dump_file in
4185 favor of indirectly using them via emit_item.
4186 (make_item_for_dump_printf_va): New function, adapted from
4187 optinfo::add_printf_va.
4188 (make_item_for_dump_printf): New function.
4189 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
4190 and use the result, eliminating the direct usage of dump_file and
4191 alt_dump_file in favor of indirectly using them via emit_item.
4192 (make_item_for_dump_dec): New function.
4193 (dump_context::dump_dec): Call it, and use the result,
4194 eliminating the direct usage of dump_file and alt_dump_file in
4195 favor of indirectly using them via emit_item.
4196 (make_item_for_dump_symtab_node): New function, adapted from
4197 optinfo::add_symtab_node.
4198 (dump_context::dump_symtab_node): Call it, and use the result,
4199 eliminating the direct usage of dump_file and alt_dump_file in
4200 favor of indirectly using them via emit_item.
4201 (dump_context::begin_scope): Reimplement, avoiding direct usage
4202 of dump_file and alt_dump_file in favor of indirectly using them
4203 via emit_item.
4204 (dump_context::emit_item): New member function.
4205 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4206 Set up test pretty-printer on the underlying context. Call
4207 refresh_dumps_are_enabled.
4208 (temp_dump_context::~temp_dump_context): Call
4209 refresh_dumps_are_enabled.
4210 (temp_dump_context::get_dumped_text): New member function.
4211 (selftest::verify_dumped_text): New function.
4212 (ASSERT_DUMPED_TEXT_EQ): New macro.
4213 (selftest::test_capture_of_dump_calls): Run all tests twice, with
4214 and then without optinfo enabled. Add uses of
4215 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
4216 * dumpfile.h: Update comment for the dump_* API.
4217 * optinfo-emit-json.cc
4218 (selftest::test_building_json_from_dump_calls): Update for new
4219 param for temp_dump_context ctor.
4220 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
4221 and "m_owned" field.
4222 (optinfo_item::~optinfo_item): Likewise.
4223 (optinfo::add_item): New member function.
4224 (optinfo::emit): Update comment.
4225 (optinfo::add_string): Delete.
4226 (optinfo::add_printf): Delete.
4227 (optinfo::add_printf_va): Delete.
4228 (optinfo::add_gimple_stmt): Delete.
4229 (optinfo::add_gimple_expr): Delete.
4230 (optinfo::add_tree): Delete.
4231 (optinfo::add_symtab_node): Delete.
4232 (optinfo::add_dec): Delete.
4233 * optinfo.h (class dump_context): New forward decl.
4234 (optinfo::add_item): New decl.
4235 (optinfo::add_string): Delete.
4236 (optinfo::add_printf): Delete.
4237 (optinfo::add_printf_va): Delete.
4238 (optinfo::add_gimple_stmt): Delete.
4239 (optinfo::add_gimple_expr): Delete.
4240 (optinfo::add_tree): Delete.
4241 (optinfo::add_symtab_node): Delete.
4242 (optinfo::add_dec): Delete.
4243 (optinfo::add_poly_int): Delete.
4244 (optinfo_item::optinfo_item): Remove "owned" param.
4245 (class optinfo_item): Remove field "m_owned".
4246
4247 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4248
4249 PR middle-end/86705
4250 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
4251 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
4252 requested variable alignment.
4253 (expand_one_ssa_partition): Likewise.
4254 (expand_one_var): Likewise.
4255
4256 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4257
4258 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4259 to speculation_safe_value_not_needed.
4260
4261 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4262
4263 * targhooks.h (speculation_safe_value_not_needed): New prototype.
4264 * targhooks.c (speculation_safe_value_not_needed): New function.
4265 * target.def (have_speculation_safe_value): Update documentation.
4266 * doc/tm.texi: Regenerated.
4267
4268 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4269
4270 * config/aarch64/iterators.md (ALLI_TI): New iterator.
4271 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
4272 expand.
4273 (despeculate_copy<ALLI:mode>_insn): New insn.
4274 (despeculate_copyti_insn): New insn.
4275 (despeculate_simple<ALLI:mode>): New insn
4276 (despeculate_simpleti): New insn.
4277 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
4278 function.
4279 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
4280 aarch64_speculation_safe_value.
4281 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
4282
4283 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4284
4285 * config/aarch64/aarch64-speculation.cc: New file.
4286 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
4287 before pass_reorder_blocks.
4288 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
4289 prototype.
4290 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
4291 X14 and X15 when tracking speculation.
4292 * config/aarch64/aarch64.md (register name constants): Add
4293 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
4294 (unspec): Add UNSPEC_SPECULATION_TRACKER.
4295 (speculation_barrier): New insn attribute.
4296 (cmp<mode>): Allow SP in comparisons.
4297 (speculation_tracker): New insn.
4298 (speculation_barrier): Add speculation_barrier attribute.
4299 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
4300 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
4301 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
4302
4303 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4304
4305 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
4306 aarch64_track_speculation is true.
4307 (tb<optab><mode>1): Likewise.
4308 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
4309 generate CB[N]Z when tracking speculation.
4310 (aarch64_split_compare_and_swap): Likewise.
4311 (aarch64_split_atomic_op): Likewise.
4312
4313 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4314
4315 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
4316
4317 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4318
4319 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
4320 (speculation_barrier): New insn.
4321
4322 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4323
4324 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
4325 * config/arm/arm.md (speculation_barrier): New expand.
4326 (speculation_barrier_insn): New pattern.
4327
4328 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4329
4330 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4331 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4332 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4333 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4334 list.
4335 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4336 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4337 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4338 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4339 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4340 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4341 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4342 * builtins.c (expand_speculation_safe_value): New function.
4343 (expand_builtin): Call it.
4344 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4345 * doc/extend.texi: Document __builtin_speculation_safe_value.
4346 * doc/md.texi: Document "speculation_barrier" pattern.
4347 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4348 TARGET_HAVE_SPECULATION_SAFE_VALUE.
4349 * doc/tm.texi: Regenerated.
4350 * target.def (have_speculation_safe_value, speculation_safe_value): New
4351 hooks.
4352 * targhooks.c (default_have_speculation_safe_value): New function.
4353 (default_speculation_safe_value): New function.
4354 * targhooks.h (default_have_speculation_safe_value): Add prototype.
4355 (default_speculation_safe_value): Add prototype.
4356
4357 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4358
4359 * dump-context.h (dump_context::dump_loc): New decl.
4360 * dumpfile.c (dump_context::dump_loc): New member function.
4361 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4362 and dump_gimple_stmt.
4363 (dump_context::dump_gimple_expr_loc): Likewise, using
4364 dump_gimple_expr.
4365 (dump_context::dump_generic_expr_loc): Likewise, using
4366 dump_generic_expr.
4367 (dump_context::dump_printf_loc_va): Likewise, using
4368 dump_printf_va.
4369 (dump_context::begin_scope): Explicitly using the global function
4370 "dump_loc", rather than the member function.
4371
4372 2018-07-31 Martin Sebor <msebor@redhat.com>
4373
4374 PR tree-optimization/86741
4375 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4376
4377 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
4378
4379 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4380 depend on whether prefetch instructions will be emitted or not.
4381 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4382 will be emitted or not.
4383 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4384 (TARGET_SETMEM_PFD): New macros.
4385
4386 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4387
4388 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4389 (NULL_STMT_VEC_INFO): Delete.
4390 (stmt_vec_info::operator*): Likewise.
4391 (stmt_vec_info::operator gimple *): Likewise.
4392 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4393 of NULL_STMT_VEC_INFO.
4394 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4395 (vect_reassociating_reduction_p): Likewise.
4396 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4397 (vectorizable_store): Likewise.
4398 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4399 (vec_info::free_stmt_vec_infos): Likewise.
4400
4401 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4402
4403 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4404 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4405
4406 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4407
4408 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4409 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4410 (vec_info::free_stmt_vec_info): New private member functions.
4411 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4412 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4413 * tree-parloops.c (gather_scalar_reductions): Remove calls to
4414 set_stmt_vec_info_vec and free_stmt_vec_infos.
4415 * tree-vect-loop.c (_loop_vec_info): Remove call to
4416 set_stmt_vec_info_vec.
4417 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4418 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4419 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4420 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4421 (vec_info::free_stmt_vec_info): ...these new functions. Remove
4422 assignments in {vec_info::,}new_stmt_vec_info that are redundant
4423 with the clearing in the xcalloc.
4424 (stmt_vec_info_vec): Delete.
4425 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4426 (vectorize_loops): Likewise.
4427 (vec_info::~vec_info): Remove argument from call to
4428 free_stmt_vec_infos.
4429 (vec_info::add_stmt): Remove vinfo argument from call to
4430 new_stmt_vec_info.
4431
4432 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4433
4434 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4435 rather than a gimple stmt.
4436 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
4437 information for pattern statements when passed the original
4438 statement; instead wait to be passed the pattern statement itself.
4439 Don't call set_vinfo_for_stmt here.
4440 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4441 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4442 stmt_vec_infos here.
4443 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4444 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4445 stmt_vec_infos entry.
4446
4447 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4448
4449 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4450 * tree-vectorizer.c (vec_info::replace_stmt): New function.
4451 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4452 * tree-vect-stmts.c (vectorizable_call): Likewise.
4453 (vectorizable_simd_clone_call): Likewise.
4454
4455 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4456
4457 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4458 * tree-vectorizer.c (vec_info::remove_stmt): New function.
4459 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4460 * tree-vect-loop.c (vect_transform_loop): Likewise.
4461 * tree-vect-slp.c (vect_schedule_slp): Likewise.
4462 * tree-vect-stmts.c (vect_remove_stores): Likewise.
4463
4464 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4465
4466 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4467 (vect_dr_stmt): Delete.
4468 * tree-vectorizer.c (vec_info::lookup_dr): New function.
4469 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4470 of DR_VECT_AUX.
4471 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4472 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4473 (vect_verify_datarefs_alignment, vect_peeling_supportable)
4474 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4475 (vect_analyze_data_refs): Likewise.
4476 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
4477 argument.
4478 (vect_find_same_alignment_drs): Likewise.
4479 (vect_slp_analyze_node_dependences): Update calls accordingly.
4480 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4481 instead of DR_VECT_AUX.
4482 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4483 of a vector data references. Use vec_info::lookup_dr instead of
4484 DR_VECT_AUX.
4485 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4486 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4487 instead of DR_VECT_AUX.
4488
4489 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4490
4491 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4492 dr_vec_info.
4493 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4494 accordingly.
4495 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4496 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4497 (vect_gen_prolog_loop_niters): Likewise.
4498
4499 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4500
4501 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4502 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4503 (vect_known_alignment_in_bytes, vect_dr_behavior)
4504 (vect_get_scalar_dr_size): Take references as dr_vec_infos
4505 instead of data_references. Update calls to other routines for
4506 which the same change has been made.
4507 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4508 dr_vec_infos instead of stmt_vec_infos.
4509 (vect_analyze_data_ref_dependence): Update call accordingly.
4510 (vect_slp_analyze_data_ref_dependence)
4511 (vect_record_base_alignments): Use DR_VECT_AUX.
4512 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4513 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4514 (vector_alignment_reachable_p, vect_get_data_access_cost)
4515 (vect_peeling_supportable, vect_analyze_group_access_1)
4516 (vect_analyze_group_access, vect_analyze_data_ref_access)
4517 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4518 (vect_compile_time_alias, vect_small_gap_p)
4519 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4520 (vect_supportable_dr_alignment): Take references as dr_vec_infos
4521 instead of data_references. Update calls to other routines for
4522 which the same change has been made.
4523 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4524 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4525 (vect_slp_analyze_and_verify_node_alignment)
4526 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4527 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4528 (vect_setup_realignment): Use dr_vec_infos. Update calls after
4529 above changes.
4530 (_vect_peel_info::dr): Replace with...
4531 (_vect_peel_info::dr_info): ...this new field.
4532 (vect_peeling_hash_get_most_frequent)
4533 (vect_peeling_hash_choose_best_peeling): Update accordingly.
4534 (vect_peeling_hash_get_lowest_cost):
4535 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4536 routines for which the same change has been made.
4537 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4538 data_reference.
4539 * tree-vect-loop-manip.c (get_misalign_in_elems)
4540 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4541 above changes.
4542 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4543 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4544 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4545 (get_group_load_store_type, get_negative_load_store_type)
4546 (vect_get_data_ptr_increment, vectorizable_store)
4547 (vectorizable_load): Likewise.
4548 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4549 Update calls to other routines for which the same change has been made.
4550
4551 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4552
4553 * tree-vectorizer.h (vec_info::move_dr): New member function.
4554 (dataref_aux): Rename to...
4555 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4556 (_stmt_vec_info::dr_aux): Update accordingly.
4557 (_stmt_vec_info::data_ref_info): Delete.
4558 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4559 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4560 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4561 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4562 of data_ref.
4563 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4564 (STMT_VINFO_DR_INFO): New macro.
4565 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4566 (set_dr_misalignment): Update after rename of dataref_aux.
4567 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4568 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4569 initialization of STMT_VINFO_DATA_REF.
4570 * tree-vectorizer.c (vec_info::move_dr): New function.
4571 * tree-vect-patterns.c (vect_recog_bool_pattern)
4572 (vect_recog_mask_conversion_pattern)
4573 (vect_recog_gather_scatter_pattern): Use it.
4574 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4575 the "dr" and "stmt" fields of dr_vec_info instead of
4576 STMT_VINFO_DATA_REF.
4577
4578 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4579
4580 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4581 (is_pattern_stmt_p): Use it.
4582 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4583 on pattern statements.
4584
4585 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4586
4587 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4588 original stmt as a stmt_vec_info rather than a gimple stmt.
4589 (vect_pattern_recog_1): Take the statement directly as a
4590 stmt_vec_info, rather than via a gimple_stmt_iterator.
4591 Update call to vect_mark_pattern_stmts.
4592 (vect_pattern_recog): Update calls accordingly.
4593
4594 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4595
4596 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4597 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4598 a vect_def_type for the first argument.
4599 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4600 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4601 operand if it isn't defined by a vectorized statement.
4602 (vect_build_gather_load_calls): Remove the mask_dt argument and
4603 update calls to vect_get_vec_def_for_stmt_copy.
4604 (vectorizable_bswap): Likewise the dt argument.
4605 (vectorizable_call): Update calls to vectorizable_bswap and
4606 vect_get_vec_def_for_stmt_copy.
4607 (vectorizable_simd_clone_call, vectorizable_assignment)
4608 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4609 (vectorizable_comparison): Update calls to
4610 vect_get_vec_def_for_stmt_copy.
4611 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4612 vect_is_simple_use.
4613 (vect_get_loop_based_defs): Remove dt argument and update call
4614 to vect_get_vec_def_for_stmt_copy.
4615 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4616 and vect_get_vec_def_for_stmt_copy.
4617 (vectorizable_load): Update calls to vect_build_gather_load_calls
4618 and vect_get_vec_def_for_stmt_copy.
4619 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4620 (vectorizable_reduction, vectorizable_live_operation): Update calls
4621 to vect_get_vec_def_for_stmt_copy.
4622
4623 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4624
4625 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4626 and gimple stmt arguments with a stmt_vec_info.
4627 (vect_record_base_alignments): Update calls accordingly.
4628 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4629 and gimple stmt arguments with a stmt_vec_info.
4630 (vect_build_slp_tree_1): Remove vinfo argument and update call
4631 to vect_record_max_nunits.
4632 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4633 and vect_record_max_nunits.
4634
4635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4636
4637 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4638 file and take a stmt_vec_info instead of a gimple stmt.
4639 (supportable_widening_operation, vect_finish_replace_stmt)
4640 (vect_finish_stmt_generation, vect_get_store_rhs)
4641 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4642 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4643 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4644 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4645 (vect_create_data_ref_ptr, bump_vector_ptr)
4646 (vect_permute_store_chain, vect_setup_realignment)
4647 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4648 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4649 (vectorizable_reduction, vectorizable_induction)
4650 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4651 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4652 than gimple stmts as arguments.
4653 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4654 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4655 (can_group_stmts_p, vect_check_gather_scatter)
4656 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4657 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4658 (vect_permute_load_chain, vect_shift_permute_load_chain)
4659 (vect_transform_grouped_load)
4660 (vect_record_grouped_load_vectors): Likewise.
4661 * tree-vect-loop.c (vect_fixup_reduc_chain)
4662 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4663 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4664 (vectorizable_reduction, vectorizable_induction)
4665 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4666 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4667 (vect_get_load_store_mask): Likewise.
4668 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4669 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4670 * tree-vect-stmts.c (vect_mark_relevant)
4671 (is_simple_and_all_uses_invariant)
4672 (exist_non_indexing_operands_for_use_p, process_use)
4673 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4674 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4675 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4676 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4677 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4678 (get_negative_load_store_type, get_load_store_type)
4679 (vect_check_load_store_mask, vect_check_store_rhs)
4680 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4681 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4682 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4683 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4684 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4685 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4686 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4687 (supportable_widening_operation): Likewise.
4688
4689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4690
4691 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4692 a stmt_vec_info instead of a gcall.
4693 (vect_check_gather_scatter): Update call accordingly.
4694 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4695 of a gphi.
4696 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4697 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4698 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4699 instead of a gimple stmt.
4700 (vect_transform_loop): Update calls accordingly.
4701 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4702 stmt_vec_infos instead of gimple stmts.
4703 (vect_analyze_slp_instance): Update use accordingly.
4704 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4705 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4706 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4707 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4708 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4709 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4710 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4711 down to subroutines.
4712
4713 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4714
4715 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4716 of the worklist from a vector of gimple stmts to a vector of
4717 stmt_vec_infos.
4718 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4719 (vect_mark_stmts_to_be_vectorized): Likewise
4720
4721 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4722
4723 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4724 statement before passing it to vect_analyze_stmt.
4725 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4726 the chain of phi vector definitions. Track the exit phi via its
4727 stmt_vec_info.
4728 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4729 STMT_VINFO_REDUC_DEF.
4730 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4731 stmt_vec_infos to handle the statement chains.
4732 (vect_get_slp_defs): Record the first statement in the node
4733 using a stmt_vec_info.
4734 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4735 statements here and pass their stmt_vec_info down to subroutines.
4736 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4737 down to vect_finish_stmt_generation.
4738 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4739 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4740 stmt_vec_infos to subroutines.
4741 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4742 chains.
4743
4744 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4745
4746 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4747 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4748 (vect_permute_store_chain, vect_setup_realignment)
4749 (vect_permute_load_chain, vect_shift_permute_load_chain)
4750 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4751 stmts internally, and when passing values to other vectorizer routines.
4752 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4753 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4754 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4755 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4756 (vectorizable_reduction, vectorizable_induction)
4757 (vectorizable_live_operation, vect_transform_loop_stmt)
4758 (vect_transform_loop): Likewise.
4759 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4760 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4761 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4762 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4763 (vect_slp_analyze_node_operations_1): Likewise.
4764 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4765 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4766 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4767 (vect_finish_stmt_generation_1, get_group_load_store_type)
4768 (get_load_store_type, vect_build_gather_load_calls)
4769 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4770 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4771 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4772 (vectorizable_store, vectorizable_load, vectorizable_condition)
4773 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4774 (supportable_widening_operation): Likewise.
4775 (vect_get_vector_types_for_stmt): Likewise.
4776 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4777
4778 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4779
4780 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4781 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4782 (vect_permute_store_chain, vect_permute_load_chain)
4783 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4784 repeated stmt_vec_info lookups.
4785 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4786 (vect_update_ivs_after_vectorizer): Likewise.
4787 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4788 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4789 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4790 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4791 (vect_bb_slp_scalar_cost): Likewise.
4792 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4793
4794 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4795
4796 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4797 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4798 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4799 to get gassigns and gcalls, rather than operating on generc gimple
4800 stmts.
4801 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4802 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4803 (vectorizable_load, vect_analyze_stmt): Likewise.
4804 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4805
4806 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4807
4808 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4809 return stmt_vec_infos rather than gimple stmts. Do not accept
4810 null arguments.
4811 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4812 of a gimple stmt.
4813 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4814 Update use of get_later_stmt.
4815 (vect_get_constant_vectors): Update call accordingly.
4816 (vect_schedule_slp_instance): Likewise
4817 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4818 (vect_slp_analyze_instance_dependence): Likewise.
4819 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4820
4821 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4822
4823 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4824 (stmt_info_for_cost::stmt_info): ...this new field.
4825 (add_stmt_costs): Update accordingly.
4826 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4827 (vect_get_known_peeling_cost): Likewise.
4828 (vect_estimate_min_profitable_iters): Likewise.
4829 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4830
4831 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4832
4833 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4834 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4835 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4836 accordingly.
4837 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4838
4839 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4840
4841 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4842 a gimple stmt to a stmt_vec_info.
4843 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4844
4845 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4846
4847 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4848 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4849 (_loop_vec_info::reduction_chains): Likewise.
4850 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4851 accordingly.
4852 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4853
4854 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4855
4856 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4857 a gimple stmt to a stmt_vec_info.
4858 (_stmt_vec_info::next_element): Likewise.
4859 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4860 (vect_slp_analyze_and_verify_node_alignment)
4861 (vect_analyze_group_access_1, vect_analyze_group_access)
4862 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4863 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4864 (vect_supportable_dr_alignment): Update accordingly.
4865 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4866 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4867 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4868 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4869 * tree-vect-slp.c (vect_build_slp_tree_1)
4870 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4871 (vect_split_slp_store_group, vect_analyze_slp_instance)
4872 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4873 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4874 (get_group_load_store_type, get_load_store_type)
4875 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4876 (vect_transform_stmt, vect_remove_stores): Likewise.
4877
4878 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4879
4880 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4881 than a gimple stmt.
4882 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4883 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4884 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4885 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4886 (vector_alignment_reachable_p, vect_get_data_access_cost)
4887 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4888 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4889 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4890 (vect_analyze_group_access_1, vect_analyze_group_access)
4891 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4892 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4893 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4894 result of vect_dr_stmt and use the stmt_vec_info instead of
4895 the associated gimple stmt.
4896 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4897 (vect_gen_prolog_loop_niters): Likewise.
4898 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4899
4900 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4901
4902 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4903 to a vec<stmt_vec_info>.
4904 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4905 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4906 vec<stmt_vec_info>.
4907 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4908 to a vec<stmt_vec_info>.
4909 (bst_traits::value_type, bst_traits::value_type): Likewise.
4910 (bst_traits::hash): Update accordingly.
4911 (vect_get_and_check_slp_defs): Change the stmts parameter from
4912 a vec<gimple *> to a vec<stmt_vec_info>.
4913 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4914 (vect_build_slp_tree): Likewise.
4915 (vect_build_slp_tree_2): Likewise. Update uses of
4916 SLP_TREE_SCALAR_STMTS.
4917 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4918 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4919 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4920 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4921 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4922 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4923 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4924 (vect_get_constant_vectors, vect_get_slp_defs)
4925 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4926 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4927 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4928 instead of gimple stmts.
4929 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4930 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4931 (vect_slp_analyze_instance_dependence): Update uses of
4932 SLP_TREE_SCALAR_STMTS.
4933 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4934 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4935 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4936 (get_initial_defs_for_reduction): Likewise.
4937 (vect_create_epilog_for_reduction): Likewise.
4938 (vectorize_fold_left_reduction): Likewise.
4939 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4940 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4941 (can_vectorize_live_stmts): Likewise.
4942
4943 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4944
4945 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4946 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4947 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4948 than gimple stmts.
4949 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4950 of a gimple stmt.
4951 (gather_scalar_reductions): Update after above interface changes.
4952 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4953 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4954 than gimple stmts.
4955 (vect_force_simple_reduction): Likewise.
4956 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4957 LOOP_VINFO_REDUCTIONS.
4958 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4959
4960 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4961
4962 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4963 a gimple stmt to a stmt_vec_info.
4964 * tree-vect-loop.c (vect_active_double_reduction_p)
4965 (vect_force_simple_reduction, vectorizable_reduction): Update
4966 accordingly.
4967
4968 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4969
4970 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4971 vec<gimple *> to a vec<stmt_vec_info>.
4972 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4973 the reduction_phis argument from a vec<gimple *> to a
4974 vec<stmt_vec_info>.
4975 (vectorizable_reduction): Likewise the phis local variable that
4976 is passed to vect_create_epilog_for_reduction. Update for new type
4977 of SLP_TREE_VEC_STMTS.
4978 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4979 (vectorizable_live_operation): Likewise.
4980 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4981 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4982
4983 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4984
4985 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4986 a gimple stmt to a stmt_vec_info.
4987 (vectorizable_condition, vectorizable_live_operation)
4988 (vectorizable_reduction, vectorizable_induction): Pass back the
4989 vectorized statement as a stmt_vec_info.
4990 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4991 use of STMT_VINFO_VEC_STMT.
4992 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4993 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4994 as stmt_vec_infos rather than gimple stmts.
4995 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4996 to a stmt_vec_info.
4997 (vectorizable_live_operation): Likewise.
4998 (vectorizable_reduction, vectorizable_induction): Likewise,
4999 updating use of STMT_VINFO_VEC_STMT.
5000 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
5001 of STMT_VINFO_VEC_STMT.
5002 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
5003 (vectorizable_simd_clone_call, vectorizable_conversion)
5004 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5005 (vectorizable_store, vectorizable_load, vectorizable_condition)
5006 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
5007 from a gimple stmt to a stmt_vec_info.
5008 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
5009 pointer to a stmt_vec_info to the vectorizable_* routines.
5010
5011 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5012
5013 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
5014 a gimple stmt to a stmt_vec_info.
5015 (is_pattern_stmt_p): Update accordingly.
5016 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
5017 (vect_record_grouped_load_vectors): Likewise.
5018 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5019 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
5020 (vect_model_reduction_cost): Likewise.
5021 (vect_create_epilog_for_reduction): Likewise.
5022 (vectorizable_reduction, vectorizable_induction): Likewise.
5023 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5024 Return the stmt_vec_info for the pattern statement.
5025 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
5026 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
5027 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5028 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
5029 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5030 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
5031 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
5032 (free_stmt_vec_info, vect_is_simple_use): Likewise.
5033
5034 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5035
5036 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
5037 (vect_finish_stmt_generation): Likewise.
5038 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5039 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
5040 (vect_build_gather_load_calls): Use the return value of the above
5041 functions instead of a separate call to vinfo_for_stmt. Use narrow
5042 scopes for the input gimple stmt and wider scopes for the associated
5043 stmt_vec_info. Use vec_info::lookup_def when setting these
5044 stmt_vec_infos from an SSA_NAME definition.
5045 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5046 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5047 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5048 (vectorizable_store, vectorizable_load, vectorizable_condition)
5049 (vectorizable_comparison): Likewise.
5050 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
5051 (vectorizable_reduction): Likewise.
5052
5053 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5054
5055 * tree-vectorizer.h (vect_is_simple_use): Add an optional
5056 stmt_vec_info * parameter before the optional gimple **.
5057 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5058 (process_use, vect_get_vec_def_for_operand_1): Update callers.
5059 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
5060 * tree-vect-loop.c (vectorizable_reduction): Likewise.
5061 (vectorizable_live_operation): Likewise.
5062 * tree-vect-patterns.c (type_conversion_p): Likewise.
5063 (vect_look_through_possible_promotion): Likewise.
5064 (vect_recog_rotate_pattern): Likewise.
5065 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5066
5067 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5068
5069 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
5070 a typedef to a wrapper class.
5071 (NULL_STMT_VEC_INFO): New macro.
5072 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
5073 (stmt_vec_info::operator*): New function.
5074 (stmt_vec_info::operator gimple *): Likewise.
5075 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
5076 (add_stmt_costs): Likewise.
5077 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
5078 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5079 (vect_get_known_peeling_cost): Likewise.
5080 (vect_estimate_min_profitable_iters): Likewise.
5081 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5082 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
5083 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5084 (vectorizable_store, free_stmt_vec_infos): Likewise.
5085 (new_stmt_vec_info): Change return type of xcalloc to
5086 _stmt_vec_info *.
5087
5088 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5089
5090 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
5091 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
5092 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
5093 a single_imm_use-based sequence.
5094 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
5095
5096 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5097
5098 * tree-vectorizer.h (vec_info::lookup_def): Declare.
5099 * tree-vectorizer.c (vec_info::lookup_def): New function.
5100 * tree-vect-patterns.c (vect_get_internal_def): Use it.
5101 (vect_widened_op_tree): Likewise.
5102 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5103 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
5104 (vectorizable_reduction): Likewise.
5105 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
5106 of a gimple *.
5107 (vect_is_slp_reduction): Update calls accordingly. Use
5108 vec_info::lookup_def.
5109 (vect_is_simple_reduction): Likewise
5110 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
5111
5112 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5113
5114 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
5115 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
5116 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
5117 of vinfo_for_stmt.
5118 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
5119 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
5120 (vect_update_vf_for_slp, vect_analyze_loop_operations)
5121 (vect_is_slp_reduction, vectorizable_induction)
5122 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
5123 * tree-vect-patterns.c (vect_init_pattern_stmt):
5124 (vect_determine_min_output_precision_1, vect_determine_precisions)
5125 (vect_pattern_recog): Likewise.
5126 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
5127 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
5128 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
5129 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5130 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
5131 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
5132 info field from a loop to a loop_vec_info.
5133
5134 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5135
5136 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
5137 (vec_info::add_stmt): Declare.
5138 * tree-vectorizer.c (vec_info::add_stmt): New function.
5139 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
5140 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
5141 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5142 (vectorizable_induction): Likewise.
5143 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
5144 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5145 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
5146 (vectorizable_load): Likewise.
5147 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5148 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
5149 (vect_recog_gather_scatter_pattern): Likewise.
5150 (append_pattern_def_seq): Likewise. Remove a check that is
5151 performed by add_stmt itself.
5152
5153 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5154
5155 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
5156 which make_ssa_name was called with new_stmt before new_stmt
5157 had been created.
5158
5159 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5160
5161 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
5162 split out from...
5163 (vect_is_slp_reduction): ...here...
5164 (vect_is_simple_reduction): ...and here. Remove repetition of tests
5165 that are already known to be false.
5166
5167 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5168
5169 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
5170 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
5171 STMT_VINFO_NUM_SLP_USES when it's true.
5172 (vect_free_slp_instance): Add a final_p parameter and pass it to
5173 vect_free_slp_tree.
5174 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
5175 (vect_analyze_slp_instance): Likewise.
5176 (vect_slp_analyze_operations): Likewise.
5177 (vect_slp_analyze_bb_1): Likewise.
5178 * tree-vectorizer.c (vec_info): Likewise.
5179 * tree-vect-loop.c (vect_transform_loop): Likewise.
5180
5181 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5182
5183 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5184 function is not called for second and subsequent members of
5185 a reduction group.
5186
5187 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5188
5189 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
5190 cases for nested loops from here to ...
5191 (vect_create_epilog_for_reduction): ...here. Only call
5192 vect_is_simple_use for inner-loop reductions.
5193
5194 2018-07-31 Martin Liska <mliska@suse.cz>
5195
5196 PR gcov-profile/85338
5197 PR gcov-profile/85350
5198 PR gcov-profile/85372
5199 * profile.c (struct location_triplet): New.
5200 (struct location_triplet_hash): Likewise.
5201 (output_location): Do not output a BB that
5202 is already recorded for a line.
5203 (branch_prob): Use streamed_locations.
5204
5205 2018-07-31 Martin Liska <mliska@suse.cz>
5206
5207 PR gcov-profile/85370
5208 * coverage.c (coverage_begin_function): Do not mark target
5209 clones as artificial functions.
5210
5211 2018-07-31 Martin Liska <mliska@suse.cz>
5212
5213 PR gcov-profile/83813
5214 PR gcov-profile/84758
5215 PR gcov-profile/85217
5216 PR gcov-profile/85332
5217 * profile.c (branch_prob): Do not record GOTO expressions
5218 for GIMPLE statements which locations are already streamed.
5219
5220 2018-07-31 Olivier Hainque <hainque@adacore.com>
5221
5222 * gcc.c (handle_spec_function): Accept a soft_matched_part
5223 argument, as do_spec_1. Pass it down to ...
5224 (eval_spec_function): Accept a soft_matched_part argument,
5225 and pass it down to ...
5226 (do_spec_2): Accept a soft_matched_part argument, and pass
5227 it down to do_spec_1.
5228 (do_spec_1): Pass soft_matched_part to handle_spec_function.
5229 (handle_braces): Update call to handle_spec_function.
5230 (driver::set_up_specs): Update calls to do_spec_2.
5231 (compare_debug_dump_opt_spec_function): Likewise.
5232 (compare_debug_self_opt_spec_function): Likewise.
5233
5234 2018-07-31 Olivier Hainque <hainque@adacore.com>
5235
5236 * common.opt (nolibc): New option.
5237 * doc/invoke.texi (Link Options): Document it.
5238 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
5239 * config/alpha/linux.h: Likewise.
5240 * config/arc/elf.h: Likewise.
5241 * config/arm/uclinux-elf.h: Likewise.
5242 * config/arm/unknown-elf.h: Likewise.
5243 * config/avr/avrlibc.h: Likewise.
5244 * config/bfin/bfin.h: Likewise.
5245 * config/bfin/linux.h: Likewise.
5246 * config/bfin/uclinux.h: Likewise.
5247 * config/darwin.h: Likewise.
5248 * config/darwin10.h: Likewise.
5249 * config/darwin12.h: Likewise.
5250 * config/gnu-user.h: Likewise.
5251 * config/lm32/uclinux-elf.h: Likewise.
5252 * config/pa/pa-hpux11.h: Likewise.
5253 * config/pa/pa64-hpux.h: Likewise.
5254 * config/sparc/sparc.h: Likewise.
5255
5256 2018-07-31 Olivier Hainque <hainque@adacore.com>
5257
5258 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
5259 undefined variables.
5260
5261 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5262
5263 PR target/86640
5264 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
5265 instead of GEN_INT.
5266
5267 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5268
5269 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5270 terminated string literal.
5271
5272 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5273
5274 PR rtl-optimization/85160
5275 * combine.c (is_just_move): New function.
5276 (try_combine): Allow combining two instructions into two if neither of
5277 the original instructions was a move.
5278
5279 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
5280
5281 PR target/86673
5282 * doc/extend.texi (Global Register Variables): Discourage use of type
5283 qualifiers.
5284 (Local Register Variables): Likewise.
5285
5286 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
5287
5288 PR tree-optimization/86506
5289 * hwint.h (ceil_log2): Resync with hwint.c implementation.
5290
5291 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
5292
5293 PR target/86547
5294 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
5295 hard_regno, make sure no insn between `from` and `to` clobbers it.
5296
5297 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
5298 Tom de Vries <tdevries@suse.de>
5299
5300 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
5301 (PTX_DEFAULT_RUNTIME_DIM): ... this.
5302 (nvptx_goacc_validate_dims): Set default worker and gang dims to
5303 PTX_DEFAULT_RUNTIME_DIM.
5304 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
5305
5306 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
5307
5308 * config/pa/pa.c (pa_output_addr_vec): Align address table.
5309 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
5310 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
5311
5312 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
5313
5314 * config/rs6000/constraints.md (wG constraint): Delete, no longer
5315 used.
5316 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
5317 predicate to reflect toc fusion has been deleted.
5318 (toc_fusion_mem_raw): Delete, no longer used.
5319 (toc_fusion_mem_wrapped): Likewise.
5320 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
5321 fusion mask bit.
5322 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
5323 Delete, no longer used.
5324 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
5325 meant to be used for toc fusion.
5326 (rs6000_debug_print_mode): Delete toc fusion debugging.
5327 (rs6000_debug_reg_global): Likewise.
5328 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
5329 fusion and secondary reload support that were never used.
5330 (rs6000_option_override_internal): Delete TOC fusion, that was only
5331 partially defined, and it did not work unless you also used the
5332 -mcmodel= switch.
5333 (rs6000_legitimate_address_p): Delete TOC fusion support.
5334 (rs6000_opt_masks): Likewise.
5335 (fusion_wrap_memory_address): Delete function, no longer used.
5336 (fusion_split_address); Delete TOC fusion support.
5337 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5338 longer used with toc fusion being deleted.
5339 (TARGET_TOC_FUSION_FP): Likewise.
5340 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5341 UNSPEC.
5342 (toc fusion spliter): Delete TOC fusion support.
5343 (toc_fusionload_<mode>): Likewise.
5344 (toc_fusionload_di): Likewise.
5345 (fusion_gpr_load_<mode>): Delete generator function, this insn no
5346 longer needs to be named. Rename predicate to delete TOC fusion.
5347 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5348 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5349 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5350 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5351 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5352
5353 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
5354
5355 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5356 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
5357 __int128 in built-in function prototypes.
5358 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5359 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5360
5361 2018-07-27 Martin Sebor <msebor@redhat.com>
5362
5363 PR tree-optimization/86696
5364 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5365 types, including enums.
5366 (handle_char_store): Be prepared for the above function to fail.
5367
5368 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
5369
5370 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5371 when optimization level is lower than 2 or optimize for size.
5372
5373 2018-07-26 Martin Sebor <msebor@redhat.com>
5374
5375 PR tree-optimization/86043
5376 PR tree-optimization/86042
5377 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5378 (get_string_cst_length): Rename...
5379 (get_min_string_length): ...to this. Add argument.
5380 (handle_char_store): Extend to handle multi-character stores by
5381 MEM_REF.
5382 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
5383 * tree.h (initializer_zerop): Add argument.
5384
5385 2018-07-26 Jakub Jelinek <jakub@redhat.com>
5386
5387 PR middle-end/86660
5388 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5389 declare target to variables if they have always,{to,from,tofrom} map
5390 kinds.
5391
5392 2018-07-26 Martin Liska <mliska@suse.cz>
5393
5394 PR lto/86548
5395 * lto-wrapper.c: Add linker_output as prefix
5396 for ltrans_output_file.
5397
5398 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
5399
5400 PR rtl-optimization/85805
5401 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5402 value for hard registers if that was written in the same mode.
5403
5404 2018-07-26 Martin Liska <mliska@suse.cz>
5405
5406 PR gcov-profile/86536
5407 * gcov.c (format_gcov): Use printf format %.*f directly
5408 and do not handle special values.
5409
5410 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5411
5412 * common/config/arc/arc-common.c (arc_option_optimization_table):
5413 Update default optimizations for size.
5414
5415 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5416
5417 * config/arc/arc.md (movsf_insn): Add short instruction selection.
5418 * config/arc/constraints.md (CfZ): New constraint.
5419 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5420 (subsf3_fpu): Likewise.
5421 (cmpsf_fpu): Likewise.
5422 (cmpsf_fpu_uneq): Likewise.
5423
5424 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5425
5426 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5427 accesses as well.
5428 (arc_is_uncached_mem_p): uncached applies to both the variable and
5429 the pointer.
5430
5431 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5432
5433 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5434 register names.
5435
5436 2018-07-25 David Malcolm <dmalcolm@redhat.com>
5437
5438 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5439 field "m_scopes" from vec to auto_vec.
5440
5441 2018-07-25 Martin Liska <mliska@suse.cz>
5442
5443 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5444 return type.
5445
5446 2018-07-25 Richard Biener <rguenther@suse.de>
5447
5448 PR debug/86654
5449 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5450 special wrt context_die late.
5451 (gen_subprogram_die): Re-use DIEs in local scope.
5452
5453 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
5454
5455 PR tree-optimization/86644
5456 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
5457
5458 2018-07-25 Martin Liska <mliska@suse.cz>
5459
5460 PR middle-end/86645
5461 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5462 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5463
5464 2018-07-25 Martin Liska <mliska@suse.cz>
5465
5466 PR sanitizer/79635
5467 * params.def: Explain ASan abbreviation and provide
5468 a documentation link.
5469
5470 2018-07-24 Martin Sebor <msebor@redhat.com>
5471
5472 PR tree-optimization/86622
5473 PR tree-optimization/86532
5474 * builtins.h (string_length): Declare.
5475 * builtins.c (c_strlen): Correct handling of non-constant offsets.
5476 (check_access): Be prepared for non-constant length ranges.
5477 (string_length): Make extern.
5478 * expr.c (string_constant): Only handle the minor non-constant
5479 array index. Use string_constant to compute the length of
5480 a generic string constant.
5481
5482 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
5483
5484 PR tree-optimization/86618
5485 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5486 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5487
5488 2018-07-24 David Malcolm <dmalcolm@redhat.com>
5489
5490 PR tree-optimization/86636
5491 * json.cc (json::object::set): Fix comment. Add assertions.
5492 (json::array::append): Move here from json.h. Add comment and an
5493 assertion.
5494 (json::string::string): Likewise.
5495 * json.h (json::array::append): Move to json.cc.
5496 (json::string::string): Likewise.
5497 * optinfo-emit-json.cc
5498 (optrecord_json_writer::impl_location_to_json): Assert that we
5499 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5500 wrapper around it. Expand the location once, rather than three
5501 times.
5502 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5503 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5504 wrappers.
5505 (optrecord_json_writer::optinfo_to_json): Likewise, in four
5506 places. Fix some overlong lines.
5507
5508 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
5509
5510 * config/aarch64/aarch64-simd.md
5511 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5512 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5513 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5514 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5515 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5516 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5517 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5518 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5519 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5520
5521 2018-07-24 Jakub Jelinek <jakub@redhat.com>
5522
5523 PR middle-end/86627
5524 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5525 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
5526 and abs_d == d, do the power of two handling if profitable.
5527
5528 2018-07-24 Richard Biener <rguenther@suse.de>
5529
5530 * match.pd: Add BIT_FIELD_REF canonicalizations.
5531
5532 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5533
5534 PR c/86617
5535 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5536
5537 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5538
5539 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5540 terminated STRING_CST object.
5541
5542 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5543
5544 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5545
5546 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5547
5548 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5549 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5550 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5551 the elements into a register.
5552 (rs6000_split_v4si_init_di_reg): Delete.
5553 (rs6000_split_v4si_init): Delete.
5554 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5555 (vsx_init_v4si): Rewrite as a define_expand.
5556
5557 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5558
5559 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5560 zero_extend argument from memory): New.
5561
5562 2018-07-22 Martin Sebor <msebor@redhat.com>
5563
5564 PR bootstrap/86621
5565 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5566 diagnosing calls with unknown arguments unless -Walloca-larger-than
5567 is restricted to less than PTRDIFF_MAX bytes.
5568
5569 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5570
5571 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5572
5573 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5574
5575 * pretty-print.c (text_info::set_location): Remove redundant
5576 "line_table" parameter from call to rich_location::set_range.
5577
5578 2018-07-20 Martin Sebor <msebor@redhat.com>
5579
5580 PR middle-end/82063
5581 * builtins.c (expand_builtin_alloca): Adjust.
5582 * calls.c (alloc_max_size): Simplify.
5583 * cgraphunit.c (cgraph_node::expand): Adjust.
5584 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5585 variables.
5586 (frame_larger_than_size): Same.
5587 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5588 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5589 Initialize.
5590 * doc/invoke.texi (GCC Command Options): Document option arguments.
5591 Explain byte-size arguments and suffixes.
5592 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5593 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5594 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5595 * doc/options.texi (UInteger): Expand.
5596 (Host_Wide_Int, ByteSize): Document new properties.
5597 * final.c (final_start_function_1): Include sizes in an error message.
5598 * function.c (frame_offset_overflow): Same.
5599 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5600 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5601 Diagnose unbounded alloca calls only for limits of less than
5602 PTRDIFF_MAX.
5603 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5604 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5605 for alloca(0).
5606 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5607 only for limits of less than PTRDIFF_MAX.
5608 * langhooks-def.h (lhd_handle_option): Change function argument
5609 to HOST_WIDE_INT.
5610 * langhooks.c (lhd_handle_option): Same.
5611 * langhooks.h (handle_option): Same.
5612 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5613 ByteSize flags.
5614 (var_type, var_type_struct): Same.
5615 (var_set): Handle ByteSize flag.
5616 * optc-gen.awk: Add comments to output to ease debugging. Make
5617 use of HOST_WIDE_INT where appropriate.
5618 * opts-gen-save.awk: Use %lx to format unsigned long.
5619 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5620 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5621 arguments. Parse bytes-size suffixes.
5622 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5623 (enum_value_to_arg): Same.
5624 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5625 (handle_option): Adjust.
5626 (generate_option): Change function argument to HOST_WIDE_INT.
5627 (cmdline_handle_error): Adjust.
5628 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5629 (set_option): Change function argument to HOST_WIDE_INT.
5630 (option_enabled): Handle cl_host_wide_int.
5631 (get_option_state): Handle CLVC_SIZE.
5632 (control_warning_option): Same.
5633 * opts.c (common_handle_option): Change function argument to
5634 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5635 OPT_Wvla_larger_than_.
5636 * opts.h (enum cl_var_type): Add an enumerator.
5637 * stor-layout.c (layout_decl): Print a more meaningful warning.
5638 * toplev.c (output_stack_usage): Adjust.
5639
5640 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5641
5642 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5643 call to inline_expand_builtin_string_cmp.
5644 (expand_builtin_strcmp): Likewise.
5645 (expand_builtin_strncmp): Likewise.
5646 (inline_string_cmp): Delete the last parameter, change char_type_node
5647 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5648 two operands.
5649 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5650 the inlining expansion on target where the type of the call has same or
5651 narrower precision than unsigned char.
5652
5653 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5654
5655 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5656 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5657 * common.opt (fsave-optimization-record): New option.
5658 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5659 * doc/invoke.texi (-fsave-optimization-record): New option.
5660 * dumpfile.c: Include "optinfo-emit-json.h".
5661 (struct kv_pair): Move to coretypes.h.
5662 (optgroup_options): Make non-static.
5663 (dump_context::end_scope): Call
5664 optimization_records_maybe_pop_dump_scope.
5665 * dumpfile.h (optgroup_options): New decl.
5666 * json.cc: New file.
5667 * json.h: New file.
5668 * optinfo-emit-json.cc: New file.
5669 * optinfo-emit-json.h: New file.
5670 * optinfo.cc: Include "optinfo-emit-json.h".
5671 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5672 (optinfo_enabled_p): Check optimization_records_enabled_p.
5673 (optinfo_wants_inlining_info_p): Likewise.
5674 * optinfo.h: Update comment.
5675 * profile-count.c (profile_quality_as_string): New function.
5676 * profile-count.h (profile_quality_as_string): New decl.
5677 (profile_count::quality): New accessor.
5678 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5679 and optinfo_emit_json_cc_tests.
5680 * selftest.h (selftest::json_cc_tests): New decl.
5681 (selftest::optinfo_emit_json_cc_tests): New decl.
5682 * toplev.c: Include "optinfo-emit-json.h".
5683 (compile_file): Call optimization_records_finish.
5684 (do_compile): Call optimization_records_start.
5685 * tree-ssa-live.c: Include optinfo.h.
5686 (remove_unused_scope_block_p): Retain inlining information if
5687 optinfo_wants_inlining_info_p returns true.
5688
5689 2018-07-20 Richard Biener <rguenther@suse.de>
5690
5691 PR debug/86585
5692 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5693 to cover -flto-partition=none.
5694
5695 2018-07-20 Martin Liska <mliska@suse.cz>
5696
5697 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5698 (get_decl_source_range): Remove unused function.
5699
5700 2018-07-20 Richard Biener <rguenther@suse.de>
5701
5702 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5703 (struct vn_phi_s): Likewise.
5704 (struct vn_reference_s): Likewise.
5705 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5706 for searching the slot of an entry known to be in the hash itself.
5707 (vn_phi_hasher::equal): Likewise.
5708 (vn_reference_hasher::equal): Likewise.
5709 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5710 globals.
5711 (optimistic_info, current_info): Remove, keeping only valid_info.
5712 (vn_reference_lookup_1): Remove fallback lookup.
5713 (vn_reference_lookup_2): Likewise.
5714 (vn_nary_op_lookup_1): Likewise.
5715 (vn_phi_lookup): Likewise.
5716 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5717 hash element.
5718 (vn_reference_insert): Adjust, chain the inserted hash element
5719 at last_inserted_ref.
5720 (vn_reference_insert_pieces): Likewise.
5721 (visit_reference_op_call): Likewise.
5722 (vn_nary_op_insert_into): Chain the inserted hash element at
5723 last_inserted_nary.
5724 (vn_nary_op_insert_pieces): Adjust.
5725 (vn_nary_op_insert): Likewise.
5726 (vn_nary_op_insert_stmt): Likewise.
5727 (vn_phi_insert): Adjust, chain the inserted hash element at
5728 last_inserted_phi.
5729 (process_scc): Remove clearing and copying the optimistic
5730 table. Instead remove elements inserted during an optimistic
5731 iteration from the single table we maintain.
5732 (init_scc_vn): Adjust.
5733 (free_scc_vn): Likewise.
5734 (sccvn_dom_walker::record_cond): Likewise.
5735 (sccvn_dom_walker::after_dom_children): Likewise.
5736
5737 2018-07-19 Martin Sebor <msebor@redhat.com>
5738
5739 PR tree-optimization/84047
5740 PR tree-optimization/83776
5741 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5742 (check_array_bounds): Call it.
5743
5744 2018-07-19 Martin Sebor <msebor@redhat.com>
5745
5746 * align.h (align_flags): Use member initialization.
5747
5748 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5749
5750 * Makefile.in (OBJS): Add optinfo.o.
5751 * coretypes.h (class symtab_node): New forward decl.
5752 (struct cgraph_node): New forward decl.
5753 (class varpool_node): New forward decl.
5754 * dump-context.h: New file.
5755 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5756 "tree-pass.h".
5757 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5758 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5759 (set_alt_dump_file): Likewise.
5760 (dump_context::~dump_context): New dtor.
5761 (dump_gimple_stmt): Move implementation to...
5762 (dump_context::dump_gimple_stmt): ...this new member function.
5763 Add the stmt to any pending optinfo, creating one if need be.
5764 (dump_gimple_stmt_loc): Move implementation to...
5765 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5766 Start a new optinfo and add the stmt to it.
5767 (dump_gimple_expr): Move implementation to...
5768 (dump_context::dump_gimple_expr): ...this new member function.
5769 Add the stmt to any pending optinfo, creating one if need be.
5770 (dump_gimple_expr_loc): Move implementation to...
5771 (dump_context::dump_gimple_expr_loc): ...this new member function.
5772 Start a new optinfo and add the stmt to it.
5773 (dump_generic_expr): Move implementation to...
5774 (dump_context::dump_generic_expr): ...this new member function.
5775 Add the tree to any pending optinfo, creating one if need be.
5776 (dump_generic_expr_loc): Move implementation to...
5777 (dump_context::dump_generic_expr_loc): ...this new member
5778 function. Add the tree to any pending optinfo, creating one if
5779 need be.
5780 (dump_printf): Move implementation to...
5781 (dump_context::dump_printf_va): ...this new member function. Add
5782 the text to any pending optinfo, creating one if need be.
5783 (dump_printf_loc): Move implementation to...
5784 (dump_context::dump_printf_loc_va): ...this new member function.
5785 Start a new optinfo and add the stmt to it.
5786 (dump_dec): Move implementation to...
5787 (dump_context::dump_dec): ...this new member function. Add the
5788 value to any pending optinfo, creating one if need be.
5789 (dump_context::dump_symtab_node): New member function.
5790 (dump_context::get_scope_depth): New member function.
5791 (dump_context::begin_scope): New member function.
5792 (dump_context::end_scope): New member function.
5793 (dump_context::ensure_pending_optinfo): New member function.
5794 (dump_context::begin_next_optinfo): New member function.
5795 (dump_context::end_any_optinfo): New member function.
5796 (dump_context::s_current): New global.
5797 (dump_context::s_default): New global.
5798 (dump_scope_depth): Delete global.
5799 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5800 (dump_symtab_node): New function.
5801 (get_dump_scope_depth): Reimplement in terms of dump_context.
5802 (dump_begin_scope): Likewise.
5803 (dump_end_scope): Likewise.
5804 (selftest::temp_dump_context::temp_dump_context): New ctor.
5805 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5806 (selftest::verify_item): New function.
5807 (ASSERT_IS_TEXT): New macro.
5808 (ASSERT_IS_TREE): New macro.
5809 (ASSERT_IS_GIMPLE): New macro.
5810 (selftest::test_capture_of_dump_calls): New test.
5811 (selftest::dumpfile_c_tests): Call it.
5812 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5813 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5814 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5815 descriptive comment.
5816 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5817 (dump_node, dump_bb): Move these unrelated decls.
5818 (class dump_manager): Add leading comment.
5819 * optinfo.cc: New file.
5820 * optinfo.h: New file.
5821
5822 2018-07-19 Michael Collison <michael.collison@arm.com>
5823 Richard Henderson <rth@redhat.com>
5824
5825 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5826 (subti): Handle op1 zero.
5827 (subvti4, usub4ti4): New.
5828 (*sub<GPI>3_compare1_imm): New.
5829 (sub<GPI>3_carryinCV): New.
5830 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5831 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5832
5833 2018-07-19 Michael Collison <michael.collison@arm.com>
5834 Richard Henderson <rth@redhat.com>
5835
5836 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5837 (addti3): Create simpler code if low part is already known to be 0.
5838 (addvti4, uaddvti4): New.
5839 (*add<GPI>3_compareC_cconly_imm): New.
5840 (*add<GPI>3_compareC_cconly): New.
5841 (*add<GPI>3_compareC_imm): New.
5842 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5843 handle constants within this pattern..
5844 (*add<GPI>3_compareV_cconly_imm): New.
5845 (*add<GPI>3_compareV_cconly): New.
5846 (*add<GPI>3_compareV_imm): New.
5847 (add<GPI>3_compareV): New.
5848 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5849 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5850 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5851 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5852 with 'comparison' operator.
5853 (*add<GPI>3_compareV_cconly_imm): Ditto.
5854 (*add<GPI>3_compareV_cconly): Ditto.
5855 (*add<GPI>3_compareV_imm): Ditto.
5856 (add<GPI>3_compareV): Ditto.
5857 (add<mode>3_carryinC): Ditto.
5858 (*add<mode>3_carryinC_zero): Ditto.
5859 (*add<mode>3_carryinC): Ditto.
5860 (add<mode>3_carryinV): Ditto.
5861 (*add<mode>3_carryinV_zero): Ditto.
5862 (*add<mode>3_carryinV): Ditto.
5863
5864 2018-07-19 Michael Collison <michael.collison@arm.com>
5865 Richard Henderson <rth@redhat.com>
5866
5867 * config/aarch64/aarch64-modes.def (CC_V): New.
5868 * config/aarch64/aarch64-protos.h
5869 (aarch64_addti_scratch_regs): Declare
5870 (aarch64_subvti_scratch_regs): Declare.
5871 (aarch64_expand_subvti): Declare.
5872 (aarch64_gen_unlikely_cbranch): Declare
5873 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5874 for signed overflow using CC_Vmode.
5875 (aarch64_get_condition_code_1): Handle CC_Vmode.
5876 (aarch64_gen_unlikely_cbranch): New function.
5877 (aarch64_addti_scratch_regs): New function.
5878 (aarch64_subvti_scratch_regs): New function.
5879 (aarch64_expand_subvti): New function.
5880
5881 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5882
5883 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5884 extension.
5885 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5886 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5887 extension.
5888
5889 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5890
5891 PR target/83009
5892 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5893 address check not strict.
5894
5895 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5896
5897 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5898 Umq with Umn.
5899 (store_pair_lanes<mode>): Likewise.
5900 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5901 enum value 'ADDR_QUERY_LDP_STP_N'.
5902 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5903 (aarch64_print_address_internal): Add declaration.
5904 (aarch64_print_ldpstp_address): Remove.
5905 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5906 (aarch64_print_operand): Change printing of 'y'.
5907 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5908 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5909 'true' rather than '1'.
5910 * config/aarch64/constraints.md (Uml): Likewise.
5911 (Uml): Rename to Umn.
5912 (Umq): Remove.
5913
5914 2018-07-19 Richard Biener <rguenther@suse.de>
5915
5916 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5917 a trailing array.
5918 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5919 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5920 (vn_reference_hasher): Likewise.
5921 (struct vn_tables_s): Remove obstack and alloc-pool members.
5922 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5923 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5924 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5925 (vn_reference_insert_pieces): Likewise.
5926 (alloc_vn_nary_op_noinit): Adjust.
5927 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5928 (vn_phi_eq): Adjust.
5929 (shared_lookup_phiargs): Remove.
5930 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5931 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5932 (visit_reference_op_call): Likewise.
5933 (copy_nary, copy_phi, copy_reference): Remove.
5934 (process_scc): Rewind the obstack when iterating. Do not
5935 copy the elements to valid_info but just move them from one
5936 hashtable to the other.
5937 (allocate_vn_table): Adjust.
5938 (free_vn_table): Likewise.
5939 (init_scc_vn): Likewise.
5940 (free_scc_vn): Likewise.
5941
5942 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5943
5944 PR target/86560
5945 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5946 indirect_return as function type attribute.
5947 (ix86_attribute_table): Change indirect_return to function
5948 type attribute.
5949 * doc/extend.texi: Update indirect_return attribute.
5950
5951 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5952
5953 * wide-int.h (widest2_int): New.
5954 * gimple-fold.c (arith_overflowed_p): Use it.
5955 * tree.h (widest2_int_cst): New.
5956 * tree-vrp.c (wide_int_binop_overflow): Rename from
5957 vrp_int_const_binop.
5958 Rewrite to work on trees.
5959 (extract_range_from_multiplicative_op_1): Abstract code to...
5960 (wide_int_range_min_max): ...here.
5961 (wide_int_range_cross_product): ...and here.
5962 (extract_range_from_binary_expr_1): Abstract overflow code to...
5963 (wide_int_range_mult_wrapping): ...here.
5964 * tree-vrp.h (wide_int_range_cross_product): New.
5965 (wide_int_range_mult_wrapping): New.
5966
5967 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5968 Julia Koval <julia.koval@intel.com>
5969
5970 * config/i386/x86-tune-costs.h (skylake_memcpy,
5971 skylake_memset): Replace rep_prefix with unrolling for size 512.
5972
5973 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5974
5975 PR middle-end/86544
5976 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5977 comparision with EQ_EXPR in last stmt.
5978
5979 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5980
5981 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5982 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5983 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5984 previously known as "PowerPC AltiVec Built-in Functions". Move
5985 some material to new subsubsections "PowerPC AltiVec Built-in
5986 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5987 ISA 2.07".
5988 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5989 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5990 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5991 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5992
5993 2018-07-18 Richard Biener <rguenther@suse.de>
5994
5995 PR tree-optimization/86557
5996 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5997 EXACT_DIV_EXPR.
5998
5999 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
6000
6001 * config/s390/s390.c (s390_function_profiler): Generate CFI.
6002
6003 2018-07-17 Jeff Law <law@redhat.com>
6004
6005 * config/arm/arm.c (get_label_padding): Update for recent
6006 changes to label_to_alignment.
6007
6008 PR tree-optimization/86010
6009 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
6010
6011 * config/mips/mips.c (vr4130_align_insns): Update for recent
6012 changes to label_to_alignment.
6013
6014 * config/frv/frv.c (frv_label_align): Update for recent changes
6015 to label_to_alignment.
6016
6017 * config/nios2/nios2.c (nios2_label_align): Update for recent
6018 changes which dropped ALIGN_LABELS_LOG.
6019
6020 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
6021
6022 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
6023 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
6024
6025 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
6026
6027 * config/arc/arc.c (arc_label_align): Use align_labels instead of
6028 deprecated align_labels_log.
6029
6030 2018-07-17 Richard Biener <rguenther@suse.de>
6031
6032 PR lto/86456
6033 * dwarf2out.c (init_sections_and_labels): Always generate
6034 a debug_line_str_section for early LTO debug.
6035 (dwarf2out_finish): Reset debug_line_str_hash output early.
6036 Bump counter for extra dwarf5 .debug_loc labels to not conflict
6037 with fat LTO part.
6038 (dwarf2out_early_finish): Output debug_line_str.
6039
6040 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6041
6042 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
6043 index register on z196 or later.
6044
6045 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6046
6047 * config/s390/s390.c (s390_default_align): Set default function
6048 alignment to 16.
6049 (s390_override_options_after_change): Call s390_default align.
6050 (s390_option_override_internal): Call s390_default_align.
6051 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
6052
6053 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6054
6055 PR middle-end/86542
6056 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
6057 to _looptemp_ clauses, other than the first two.
6058
6059 2018-07-17 Martin Liska <mliska@suse.cz>
6060
6061 * opts.c: Do not enable OPT_falign_* for -Os.
6062
6063 2018-07-17 Martin Liska <mliska@suse.cz>
6064
6065 * align.h (MAX_CODE_ALIGN): New.
6066 (MAX_CODE_ALIGN_VALUE): New.
6067 * common/config/i386/i386-common.c (ix86_handle_option):
6068 (MAX_CODE_ALIGN): Moved to align.h.
6069 * final.c (MAX_CODE_ALIGN): Likewise.
6070 * opts.c (parse_and_check_align_values):
6071 (MAX_CODE_ALIGN): Likewise.
6072 (MAX_CODE_ALIGN_VALUE): Likewise.
6073
6074 2018-07-17 Martin Liska <mliska@suse.cz>
6075
6076 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
6077 in order to fulfil coding style.
6078 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
6079 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6080 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6081 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
6082 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
6083 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
6084 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
6085 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
6086 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6087
6088 2018-07-17 Martin Liska <mliska@suse.cz>
6089
6090 * align.h: New file.
6091 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
6092 directly.
6093 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
6094 align_flags of label_to_alignment.
6095 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
6096 align_flags class.
6097 * config/m68k/m68k.c: Do not use removed align_labels_value and
6098 align_loops_value.
6099 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
6100 (LOOP_ALIGN): Likewise.
6101 (LABEL_ALIGN): Likewise.
6102 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6103 Remove not used macro.
6104 (rs6000_loop_align): Change return type to align_flags.
6105 (rs6000_loop_align_max_skip): Remove.
6106 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
6107 Change return type to align_flags.
6108 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6109 Remove not used macro.
6110 (rs6000_loop_align): Change return type to align_flags.
6111 (rs6000_loop_align_max_skip): Remove.
6112 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
6113 * config/rx/rx-protos.h (rx_align_for_label): Make it
6114 static function.
6115 * config/rx/rx.c (rx_align_for_label): Change return type
6116 to align_flags.
6117 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
6118 macro definitions.
6119 into align_flags class.
6120 (LABEL_ALIGN): Likewise.
6121 (LOOP_ALIGN): Likewise.
6122 * config/s390/s390.c (s390_label_align): Use align_flags
6123 class member.
6124 (s390_asm_output_function_label): Likewise.
6125 * config/sh/sh.c (sh_override_options_after_change):
6126 Use align_flags class directly without macros.
6127 (find_barrier): Likewise.
6128 (barrier_align): Likewise.
6129 (sh_loop_align): Likewise.
6130 * config/spu/spu.c (spu_option_override):
6131 Use align_flags_tuple::get_value instead of removed macros.
6132 (spu_sched_init): Likewise.
6133 * config/spu/spu.h (GTY): Likewise.
6134 * config/visium/visium.c (visium_option_override):
6135 Set "8" as default secondary alignment.
6136 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
6137 in order to guarantee secondary alignment of 8.
6138 * coretypes.h: Include align.h header file.
6139 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
6140 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
6141 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
6142 * doc/tm.texi.in: Likewise.
6143 * final.c (struct label_alignment): Remove not used structure.
6144 (LABEL_ALIGN): Change type to align_flags.
6145 (LOOP_ALIGN): Likewise.
6146 (JUMP_ALIGN): Likewise.
6147 (default_loop_align_max_skip): Remove.
6148 (default_label_align_max_skip): Likewise.
6149 (default_jump_align_max_skip): Likewise.
6150 (default_label_align_after_barrier_max_skip):
6151 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
6152 (LABEL_TO_MAX_SKIP): Remove.
6153 (label_to_alignment): Return align_flags type instead of integer.
6154 (label_to_max_skip): Remove.
6155 (align_fuzz): Use align_flags type.
6156 (compute_alignments): Use align_flags type and use align_flags::max
6157 to combine multiple alignments.
6158 (grow_label_align): Grow vec instead of C array.
6159 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
6160 (shorten_branches): Use align_flags type and use align_flags::max
6161 to combine multiple alignments.
6162 (final_scan_insn_1): Remove usage of secondary alignment that comes
6163 from label alignment, but instead use proper secondary alignment
6164 which is computed in grow_label_align.
6165 * flags.h (struct align_flags_tuple): Move to align.h.
6166 (struct align_flags): Likewise.
6167 (state_align_loops): Rename to align_loops.
6168 (state_align_jumps): Rename to align_jumps.
6169 (state_align_labels): Rename to align_labels.
6170 (state_align_functions): Rename to align_functions.
6171 (align_loops_log): Remove.
6172 (align_jumps_log): Remove.
6173 (align_labels_log): Remove.
6174 (align_functions_log): Remove.
6175 (align_loops_max_skip): Remove.
6176 (align_jumps_max_skip): Remove.
6177 (align_labels_max_skip): Remove.
6178 (align_functions_max_skip): Remove.
6179 (align_loops_value): Remove.
6180 (align_jumps_value): Remove.
6181 (align_labels_value): Remove.
6182 (align_functions_value): Remove.
6183 * output.h (label_to_alignment): Change return type to align_flags.
6184 (label_to_max_skip): Remove.
6185 * target.def: Remove loop_align_max_skip, label_align_max_skip,
6186 jump_align_max_skip macros.
6187 * targhooks.h (default_loop_align_max_skip): Remove.
6188 (default_label_align_max_skip): Likewise.
6189 (default_jump_align_max_skip): Likewise.
6190 (default_label_align_after_barrier_max_skip): Remove.
6191 * toplev.c (read_log_maxskip): Use ::normalize function.
6192 (parse_N_M): Remove not used argument and also call ::normalize.
6193 (parse_alignment_opts): Do not pass unused arguments.
6194 * varasm.c (assemble_start_function): Use directly align_functions
6195 instead of removed macros.
6196 * system.h: Do not poison removed macros.
6197
6198 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6199
6200 PR middle-end/86539
6201 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
6202 and cond temporaries don't have reference type if iterator has
6203 pointer type. For init use &for_pre_body instead of pre_p if
6204 for_pre_body is non-empty.
6205
6206 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6207
6208 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
6209 double-double modes to SFmode directly directly.
6210 (trunc<mode>sf2_fprs): Delete.
6211
6212 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6213
6214 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
6215 for conversions between IFmode and the decimal floating point modes.
6216 (init_float128_ieee): Use the correct names for conversions between
6217 KFmode and the decimal floating point modes.
6218
6219 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6220
6221 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
6222 for the conversions between TDmode and IFmode.
6223 (init_float128_ieee): Use more correct names for the conversions
6224 between TDmode and KFmode.
6225
6226 2018-07-16 Jakub Jelinek <jakub@redhat.com>
6227
6228 PR tree-optimization/86526
6229 * builtins.c (expand_builtin_memcmp): Formatting fixes.
6230 (inline_expand_builtin_string_cmp): Likewise.
6231 (inline_string_cmp): Likewise. Use c_readstr instead of
6232 builtin_memcpy_read_str. Add unit_mode temporary.
6233
6234 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6235
6236 PR middle-end/86528
6237 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
6238 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
6239
6240 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
6241
6242 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
6243 Alphabetize prototypes of built-in functions, separating out
6244 built-in functions that are listed in this section but should be
6245 described elsewhere.
6246
6247 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
6248
6249 PR target/86511
6250 * expmed.c (emit_store_flag): Do not emit setcc followed by a
6251 conditional move when trapping comparison was split to a
6252 non-trapping one (and vice versa).
6253
6254 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6255
6256 * config/s390/s390.c (s390_function_profiler): Generate nops
6257 instead of profiler call sequences.
6258 * config/s390/s390.opt: Add the new option.
6259
6260 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6261
6262 * config/s390/s390.c (s390_function_profiler): Generate
6263 __mcount_loc section.
6264 * config/s390/s390.opt: Add the new option.
6265
6266 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6267
6268 * common.opt: Add the new warning.
6269 * config/s390/s390.c (s390_function_profiler): Emit "brasl
6270 %r0,__fentry__" when -mfentry is specified.
6271 (s390_option_override_internal): Disallow -mfentry for 31-bit
6272 CPUs.
6273 * config/s390/s390.opt: Add the new option.
6274
6275 2018-07-16 Richard Biener <rguenther@suse.de>
6276
6277 PR lto/86523
6278 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
6279 for function-local FUNCTION_DECL and RESULT_DECL immediately.
6280
6281 2018-07-16 Martin Liska <mliska@suse.cz>
6282
6283 PR ipa/86529
6284 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
6285 to ::get_create.
6286
6287 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6288
6289 * config/arc/arcHS.md: Update ARCHS scheduling rules.
6290
6291 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6292
6293 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
6294 for ARCHS4x.
6295 * config/arc/arc-cpus.def (hs4x): New cpu.
6296 (hs4xd): Likewise.
6297 * config/arc/arc-tables.opt: Regenerate.
6298 * config/arc/arc.c (arc_sched_issue_rate): New function.
6299 (TARGET_SCHED_ISSUE_RATE): Define.
6300 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
6301 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
6302 fpu_cvt.
6303 (attr tune): Add ARCHS4x tune values.
6304 (attr tune_dspmpy): Define.
6305 (*tst): Correct instruction type.
6306 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
6307 * config/arc/arcHS4x.md: New file.
6308 * config/arc/fpu.md: Update instruction type attributes.
6309 * config/arc/t-multilib: Regenerate.
6310
6311 2018-07-16 Tom de Vries <tdevries@suse.de>
6312
6313 PR debug/86455
6314 * var-tracking.c (vt_initialize): Fix pre_dec handling.
6315
6316 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6317
6318 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
6319 early clobber.
6320
6321 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
6322
6323 PR tree-optimization/86514
6324 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
6325 conversion to a boolean type from a type with greater precision.
6326
6327 2018-07-16 Tom de Vries <tdevries@suse.de>
6328
6329 * var-tracking.c (vt_initialize): Print adjusted insn slim if
6330 dump_flags request TDF_SLIM.
6331
6332 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
6333
6334 * fold-const.c (int_const_binop_1): Abstract...
6335 (wide_int_binop): ...wide int code here.
6336 (poly_int_binop): ...poly int code here.
6337 Abstract the rest of int_const_binop_1 into int_const_binop.
6338 * fold-const.h (wide_int_binop): New.
6339 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6340 Remove useless PLUS/MINUS_EXPR case.
6341 (zero_nonzero_bits_from_vr): Move wide int code...
6342 (zero_nonzero_bits_from_bounds): ...here.
6343 (extract_range_from_binary_expr_1): Move mask optimization code...
6344 (range_easy_mask_min_max): ...here.
6345 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6346 (range_easy_mask_min_max): New.
6347
6348 2018-07-15 Jeff Law <law@redhat.com>
6349
6350 PR target/85993
6351 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6352 block.
6353
6354 2018-07-14 Jim Wilson <jimw@sifive.com>
6355
6356 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6357
6358 2018-07-14 Paul Koning <ni1d@arrl.net>
6359
6360 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6361
6362 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
6363
6364 * lto-streamer-out.c (copy_function_or_variable): Dump info about
6365 copying section.
6366
6367 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
6368 Steve Munroe <munroesj52@gmail.com>
6369
6370 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6371 (_mm_andnot_si128): Likewise.
6372 (_mm_or_si128): Likewise.
6373 (_mm_xor_si128): Likewise.
6374
6375 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
6376
6377 PR middle-end/78809
6378 * builtins.c (expand_builtin_memcmp): Inline the calls first
6379 when result_eq is false.
6380 (expand_builtin_strcmp): Inline the calls first.
6381 (expand_builtin_strncmp): Likewise.
6382 (inline_string_cmp): New routine. Expand a string compare
6383 call by using a sequence of char comparison.
6384 (inline_expand_builtin_string_cmp): New routine. Inline expansion
6385 a call to str(n)cmp/memcmp.
6386 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6387 New option.
6388 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6389
6390 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
6391
6392 * config/arm/driver-arm.c: Include arm-native.h.
6393 (host_detect_local_cpu): Use auto-generated data tables.
6394 (vendors, arm_cpu_table): Delete. Move part information to ...
6395 * config/arm/arm-cpus.in: ... here.
6396 * config/arm/parsecpu.awk (gen_native): New function.
6397 (vendor, part): New CPU fields.
6398 (END): Add support for building the native CPU detection tables.
6399 * config/arm/t-arm (arm-native.h): Add build rule.
6400 (driver-arm.o): Add dependency on arm-native.h.
6401
6402 2018-07-13 Richard Biener <rguenther@suse.de>
6403
6404 PR middle-end/85974
6405 * match.pd (addr1 - addr2): Allow either of the operand to
6406 have a conversion.
6407
6408 2018-07-13 Tom de Vries <tdevries@suse.de>
6409
6410 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6411 in remap_ssa_name.
6412
6413 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
6414
6415 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6416 arrays instead of numbered variables.
6417
6418 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
6419
6420 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6421 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6422
6423 2018-07-13 Richard Biener <rguenther@suse.de>
6424
6425 PR debug/86452
6426 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6427 instead of get_context_die.
6428
6429 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
6430 Richard Biener <rguenther@suse.de>
6431
6432 PR middle-end/86489
6433 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6434 that the loop latch destination where phi is defined.
6435
6436 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
6437
6438 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6439 (riscv_expand_epilogue): Add assertion to check interrupt mode.
6440 (riscv_set_current_function): Extract getting interrupt type to new
6441 function.
6442 (riscv_get_interrupt_type): New function.
6443 (riscv_merge_decl_attributes): New function, checking interrupt type is
6444 same.
6445 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6446
6447 2018-07-12 Paul Koning <ni1d@arrl.net>
6448
6449 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6450 directive.
6451
6452 2018-07-12 Paul Koning <ni1d@arrl.net>
6453
6454 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6455 zero reference, add doloop_end instead.
6456 * doc/md.texi (decrement_and_branch_until_zero): Remove.
6457 (Looping patterns): Remove decrement_and_branch_until_zero. Add
6458 detail for doloop_end.
6459
6460 2018-07-12 Martin Sebor <msebor@redhat.com>
6461
6462 PR c/86453
6463 * attribs.c (decl_attributes): Reject conflicting attributes before
6464 calling attribute handlers.
6465
6466 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6467
6468 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6469 parameter.
6470 (gcc::dump_manager::get_dump_file_name): likewise.
6471 (dump_begin): Likewise.
6472 * dumpfile.h (dump_begin): Update prototype.
6473 (gcc::dump_manager::get_dump_file_name,
6474 gcc::dump_manager::get_dump_file_name): Update prototype.
6475
6476 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6477
6478 * internal-fn.h (vectorizable_internal_fn_p): New function.
6479 * tree-vect-slp.c (compatible_calls_p): Likewise.
6480 (vect_build_slp_tree_1): Remove nops argument. Handle calls
6481 to internal functions.
6482 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6483
6484 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6485
6486 * fold-const.h (inverse_conditions_p): Declare.
6487 * fold-const.c (inverse_conditions_p): New function.
6488 * match.pd: Use inverse_conditions_p. Add folds of view_converts
6489 that test the inverse condition of a conditional internal function.
6490 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6491 * internal-fn.c (internal_fn_mask_index): Handle conditional
6492 internal functions.
6493 (vectorized_internal_fn_supported_p): New function.
6494 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6495 (any_pred_load_store): Replace with...
6496 (need_to_predicate): ...this new variable.
6497 (redundant_ssa_names): New variable.
6498 (ifcvt_can_use_mask_load_store): Move initial checks to...
6499 (ifcvt_can_predicate): ...this new function. Handle tree codes
6500 for which a conditional internal function exists.
6501 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6502 instead of ifcvt_can_use_mask_load_store. Update after variable
6503 name change.
6504 (predicate_load_or_store): New function, split out from
6505 predicate_mem_writes.
6506 (check_redundant_cond_expr): New function.
6507 (value_available_p): Likewise.
6508 (predicate_rhs_code): Likewise.
6509 (predicate_mem_writes): Rename to...
6510 (predicate_statements): ...this. Use predicate_load_or_store
6511 and predicate_rhs_code.
6512 (combine_blocks, tree_if_conversion): Update after above name changes.
6513 (ifcvt_local_dce): Handle redundant_ssa_names.
6514 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6515 general conditional functions.
6516 * tree-vect-stmts.c (vectorizable_call): Likewise.
6517
6518 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6519 Alan Hayward <alan.hayward@arm.com>
6520 David Sherwood <david.sherwood@arm.com>
6521
6522 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6523 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6524 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6525 plus and minus and convert them into IFN_COND_FMA-based sequences.
6526 (convert_mult_to_fma): Handle conditional plus and minus.
6527
6528 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6529
6530 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6531 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6532 (cond_fnms_optab): New optabs.
6533 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6534 internal functions.
6535 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6536 * internal-fn.h (get_conditional_internal_fn): Declare.
6537 (get_unconditional_internal_fn): Likewise.
6538 * internal-fn.c (cond_ternary_direct): New macro.
6539 (expand_cond_ternary_optab_fn): Likewise.
6540 (direct_cond_ternary_optab_supported_p): Likewise.
6541 (FOR_EACH_COND_FN_PAIR): Likewise.
6542 (get_conditional_internal_fn): New function.
6543 (get_unconditional_internal_fn): Likewise.
6544 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6545 (gimple_match_op::gimple_match_op): Add a new overload for 5
6546 operands.
6547 (gimple_match_op::set_op): Likewise.
6548 (gimple_resimplify5): Declare.
6549 * genmatch.c (decision_tree::gen): Generate simplifications for
6550 5 operands.
6551 * gimple-match-head.c (gimple_simplify): Define an overload for
6552 5 operands. Handle calls with 5 arguments in the top-level overload.
6553 (convert_conditional_op): Handle conversions from unconditional
6554 internal functions to conditional ones.
6555 (gimple_resimplify5): New function.
6556 (build_call_internal): Pass a fifth operand.
6557 (maybe_push_res_to_seq): Likewise.
6558 (try_conditional_simplification): Try converting conditional
6559 internal functions to unconditional internal functions.
6560 Handle 3-operand unconditional forms.
6561 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6562 Define ternary equivalents of the current rules for binary conditional
6563 internal functions.
6564 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6565 ternary operations.
6566 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6567 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6568 (optab): Handle them.
6569 (SVE_COND_FP_TERNARY): New int iterator.
6570 (sve_fmla_op, sve_fmad_op): New int attributes.
6571 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6572 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6573 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6574
6575 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6576
6577 * target.def (preferred_else_value): New target hook.
6578 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6579 * doc/tm.texi: Regenerate.
6580 * targhooks.h (default_preferred_else_value): Declare.
6581 * targhooks.c (default_preferred_else_value): New function.
6582 * internal-fn.h (conditional_internal_fn_code): Declare.
6583 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6584 (get_conditional_internal_fn): Use it.
6585 (conditional_internal_fn_code): New function.
6586 * gimple-match.h (gimple_match_cond): New struct.
6587 (gimple_match_op): Add a cond member function.
6588 (gimple_match_op::gimple_match_op): Update all forms to take a
6589 gimple_match_cond.
6590 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6591 for the suboperation, but don't specify a particular else_value.
6592 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6593 (visit_nary_op, visit_reference_op_load): Pass
6594 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6595 * gimple-match-head.c: Include tree-eh.h
6596 (convert_conditional_op): New function.
6597 (maybe_resimplify_conditional_op): Likewise.
6598 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6599 (gimple_resimplify2): Likewise.
6600 (gimple_resimplify3): Likewise.
6601 (gimple_resimplify4): Likewise.
6602 (maybe_push_res_to_seq): Return null for conditional operations.
6603 (try_conditional_simplification): New function.
6604 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6605 constructor.
6606 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6607 IFN_COND_* call.
6608 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6609 function.
6610 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6611
6612 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6613
6614 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6615 DECL_FCONTEXT
6616 (hash_tree): Do not hash DECL_FCONTEXT
6617 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6618 Do not stream DECL_FCONTEXT.
6619 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6620 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6621
6622 2018-07-12 Richard Biener <rguenther@suse.de>
6623
6624 PR debug/86462
6625 * dwarf2out.c (gen_block_die): Only output blocks when they have
6626 at least one !DECL_IGNORED_P variable.
6627
6628 2018-07-12 Richard Biener <rguenther@suse.de>
6629
6630 PR target/84829
6631 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6632 Remove -mieee-fp handling.
6633
6634 2018-07-12 Richard Biener <rguenther@suse.de>
6635
6636 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6637 left-over from last patch.
6638
6639 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6640
6641 PR tree-optimization/86492
6642 * gimple-ssa-store-merging.c
6643 (imm_store_chain_info::coalesce_immediate_stores): Call
6644 check_no_overlap even for the merge_overlapping case. Formatting fix.
6645
6646 2018-07-12 Richard Biener <rguenther@suse.de>
6647
6648 PR middle-end/86479
6649 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6650 move possibly trapping operations into the conditional.
6651
6652 2018-07-12 Richard Biener <rguenther@suse.de>
6653
6654 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6655 (vn_lookup_simplify_result): Remove recursion limit applied
6656 here.
6657 (vn_nary_build_or_lookup_1): Adjust.
6658 (try_to_simplify): Likewise.
6659 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6660 here.
6661 (gimple_resimplify2): Likewise.
6662 (gimple_resimplify3): Likewise.
6663 (gimple_resimplify4): Likewise.
6664
6665 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6666
6667 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6668 Use __mmask64 type instead of __mmask8 for __M argument.
6669 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6670 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6671 __U argument.
6672 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6673 __mmask16 for __M argument.
6674 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6675 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6676 to __mmask16 instead of __mmask8.
6677 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6678 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6679 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6680 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6681 instead of __mmask16 for __U argument.
6682 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6683 __mmask16 instead of __mmask8 for __U argument.
6684 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6685 __U argument.
6686 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6687 __mmask16.
6688 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6689 argument.
6690 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6691 __U argument.
6692 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6693 __mmask16.
6694 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6695 of __mmask16.
6696 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6697 __U argument.
6698 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6699 __U argument.
6700 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6701 __U argument.
6702 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6703 __U argument.
6704 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6705 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6706 return type as well as __M argument type and all casts from __mmask8
6707 to __mmask32.
6708 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6709 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6710 return type as well as __M argument type and all casts from __mmask8
6711 to __mmask16.
6712 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6713 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6714 return type as well as __M argument type and all casts from __mmask8
6715 to __mmask32.
6716 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6717 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6718 return type as well as __M argument type and all casts from __mmask8
6719 to __mmask16.
6720 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6721 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6722 __mmask16.
6723
6724 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6725
6726 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6727 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6728 for __U argument.
6729
6730 2018-07-11 Paul Koning <ni1d@arrl.net>
6731
6732 * doc/md.texi (define_subst): Document how multiple occurrences of
6733 the same argument in the replacement pattern are handled.
6734
6735 2018-07-11 Paul Koning <ni1d@arrl.net>
6736
6737 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6738 alphabetical order.
6739 (Common Type Attributes): Add "mode" attribute.
6740
6741 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6742
6743 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6744 stream DECL_ORIGINAL_TYPE.
6745 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6746 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6747 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6748 Do not walk original type.
6749 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6750 external decls.
6751 (write_ts_decl_non_common_tree_pointers): Do not stream
6752 DECL_ORIGINAL_TYPE
6753 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6754 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6755
6756 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6757
6758 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6759 thread twice from the same starting edge.
6760
6761 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6762
6763 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6764 * gimple.c (gimple_call_nonnull_result_p): ...here...
6765 (gimple_call_nonnull_arg): ...and here.
6766 * gimple.h (gimple_call_nonnull_result_p): New.
6767 (gimple_call_nonnull_arg): New.
6768
6769 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6770
6771 * config/arm/arm-cpus.in: Move information from fpu field of each
6772 cpu definition to the isa field.
6773 * config/arm/parsecpu.awk (fpu): Delete match rule.
6774 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6775
6776 2018-07-11 Richard Biener <rguenther@suse.de>
6777
6778 PR debug/86457
6779 * dwarf2out.c (init_sections_and_labels): Use
6780 output_asm_line_debug_info consistently.
6781 (dwarf2out_early_finish): Likewise.
6782 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6783 type units.
6784
6785 2018-07-11 Richard Biener <rguenther@suse.de>
6786
6787 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6788 Rework father_bb setting in a way to avoid propagating constants
6789 multiple times on a loop body.
6790
6791 2018-07-10 Mark Wielaard <mark@klomp.org>
6792
6793 PR debug/86459
6794 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6795
6796 2018-07-10 Richard Biener <rguenther@suse.de>
6797
6798 * hash-map.h (hash_map::iterator::operator*): Return
6799 references to key and value.
6800
6801 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6802
6803 PR c++/86443
6804 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6805 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6806 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6807 (gimplify_omp_for): For composite loops, move outer
6808 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6809 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6810 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6811 TREE_LIST for both the original class iterator and the "last" helper
6812 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6813 loop, remember has_decl_expr from outer composite loops for the
6814 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6815
6816 2018-07-09 Martin Sebor <msebor@redhat.com>
6817
6818 PR middle-end/77357
6819 PR middle-end/86428
6820 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6821 accessing implicitly initialized array elements.
6822 * expr.c (string_constant): Handle string initializers of
6823 character arrays within aggregates.
6824 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6825 Store element offset. As a special case, handle zero size.
6826 (fold_nonarray_ctor_reference): Same.
6827 (fold_ctor_reference): Add argument. Store subobject offset.
6828 * gimple-fold.h (fold_ctor_reference): Add argument.
6829
6830 2018-07-09 Paul Koning <ni1d@arrl.net>
6831
6832 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6833 (pdp11_insn_cost): New function.
6834 (pdp11_md_asm_adjust): New function.
6835 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6836 (pdp11_rtx_costs): Update to match machine better.
6837 (output_addr_const_pdp11): Correct format mismatch warnings.
6838 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6839 * config/pdp11/pdp11.md: General change to add base_cost and/or
6840 length attributes for use by new pdp11_insn_cost function.
6841 (MIN_BRANCH): Correct definition.
6842 (MIN_SOB): Ditto.
6843 (doloop_end): Use standard pattern name for looping pattern.
6844 (doloop_end_nocc): New.
6845 (movsf): Add another constraint alternative.
6846 (zero_extendqihi2): Add constraint alternatives for not in place
6847 extend.
6848 (zero_extendhisi2): Remove.
6849 (shift patterns): Add CC handling variants.
6850 (bswaphi2): New.
6851 (bswapsi2): New.
6852 (rothi3): New.
6853 (define_peephole2): New peephole to recognize mov that sets CC for
6854 subsequent test.
6855
6856 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6857
6858 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6859 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6860 wi::add.
6861
6862 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6863
6864 PR c/86420
6865 * real.c (real_nextafter): Return true if result is denormal.
6866
6867 2018-07-09 Martin Liska <mliska@suse.cz>
6868
6869 * common.opt: Add back wrongly removed attribute.
6870
6871 2018-07-09 Richard Biener <rguenther@suse.de>
6872
6873 PR debug/86413
6874 * dwarf2out.c (gen_block_die): For an early generated DIE
6875 always output high/low PC attributes.
6876
6877 2018-07-09 Tom de Vries <tdevries@suse.de>
6878
6879 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6880 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6881 onto VAR_DECL with abstract origin.
6882
6883 2018-07-07 Jim Wilson <jimw@sifive.com>
6884
6885 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6886
6887 2018-07-07 Tom de Vries <tdevries@suse.de>
6888
6889 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6890
6891 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6892
6893 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6894 overflow_type.
6895 (combine_bound): Use wide-int overflow calculation instead of
6896 rolling our own.
6897 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6898 overflow_type.
6899 * fold-const.c (int_const_binop_2): Same.
6900 (extract_muldiv_1): Same.
6901 (fold_div_compare): Same.
6902 (fold_abs_const): Same.
6903 * match.pd: Same.
6904 * poly-int.h (add): Same.
6905 (sub): Same.
6906 (neg): Same.
6907 (mul): Same.
6908 * predict.c (predict_iv_comparison): Same.
6909 * profile-count.c (slow_safe_scale_64bit): Same.
6910 * simplify-rtx.c (simplify_const_binary_operation): Same.
6911 * tree-chrec.c (tree_fold_binomial): Same.
6912 * tree-data-ref.c (split_constant_offset_1): Same.
6913 * tree-if-conv.c (idx_within_array_bound): Same.
6914 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6915 * tree-ssa-phiopt.c (minmax_replacement): Same.
6916 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6917 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6918 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6919 * wide-int.cc (wi::add_large): Same.
6920 (wi::mul_internal): Same.
6921 (wi::sub_large): Same.
6922 (wi::divmod_internal): Same.
6923 * wide-int.h: Change overflow type to overflow_type for neg, add,
6924 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6925 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6926 mul_internal, divmod_internal.
6927 (overflow_type): New enum.
6928 (accumulate_overflow): New.
6929
6930 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6931
6932 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6933 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6934
6935 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6936
6937 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6938 argument is checked for zero before entering loop, avoid checking again.
6939
6940 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6941
6942 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6943 * gimplify.h (generic_expr_could_trap_p): Likwise.
6944 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6945
6946 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6947
6948 PR tree-optimization/86401
6949 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6950 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6951 (fold_bit_and_mask): ... here. New helper function for match.pd.
6952 * fold-const.h (fold_bit_and_mask): Declare.
6953 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6954
6955 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6956
6957 PR target/86324
6958 * target.def (translate_mode_attribute): New hook.
6959 * targhooks.h (default_translate_mode_attribute): Declare.
6960 * targhooks.c (default_translate_mode_attribute): New function.
6961 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6962 * doc/tm.texi: Regenerate.
6963 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6964 (rs6000_translate_mode_attribute): New function.
6965
6966 2018-07-06 Paul Koning <ni1d@arrl.net>
6967
6968 * doc/md.texi (define_split): Document DONE and FAIL.
6969 (define_peephole2): Ditto.
6970
6971 2018-07-05 Jeff Law <law@redhat.com>
6972
6973 PR tree-optimization/86010
6974 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6975 both the head and tail of mem* and str* calls.
6976
6977 2018-07-05 Jim Wilson <jimw@sifive.com>
6978
6979 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6980
6981 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6982
6983 * config/aarch64/aarch64-simd.md: correct flags text for
6984 MIN_EXPR replacement.
6985
6986 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6987
6988 * configure: Regenerated.
6989
6990 2018-07-05 Carl Love <cel@us.ibm.com>
6991
6992 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6993 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6994 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6995 VSX_BUILTIN_DOUBLEL_V4SF.
6996
6997 2018-07-05 Martin Sebor <msebor@redhat.com>
6998
6999 PR c++/86400
7000 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
7001 than its domain to compute its the upper bound of a char array.
7002
7003 2018-07-05 Nathan Sidwell <nathan@acm.org>
7004
7005 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
7006 * doc/cpp.texi: Update comment.
7007 * doc/tm.texi: Rebuilt.
7008 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
7009 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
7010 * doc/extend.texi (Backwards Compatibility): Clarify it is system
7011 headers affected by extern "C".
7012 * system.h: Poison NO_IMPLICIT_EXTERN_C.
7013 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
7014 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
7015 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
7016 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
7017 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
7018 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
7019 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
7020 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
7021 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
7022 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
7023 config/sparc/sp64-elf.h, config/spu/spu.h,
7024 config/stormy16/stormy16.h, config/v850/v850.h,
7025 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
7026 define NO_IMPLICIT_EXTERN_C.
7027 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
7028
7029 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7030
7031 PR target/84711
7032 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7033 instead of GET_MODE_SIZE when comparing Units.
7034
7035 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7036
7037 PR target/84711
7038 * rtlanal.c (set_noop_p): Constrain on mode change,
7039 include hard-reg-set.h
7040
7041 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7042
7043 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
7044
7045 2018-07-05 Jakub Jelinek <jakub@redhat.com>
7046
7047 Revert
7048 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7049
7050 PR sanitizer/84250
7051 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7052 libasan.
7053 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7054
7055 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7056
7057 PR sanitizer/84250
7058 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7059 libasan.
7060 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7061
7062 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
7063
7064 PR middle-end/86380
7065 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
7066
7067 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
7068
7069 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
7070 neg_*_op* variables.
7071
7072 2018-07-04 Martin Liska <mliska@suse.cz>
7073
7074 * tree-switch-conversion.c: Define
7075 max_ratio_for_speed and max_ratio_for_size constants.
7076
7077 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7078 Martin Liska <mliska@suse.cz>
7079
7080 PR middle-end/66240
7081 PR target/45996
7082 PR c/84100
7083 * common.opt: Rename align options with 'str_' prefix.
7084 * common/config/i386/i386-common.c (set_malign_value): New
7085 function.
7086 (ix86_handle_option): Use it to set -falign-* options/
7087 * config/aarch64/aarch64-protos.h (struct tune_params): Change
7088 type from int to string.
7089 * config/aarch64/aarch64.c: Update default values from int
7090 to string.
7091 * config/alpha/alpha.c (alpha_override_options_after_change):
7092 Likewise.
7093 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
7094 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7095 max skip conditionally.
7096 * config/i386/freebsd.h (SUBALIGN_LOG): New.
7097 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7098 max skip conditionally.
7099 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7100 max skip conditionally.
7101 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
7102 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7103 max skip conditionally.
7104 * config/i386/i386.c (struct ptt): Change type from int to
7105 string.
7106 (ix86_default_align): Set default values.
7107 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
7108 max skip conditionally.
7109 * config/i386/iamcu.h (SUBALIGN_LOG): New.
7110 (ASM_OUTPUT_MAX_SKIP_ALIGN):
7111 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
7112 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7113 max skip conditionally.
7114 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
7115 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
7116 * config/i386/x86-64.h (SUBALIGN_LOG): New.
7117 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7118 max skip conditionally.
7119 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7120 * config/ia64/ia64.c (ia64_option_override): Set default values
7121 for alignment options.
7122 * config/m68k/m68k.c: Handle new str_align_* options.
7123 * config/mips/mips.c (mips_set_compression_mode): Change
7124 type of constants.
7125 (mips_option_override): Set default values for options.
7126 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7127 Likewise.
7128 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7129 Likewise.
7130 * config/rx/rx.c (rx_option_override): Likewise.
7131 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
7132 (LABEL_ALIGN): Use align_labels_log.
7133 (LOOP_ALIGN): Use align_loops_align.
7134 * config/s390/s390.c (s390_asm_output_function_label): Use new
7135 macros.
7136 * config/sh/sh.c (sh_override_options_after_change):
7137 Change type of constants.
7138 * config/spu/spu.c (spu_sched_init): Likewise.
7139 * config/sparc/sparc.c (sparc_option_override): Set default
7140 values for options.
7141 * config/visium/visium.c (visium_option_override): Likewise.
7142 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
7143 emit p2align format with last argument if it's not needed.
7144 * doc/invoke.texi: Document extended format of -falign-*.
7145 * final.c: Use align_labels alignment.
7146 * flags.h (struct target_flag_state): Change type to use
7147 align_flags.
7148 (struct align_flags_tuple): New.
7149 (struct align_flags): Likewise.
7150 (align_loops_log): Redefine macro to use new types.
7151 (align_loops_max_skip): Redefine macro to use new types.
7152 (align_jumps_log): Redefine macro to use new types.
7153 (align_jumps_max_skip): Redefine macro to use new types.
7154 (align_labels_log): Redefine macro to use new types.
7155 (align_labels_max_skip): Redefine macro to use new types.
7156 (align_functions_log): Redefine macro to use new types.
7157 (align_loops): Redefine macro to use new types.
7158 (align_jumps): Redefine macro to use new types.
7159 (align_labels): Redefine macro to use new types.
7160 (align_functions): Redefine macro to use new types.
7161 (align_functions_max_skip): Redefine macro to use new types.
7162 (align_loops_value): New macro.
7163 (align_jumps_value): New macro.
7164 (align_labels_value): New macro.
7165 (align_functions_value): New macro.
7166 * function.c (invoke_set_current_function_hook): Propagate
7167 alignment values from flags to global variables default in
7168 topleev.h.
7169 * ipa-icf.c (sem_function::equals_wpa): Use
7170 cl_optimization_option_eq instead of memcmp.
7171 * lto-streamer.h (cl_optimization_stream_out): Support streaming
7172 of string types.
7173 (cl_optimization_stream_in): Likewise.
7174 * optc-save-gen.awk: Support strings in cl_optimization.
7175 * opth-gen.awk: Likewise.
7176 * opts.c (finish_options): Remove error checking of invalid
7177 value ranges.
7178 (MAX_CODE_ALIGN): Remove.
7179 (MAX_CODE_ALIGN_VALUE): Likewise.
7180 (parse_and_check_align_values): New function.
7181 (check_alignment_argument): Likewise.
7182 (common_handle_option): Use check_alignment_argument.
7183 * opts.h (parse_and_check_align_values): Declare.
7184 * toplev.c (init_alignments): Remove.
7185 (read_log_maxskip): New.
7186 (parse_N_M): Likewise.
7187 (parse_alignment_opts): Likewise.
7188 (backend_init_target): Remove usage of init_alignments.
7189 * toplev.h (parse_alignment_opts): Declare.
7190 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
7191 argument.
7192 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
7193 * tree.c (cl_option_hasher::equal): New.
7194 * varasm.c: Use new global macros.
7195
7196 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7197
7198 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
7199 Use a simpler align directive also if MAXSKIP = ALIGN-1.
7200 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7201 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7202 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7203 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7204 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
7205 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
7206 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
7207 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7208 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7209 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7210 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7211
7212 2018-07-04 Martin Liska <mliska@suse.cz>
7213 Jonathan Wakely <jwakely@redhat.com>
7214
7215 * coverage.c: Use correct type.
7216 * doc/invoke.texi: Language correction.
7217
7218 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
7219
7220 PR target/85620
7221 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
7222 ENDBRANCH for non-tail call which may return via indirect branch.
7223 * doc/extend.texi: Document indirect_return attribute.
7224
7225 2018-07-03 Martin Sebor <msebor@redhat.com>
7226
7227 PR tree-optimization/86274
7228 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
7229 precondition.
7230 (format_floating): Correct handling of infinities and NaNs.
7231
7232 2018-07-03 Martin Sebor <msebor@redhat.com>
7233
7234 * print-tree.c (print_real_cst): New function.
7235 (print_node_brief): Call it.
7236 (print_node): Ditto.
7237
7238 2018-07-03 Jeff Law <law@redhat.com>
7239
7240 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
7241 into a single pattern.
7242
7243 * config/h8300/h8300.md (ors code_iterator): New.
7244 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
7245 a single pattern and single splitter.
7246 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
7247 (iorqi3_1, xorqi3_1): Likewise.
7248 (iorqi3, xorqi3 expanders): Similarly.
7249
7250 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
7251 (movmd_internal) into a single pattern using the P mode iterator.
7252 (movmd splitters): Similarly.
7253 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
7254 (movsd splitters): Similarly.
7255
7256 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
7257 ADDB, ADDW and ADDL into a single ADD attribute which selects the
7258 right table based on the size of the operand.
7259 * config/h8300/h8300.md (length_table): Corresponding changes. All
7260 references to "addb", "addw" and "addl" changed to "add".
7261 (btst patterns): Merge two variants into a single pattern.
7262 (tstqi, tsthi): Likewise.
7263 (addhi3_incdec, addsi3_incdec): Likewise.
7264 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
7265 (mulhi3, mulsi3): Likewise.
7266 (udivhi3, udivsi3): Likewise.
7267 (divhi3, divsi3): Likewise.
7268 (andorqi3, andorhi3, andorsi3): Likewise.
7269
7270 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
7271
7272 PR target/85694
7273 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
7274 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
7275
7276 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7277
7278 PR tree-optimization/85694
7279 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
7280 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
7281 UNSPEC_URHADD.
7282 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
7283 (<u>avg<mode>3_ceil): New patterns.
7284
7285 2018-07-03 David Malcolm <dmalcolm@redhat.com>
7286
7287 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
7288 scan-tree-dump directive.
7289 * gcc.dg/vect/slp-perm-2.c: Likewise.
7290 * gcc.dg/vect/slp-perm-3.c: Likewise.
7291 * gcc.dg/vect/slp-perm-5.c: Likewise.
7292 * gcc.dg/vect/slp-perm-6.c: Likewise.
7293 * gcc.dg/vect/slp-perm-7.c: Likewise.
7294 * gcc.dg/vect/slp-perm-8.c: Likewise.
7295
7296 2018-07-03 Marek Polacek <polacek@redhat.com>
7297
7298 PR middle-end/86202
7299 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
7300
7301 2018-07-03 Richard Biener <rguenther@suse.de>
7302
7303 PR ipa/86389
7304 * tree-ssa-structalias.c (find_func_clobbers): Properly
7305 handle indirect calls.
7306
7307 2018-07-03 Jeff Law <law@redhat.com>
7308
7309 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
7310 (shifts): New code iterator.
7311 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
7312 expander. Fix HImode handling on H8/SX.
7313 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
7314 (subqi3, subhi3, subsi3 expanders): Likewise.
7315 (andqi3, andhi3, andsi3 expanders): Likewise.
7316 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
7317 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
7318 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
7319 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
7320 (zero_extendqihi2, zero_extendqisi2): Likewise.
7321 (extendqihi2, extendqisi2): Likewise.
7322 (rotlqi3, rotlhi3, rotlsi3): Likewise.
7323 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
7324 (rotlqi3_1, rotlhi3_1): Likewise.
7325 (logicalhi3_sn, logicalsi3_sn): Likewise.
7326 (logicalhi3, logicalsi3): Likewise.
7327
7328 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7329
7330 * tree-vect-patterns.c (vect_recog_rotate_pattern)
7331 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7332 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7333 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7334 type to append_pattern_def_seq instead of creating a stmt_vec_info
7335 directly.
7336 (build_mask_conversion): Likewise. Remove vinfo argument.
7337 (vect_add_conversion_to_patterm): Likewise, renaming to...
7338 (vect_add_conversion_to_pattern): ...this.
7339 (vect_recog_mask_conversion_pattern): Update call to
7340 build_mask_conversion. Pass the vector type to
7341 append_pattern_def_seq here too.
7342 (vect_recog_gather_scatter_pattern): Update call to
7343 vect_add_conversion_to_pattern.
7344
7345 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7346
7347 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7348 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7349 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7350 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7351 STMT_VINFO_PATTERN_DEF_SEQ to null here.
7352 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7353 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7354 append_pattern_def_seq instead of new_pattern_def_seq.
7355 (vect_recog_divmod_pattern): Do both of the above.
7356 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7357 is null.
7358
7359 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7360
7361 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7362 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7363 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7364 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7365 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7366 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7367 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7368 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7369 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7370 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7371 parameter with a single stmt_vec_info.
7372 (vect_recog_func_ptr): Likewise.
7373 (vect_recog_gather_scatter_pattern): Likewise, folding in...
7374 (vect_try_gather_scatter_pattern): ...this.
7375 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7376 the stmt_vec_info of the statement to be matched. Don't clear
7377 STMT_VINFO_RELATED_STMT.
7378 (vect_pattern_recog): Update call accordingly.
7379
7380 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7381
7382 PR tree-optimization/85694
7383 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7384 (uavgM3_ceil): Document new optabs.
7385 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7386 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7387 functions.
7388 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7389 (savg_ceil_optab): New optabs.
7390 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7391 (vect_vect_recog_func_ptrs): Add it.
7392 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7393 constant directly from the associated lhs.
7394
7395 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7396
7397 * tree-vect-patterns.c (vect_split_statement): New function.
7398 (vect_convert_input): Use it to try to split an existing cast.
7399
7400 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7401
7402 * poly-int.h (print_hex): New function.
7403 * dumpfile.h (dump_dec, dump_hex): Declare.
7404 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7405 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7406 min_input_precision, operation_precision and operation_sign.
7407 * tree-vect-patterns.c (vect_get_range_info): New function.
7408 (vect_same_loop_or_bb_p, vect_single_imm_use)
7409 (vect_operation_fits_smaller_type): Delete.
7410 (vect_look_through_possible_promotion): Add an optional
7411 single_use_p parameter.
7412 (vect_recog_over_widening_pattern): Rewrite to use new
7413 stmt_vec_info infomration. Handle one operation at a time.
7414 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7415 (vect_truncatable_operation_p, vect_set_operation_type)
7416 (vect_set_min_input_precision): New functions.
7417 (vect_determine_min_output_precision_1): Likewise.
7418 (vect_determine_min_output_precision): Likewise.
7419 (vect_determine_precisions_from_range): Likewise.
7420 (vect_determine_precisions_from_users): Likewise.
7421 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7422 (vect_vect_recog_func_ptrs): Put over_widening first.
7423 Add cast_forwprop.
7424 (vect_pattern_recog): Call vect_determine_precisions.
7425
7426 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7427
7428 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7429 statements that have been replaced by further pattern statements.
7430 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7431
7432 2018-07-03 Richard Biener <rguenther@suse.de>
7433
7434 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7435 always set *dt. Dump vectype in vectype overload.
7436 * dumpfile.h (dump_gimple_expr): New function.
7437 (dump_gimple_expr_loc): Likewise.
7438 * dumpfile.c (dump_gimple_expr): New function.
7439 (dump_gimple_expr_loc): Likewise.
7440
7441 2018-07-02 Jeff Law <law@redhat.com>
7442
7443 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7444 the H8/300, H8/300H and H8/S variants into a single pattern.
7445 (movhi_h8300, movqi_h8300hs): Similarly.
7446 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7447 (QHI mode iterator): New.
7448
7449 * config/h8300/h8300.md: Remove trailing whitespace.
7450
7451 2018-07-02 Jim Wilson <jimw@sifive.com>
7452
7453 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7454 instead of emit_insn for interrupt returns.
7455 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7456 (riscv_sret, riscv_uret): Likewise.
7457
7458 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7459
7460 * pretty-print.c (selftest::test_pp_format): Move save and restore
7461 of quotes to class auto_fix_quotes, and add an instance.
7462 * selftest.c: Include "intl.h".
7463 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7464 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7465 * selftest.h (selftest::auto_fix_quotes): New class.
7466
7467 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
7468
7469 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7470 (aarch64_sve_prepare_conditional_op): Remove.
7471 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7472 Allow aarch64_simd_reg_or_zero as select operand; remove
7473 the aarch64_sve_prepare_conditional_op call.
7474 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7475 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7476 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7477 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7478 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7479 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7480 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7481 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7482 and a splitters to match all of the *_any patterns.
7483 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7484
7485 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7486 (SVE_COND_FP_BINARY_REV): Remove.
7487 (sve_int_op_rev, sve_fp_op_rev): New.
7488 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7489 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7490 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7491 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7492 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7493 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7494 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7495 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7496 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7497
7498 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7499 Remove match_dup 1 from the inner unspec.
7500 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7501
7502 * config/aarch64/aarch64.md (movprfx): New attr.
7503 (length): Default movprfx to 8.
7504 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7505 (*madd<SVE_I>, *msub<SVE_I): Likewise.
7506 (*<su>mul<SVE_I>3_highpart): Likewise.
7507 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7508 (*v<ASHIFT><SVE_I>3): Likewise.
7509 (*<su><MAXMIN><SVE_I>3): Likewise.
7510 (*<su><MAXMIN><SVE_F>3): Likewise.
7511 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7512 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7513 (*div<SVE_F>4): Likewise.
7514
7515 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
7516
7517 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7518 in dump string.
7519
7520 2018-07-02 Richard Biener <rguenther@suse.de>
7521
7522 PR tree-optimization/86363
7523 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7524 memset argument refers to a non-variable address.
7525
7526 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7527
7528 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7529 {PLUS,MINUS}_EXPR code to...
7530 (adjust_symbolic_bound): ...here,
7531 (combine_bound): ...here,
7532 (set_value_range_with_overflow): ...and here.
7533
7534 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7535
7536 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7537 code...
7538 (extract_range_from_abs_expr): ...here.
7539
7540 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7541
7542 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7543 -fno-omit-frame-pointer when not optimizing.
7544
7545 2018-07-02 Martin Liska <mliska@suse.cz>
7546
7547 PR ipa/86279
7548 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7549 (propagate_nothrow): Likewise.
7550
7551 2018-07-02 Martin Liska <mliska@suse.cz>
7552
7553 PR ipa/86323
7554 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7555
7556 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7557
7558 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7559 function in r262149, changing "loc" param from source_location to
7560 const dump_location_t &.
7561 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7562 declaration, as above.
7563
7564 2018-07-01 Paul Koning <ni1d@arrl.net>
7565
7566 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7567 -munit-asm, -mgnu-asm, -mdec-asm.
7568 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7569 (pdp11_output_labelref): New.
7570 (pdp11_output_def): New.
7571 (pdp11_output_addr_vec_elt): New.
7572 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7573 %# and %@ format codes.
7574 (pdp11_option_override): New.
7575 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7576 (pdp11_output_ident): New.
7577 (pdp11_asm_named_section): New.
7578 (pdp11_asm_init_sections): New.
7579 (pdp11_file_start): New.
7580 (pdp11_file_end): New.
7581 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7582 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7583 %o, like %c but octal.
7584 (pdp11_option_override): New.
7585 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7586 -mdec-asm.
7587 (DATA_SECTION_ASM_OP): Ditto.
7588 (READONLY_DATA_SECTION_ASM_OP): New.
7589 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7590 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7591 (ASM_OUTPUT_LABELREF): Ditto.
7592 (ASM_OUTPUT_DEF): Ditto.
7593 (ASM_OUTPUT_EXTERNAL): New.
7594 (ASM_OUTPUT_SOURCE_FILENAME): New.
7595 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7596 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7597 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7598 %# and %@ format codes.
7599 * config/pdp11/pdp11.opt (mgnu-asm): New.
7600 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7601 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7602 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7603
7604 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7605
7606 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7607 dereferencing path[] beyond its length.
7608 (debug_path): New.
7609 (debug_all_paths): New.
7610 (rewire_first_differing_edge): New.
7611 (adjust_paths_after_duplication): New.
7612 (duplicate_thread_path): Call adjust_paths_after_duplication.
7613 Add new argument.
7614 (thread_through_all_blocks): Add new argument to
7615 duplicate_thread_path.
7616
7617 2018-06-30 Jim Wilson <jimw@sifive.com>
7618
7619 * config/riscv/predicates.md (p2m1_shift_operand): New.
7620 (high_mask_shift_operand): New.
7621 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7622 pattern using p2m1_shift_operand.
7623 (lshsi3_zero_extend_3+2): New combiner pattern using
7624 high_mask_shift_operand.
7625
7626 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7627
7628 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7629 split out from...
7630 (vect_recog_rotate_pattern): ...here.
7631 (vect_convert_input): Try to insert casts of invariants in the
7632 preheader.
7633 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7634 preheader to be empty.
7635
7636 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7637
7638 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7639 vector type. If given, install it in the new statement's
7640 STMT_VINFO_VECTYPE.
7641 (vect_element_precision): New function.
7642 (vect_unpromoted_value): New struct.
7643 (vect_unpromoted_value::vect_unpromoted_value): New function.
7644 (vect_unpromoted_value::set_op): Likewise.
7645 (vect_look_through_possible_promotion): Likewise.
7646 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7647 (vect_widened_op_tree, vect_convert_input): Likewise.
7648 (vect_convert_inputs, vect_convert_output): Likewise.
7649 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7650 to handle the optional cast of the multiplication result and
7651 vect_widened_op_tree to detect the widened multiplication itself.
7652 Do not require the input and output of promotion casts to have
7653 the same sign, but base the signedness of the operation on the
7654 input rather than the result. If the pattern includes two
7655 promotions, check that those promotions have the same sign.
7656 Do not restrict the MULT_EXPR handling to a double-width result;
7657 handle quadruple-width results and wider. Use vect_convert_inputs
7658 to convert the inputs to the common type.
7659 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7660 to handle the optional cast of the ABS result. Also allow a sign
7661 change or a sign extension between the ABS and MINUS.
7662 Use vect_widened_op_tree to detect the widened subtraction and use
7663 vect_convert_inputs to convert the inputs to the common type.
7664 (vect_handle_widen_op_by_const): Delete.
7665 (vect_recog_widen_op_pattern): New function.
7666 (vect_recog_widen_mult_pattern): Use it.
7667 (vect_recog_widen_shift_pattern): Likewise.
7668 (vect_recog_widen_sum_pattern): Use
7669 vect_look_through_possible_promotion to handle the promoted
7670 PLUS_EXPR operand.
7671
7672 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7673
7674 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7675 the containing gimple_seq *.
7676 * gimple-iterator.h (gsi_for_stmt): Declare it.
7677 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7678 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7679 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7680 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7681 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7682 checks.
7683 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7684 split out from...
7685 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7686 statement being replaced is part of an existing pattern
7687 definition sequence, inserting the new pattern statements before
7688 the original one.
7689 (vect_pattern_recog_1): Don't return a bool. If the statement
7690 is already part of a pattern, instead apply pattern matching
7691 to the pattern definition statements. Don't clear the
7692 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7693 (vect_pattern_recog): Don't break after the first match;
7694 continue processing the pattern definition statements instead.
7695 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7696
7697 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7698
7699 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7700 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7701 (vect_recog_widen_sum_pattern): Use it.
7702
7703 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7704
7705 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7706 phi is not a pattern statement and has not been replaced by
7707 a pattern statement.
7708 * tree-vect-patterns.c (type_conversion_p): Don't check
7709 STMT_VINFO_IN_PATTERN_P.
7710 (vect_recog_vector_vector_shift_pattern): Likewise.
7711 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7712 the pattern statement rather than the original statement; check
7713 directly for a WIDEN_MULT_EXPR here.
7714 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7715 vect_is_simple_use to return the pattern statement rather
7716 than the original statement; use is_pattern_stmt_p to check
7717 for such a pattern statement.
7718 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7719 to return the pattern statement rather than the original statement;
7720 don't do the same transformation here.
7721 (vect_is_simple_use): If the defining statement has been replaced
7722 by a pattern statement, return the pattern statement instead.
7723 Remove the corresponding (local) transformation from the vectype
7724 overload.
7725
7726 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7727
7728 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7729 end and default to null.
7730 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7731 (vectorizable_reduction): Update calls accordingly, dropping the
7732 gimple ** argument if the passed-back statement isn't needed.
7733 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7734 (vect_recog_rotate_pattern): Likewise.
7735 (vect_recog_mask_conversion_pattern): Likewise.
7736 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7737 (vect_mask_constant_operand_p): Likewise.
7738 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7739 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7740 (get_group_load_store_type, get_load_store_type): Likewise.
7741 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7742 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7743 (vectorizable_conversion, vectorizable_assignment): Likewise.
7744 (vectorizable_shift, vectorizable_operation): Likewise.
7745 (vectorizable_store, vect_is_simple_cond): Likewise.
7746 (vectorizable_condition, vectorizable_comparison): Likewise.
7747 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7748 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7749 and move it to the end. Cope with null def_stmt_outs.
7750
7751 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7752
7753 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7754
7755 2018-06-29 Jeff Law <law@redhat.com>
7756
7757 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7758 displacements for TARGET_V850E2V3 and newer.
7759 (TARGET_LRA_P): Remove. Defaults to LRA now.
7760 * config/v850/v850.md (sign23byte_load): Remove.
7761 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7762 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7763
7764 2018-06-29 Martin Liska <mliska@suse.cz>
7765
7766 PR lto/85759
7767 * coverage.c (coverage_init): Mangle full path name.
7768 * doc/invoke.texi: Document the change.
7769 * gcov-io.c (mangle_path): New.
7770 * gcov-io.h (mangle_path): Likewise.
7771 * gcov.c (mangle_name): Use mangle_path for path mangling.
7772
7773 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7774
7775 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7776 if starting source register is not even.
7777
7778 2018-06-29 Martin Liska <mliska@suse.cz>
7779
7780 PR tree-optimization/86263
7781 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7782 Make edge redirection.
7783
7784 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7785
7786 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7787 (dump_scope_depth): New variable.
7788 (get_dump_scope_depth): New function.
7789 (dump_begin_scope): New function.
7790 (dump_end_scope): New function.
7791 * dumpfile.h (get_dump_scope_depth): New declaration.
7792 (dump_begin_scope): New declaration.
7793 (dump_end_scope): New declaration.
7794 (class auto_dump_scope): New class.
7795 (AUTO_DUMP_SCOPE): New macro.
7796 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7797 AUTO_DUMP_SCOPE.
7798
7799 2018-06-29 Richard Biener <rguenther@suse.de>
7800
7801 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7802 compute_all_dependences succeeds.
7803 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7804 exceed --param loop-max-datarefs-for-datadeps.
7805
7806 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7807
7808 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7809
7810 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7811
7812 PR target/86348
7813 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7814 alternative 0 in preferred_for_speed attribute.
7815
7816 2018-06-28 Paul Koning <ni1d@arrl.net>
7817
7818 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7819 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7820 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7821 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7822 for shift insn patterns.
7823
7824 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7825
7826 * cgraph.c (cgraph_node::get_body): Replace assignments to
7827 "dump_file" with calls to set_dump_file.
7828 * dumpfile.c (alt_dump_file): Make static, and group with...
7829 (alt_flags): ...this definition.
7830 (dumps_are_enabled): New variable.
7831 (refresh_dumps_are_enabled): New function.
7832 (set_dump_file): New function.
7833 (set_alt_dump_file): New function.
7834 (gcc::dump_manager::dump_start): Replace assignments to
7835 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7836 set_alt_dump_file.
7837 (gcc::dump_manager::dump_finish): Likewise.
7838 * dumpfile.h (alt_dump_file): Delete decl.
7839 (dumps_are_enabled): New variable decl.
7840 (set_dump_file): New function decl.
7841 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7842 global.
7843 * tree-nested.c (lower_nested_functions): Replace assignments to
7844 "dump_file" with calls to set_dump_file.
7845
7846 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7847
7848 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7849 goto_locus of each outgoing edge of each basic block.
7850
7851 2018-06-28 Richard Biener <rguenther@suse.de>
7852
7853 * dwarf2out.c (decl_scope_table): Remove.
7854 (push_decl_scope): Likewise.
7855 (pop_decl_scope): Likewise.
7856 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7857 (gen_struct_or_union_type_die): Likewise.
7858 (gen_tagged_type_die): Likewise.
7859 (dwarf2out_init): Do not initialize decl_scope_table.
7860 (dwarf2out_c_finalize): Do not free it.
7861
7862 2018-06-28 Richard Biener <rguenther@suse.de>
7863
7864 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7865 deciding whether to not re-use a DIE.
7866
7867 2018-06-28 Richard Biener <rguenther@suse.de>
7868
7869 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7870 DW_AT_abstract_origin attribute.
7871
7872 2018-06-28 Martin Liska <mliska@suse.cz>
7873
7874 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7875 Use newly introduced constants.
7876 * tree-switch-conversion.h (struct jump_table_cluster):
7877 Define max_ratio_for_size and max_ratio_for_speed.
7878
7879 2018-06-28 Martin Liska <mliska@suse.cz>
7880
7881 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7882 Add new checking assert to catch invalid state.
7883 (jump_table_cluster::can_be_handled): Handle single case
7884 clusters.
7885 (jump_table_cluster::is_beneficial): Bail out for such case.
7886 (bit_test_cluster::find_bit_tests):
7887 Add new checking assert to catch invalid state.
7888 (bit_test_cluster::can_be_handled): Handle single case
7889 clusters.
7890 (bit_test_cluster::is_beneficial): Bail out for such case.
7891 (switch_decision_tree::analyze_switch_statement):
7892 Fix comment.
7893
7894 2018-06-28 Martin Liska <mliska@suse.cz>
7895
7896 * common.opt: Introduce -completion option.
7897 * gcc.c (driver_handle_option): Handle it.
7898 (driver::main): Print completions if completion
7899 is set.
7900 * opt-suggestions.c (option_proposer::get_completions):
7901 New function.
7902 (option_proposer::suggest_completion): Likewise.
7903 (option_proposer::find_param_completions): Likewise.
7904 (verify_autocompletions): Likewise.
7905 (test_completion_valid_options): Likewise.
7906 (test_completion_valid_params): Likewise.
7907 (in_completion_p): Likewise.
7908 (empty_completion_p): Likewise.
7909 (test_completion_partial_match): Likewise.
7910 (test_completion_garbage): Likewise.
7911 (opt_proposer_c_tests): Likewise.
7912 * opt-suggestions.h: Declare new functions.
7913 * opts.c (common_handle_option): Handle OPT__completion_.
7914 * selftest-run-tests.c (selftest::run_tests): Add
7915 opt_proposer_c_tests.
7916 * selftest.c (assert_str_startswith): New.
7917 * selftest.h (assert_str_startswith): Likewise.
7918 (opt_proposer_c_tests): New.
7919 (ASSERT_STR_STARTSWITH): Likewise.
7920
7921 2018-06-28 Martin Liska <mliska@suse.cz>
7922
7923 * Makefile.in: Add opt-suggestions.o.
7924 * gcc-main.c: Include opt-suggestions.h.
7925 * gcc.c (driver::driver): Likewise.
7926 (driver::~driver): Remove m_option_suggestions.
7927 (driver::build_option_suggestions): Moved to option_proposer.
7928 (driver::suggest_option): Likewise.
7929 (driver::handle_unrecognized_options): Use option_proposer.
7930 * gcc.h (class driver): Add new memver m_option_proposer.
7931 * opt-suggestions.c: New file.
7932 * opt-suggestions.h: New file.
7933
7934 2018-06-28 Martin Liska <mliska@suse.cz>
7935
7936 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7937 (auto_string_vec::~auto_string_vec): Likewise.
7938
7939 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7940
7941 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7942 prevent_decl_creation_for_types fields up and add reset_location field.
7943 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7944 statement if id->reset_location is true.
7945 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7946 id->reset_location is true.
7947 (copy_phis_for_bb): Force input_location on the arguments if
7948 id->reset_location is true.
7949 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7950 is set on the function to be inlined.
7951
7952 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7953
7954 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7955
7956 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7957
7958 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7959 registers for Pmode.
7960 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7961 hard registers for the clobbered pseudo.
7962
7963 2018-06-27 Paul Koning <ni1d@arrl.net>
7964
7965 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7966 mutually exclusive options.
7967 * config/pdp11/constraints.md (h): New constraint.
7968 (O): Update definition to match shift code generation.
7969 (D): New constraint.
7970 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7971 (CCFP): Remove.
7972 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7973 function.
7974 (output_jump): Change arguments.
7975 (pdp11_fixed_cc_regs): New function.
7976 (pdp11_cc_mode): Ditto.
7977 (pdp11_expand_shift): Ditto.
7978 (pdp11_assemble_shift): Ditto.
7979 (pdp11_small_shift): Ditto.
7980 (pdp11_branch_cost): Remove.
7981 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7982 from output.
7983 (pdp11_register_move_cost): Update for CC registers.
7984 (pdp11_rtx_costs): Add case for LSHIFTRT.
7985 (pdp11_output_jump): Add CCNZ mode conditional branches.
7986 (notice_update_cc_on_set): Remove.
7987 (pdp11_cc_mode): New function.
7988 (simple_memory_operand): Correct pre/post decrement case.
7989 (no_side_effect_operand): New function.
7990 (pdp11_regno_reg_class): Add CC_REGS class.
7991 (pdp11_fixed_cc_regs): New function.
7992 (pdp11_small_shift): New function.
7993 (pdp11_expand_shift): New function to expand shift insns.
7994 (pdp11_assemble_shift): New function to output shifts.
7995 (pdp11_branch_cost): Remove.
7996 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7997 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7998 (WCHAR_TYPE): Ditto.
7999 (PTRDIFF_TYPE): Ditto.
8000 (ADJUST_INSN_LENGTH): New macro.
8001 (FIXED_REGISTERS): Add CC registers.
8002 (CALL_USED_REGISTERS): Ditto.
8003 (reg_class): Ditto.
8004 (REG_CLASS_NAMES): Ditto.
8005 (REG_CLASS_CONTENTS): Ditto.
8006 (SELECT_CC_MODE): Use new function.
8007 (TARGET_FLAGS_REGNUM): New macro.
8008 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
8009 (cc0_reg_rtx): Remove.
8010 (CC_STATUS_MDEP): Remove.
8011 (CC_STATUS_MDEFP_INIT): Remove.
8012 (CC_IN_FPU): Remove.
8013 (NOTICE_UPDATE_CC): Remove.
8014 (REGISTER_NAMES): Add CC registers.
8015 (BRANCH_COST): Change to constant 1.
8016 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
8017 handling.
8018 * config/pdp11/pdp11.opt (mbcopy): Remove.
8019 (mbcopy-builtin): Remove.
8020 (mbranch-cheap): Remove.
8021 (mbranch-expensive): Remove.
8022 * config/pdp11/predicates.md (expand_shift_operand): Update to
8023 match shift code generation.
8024 (ccnz_operator): New predicate.
8025 * doc/invoke.texi (PDP-11 Options): Remove deleted options
8026 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
8027 Remove non-existent option -mabshi, -mno-abshi. Document mutually
8028 exclusive options.
8029 * doc/md.texi (PDP-11): Document new D and h constraints. Update
8030 description of O constraint.
8031
8032 2018-06-27 Jeff Law <law@redhat.com>
8033 Austin Law <austinklaw@gmail.com>
8034
8035 * config/v850/v850.md (addsi3_set_flags): New pattern.
8036 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
8037 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
8038 (zero_extendhisi2_v850_set_flags): Likewise.
8039 (zero_extendqisi2_v850_set_flags): Likewise.
8040 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
8041 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
8042 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
8043
8044 * config/v850/v850-protos.h (notice_update_cc): Remove.
8045 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
8046 (v850_print_operand): Handle 'D' and "d".
8047 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
8048 Add handling of arithmetic/logical operations compared against zero.
8049 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
8050 Do not look at v850_compare_op, instead get mode from last argument.
8051 (v850_gen_compare): Remove
8052 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
8053 after reload for prologue insns.
8054 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
8055 patterns.
8056 (construct_save_jarl): Likewise.
8057 (TARGET_FLAGS_REGNUM): Define.
8058 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
8059 (NOTICE_UPDATE_CC): Remove.
8060 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
8061 than cc0. Conditionalize on reload_completed.
8062 (cmpsi_insn, setfcc_insn): Likewise.
8063 (tst1 splitter): Turn into define_and_split which sets the flags
8064 after reload.
8065 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
8066 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
8067 (cstoresf4, cstoredf4): Clobber the flags.
8068 (cmpsi, cmpsf, cmpdf): Remove expanders.
8069 (setf_insn): Remove pattern.
8070 (addsi3): Turn into define_and_split which clobbers the flags after
8071 reload and a suitable pattern (addsi3_clobber_flags) for use after
8072 reload.
8073 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
8074 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
8075 (ashrsi3, ashrsi3_v850e2): Likewise.
8076 (bins): Clobber the flags.
8077 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
8078 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
8079 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
8080 (call_value_internal_short, call_value_internal_long): Likewise.
8081 (callt_save_interrupt, callt_return_interrupt): Likewise.
8082 (save_interrupt, return_interrupt): Likewise.
8083 (callt_save_all_interrupt, save_all_interrupt): Likewise.
8084 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
8085 (restore_all_interrupt, _restore_all_interrupt): Likewise.
8086 (All FP comparisons): Only allow after reload has completed.
8087 (trfsr): Likewise.
8088 (divh, divhu): Tweak output template.
8089 (branch_z_normal, branch_z_invert): Remove
8090 (branch_nz_normal, branch_nz_invert): Likewise.
8091 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
8092
8093 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
8094 * config/v850/v850.c (notice_update_cc): Remove.
8095 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
8096 (CC_NO_CARRY): Likewise.
8097 (NOTICE_UPDATE_CC): Define to nothing.
8098 * config/v850/v850.md: Remove block comment on cc0 handling
8099 Remove "cc" attribute from all patterns. Remove cc_status handling
8100 from all patterns. Minor formatting fixes.
8101
8102 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8103
8104 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
8105 (cortex-a76.cortex-a55): Likewise.
8106 * config/aarch64/aarch64-tune.md: Regenerate.
8107 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
8108 cortex-a76.cortex-a55.
8109
8110 2018-06-27 Jeff Law <law@redhat.com>
8111
8112 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
8113 (MULTILIB_DIRNAMES): Similarly.
8114
8115 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
8116
8117 * gimple.h (gimple_return_retbnd): Delete.
8118 (gimple_return_set_retbnd): Likewise.
8119 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
8120 gimple_return_set_retbnd.
8121 * gimple-pretty-print.c (dump_gimple_return): Remove call to
8122 gimple_return_retbnd and adjust.
8123 * tree-inline.h (struct copy_body_data): Remove retbnd field.
8124 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
8125 Explicitly return NULL in a couple more cases. Move assertion
8126 on debug statements and remove unreachable code.
8127 (reset_debug_binding): Do not test id->retbnd.
8128 (expand_call_inline): Do not set it.
8129
8130 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8131
8132 * configure.ac: Add --disable-gcov option.
8133 * configure: Regenerate.
8134 * Makefile.in: Honour @enable_gcov@.
8135 * doc/install.texi: Document --disable-gcov.
8136
8137 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8138
8139 * config/arm/arm-cpus.in (cortex-a76): New entry.
8140 (cortex-a76.cortex-a55): Likewise.
8141 * config/arm/arm-tables.opt: Regenerate.
8142 * config/arm/arm-tune.md: Likewise.
8143 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
8144 * doc/invoke.texi (ARM Options): Document cortex-a76 and
8145 cortex-a76.cortex-a55.
8146
8147 2018-06-27 Tamar Christina <tamar.christina@arm.com>
8148
8149 PR target/85769
8150 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
8151
8152 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
8153
8154 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
8155 comment.
8156 (EPILOGUE_USES): Likewise.
8157
8158 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
8159
8160 * tree-inline.c (remap_location): New function extracted from...
8161 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
8162 (copy_phis_for_bb): ...here. Call remap_location.
8163 (copy_cfg_body): Adjust call to copy_edges_for_bb.
8164
8165 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
8166
8167 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
8168 unaligned vsx for 16B memset.
8169
8170 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
8171
8172 PR target/86285
8173 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
8174 ieee128_float_type_node to long_double_type_node unless
8175 TARGET_LONG_DOUBLE_128 is set.
8176
8177 2018-06-26 David Malcolm <dmalcolm@redhat.com>
8178
8179 * cfgloop.c (get_loop_location): Convert return type from
8180 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
8181 by implicit construction from rtx_insn *, and using
8182 dump_user_location_t::from_function_decl for the fallback case.
8183 * cfgloop.h (get_loop_location): Convert return type from
8184 location_t to dump_user_location_t.
8185 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
8186 dump_printf_loc to pass in a dump_location_t rather than a
8187 location_t, via the gimple stmt.
8188 * coverage.c (get_coverage_counts): Update calls to
8189 dump_printf_loc to pass in dump_location_t rather than a
8190 location_t.
8191 * doc/optinfo.texi (Dump types): Convert example of
8192 dump_printf_loc from taking "locus" to taking "insn". Update
8193 description of the "_loc" calls to cover dump_location_t.
8194 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
8195 "selftest.h".
8196 (dump_user_location_t::dump_user_location_t): New constructors,
8197 from gimple *stmt and rtx_insn *.
8198 (dump_user_location_t::from_function_decl): New function.
8199 (dump_loc): Make static.
8200 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
8201 const dump_location_t &.
8202 (dump_generic_expr_loc): Delete.
8203 (dump_printf_loc): Convert param "loc" from location_t to
8204 const dump_location_t &.
8205 (selftest::test_impl_location): New function.
8206 (selftest::dumpfile_c_tests): New function.
8207 * dumpfile.h: Include "profile-count.h".
8208 (class dump_user_location_t): New class.
8209 (struct dump_impl_location_t): New struct.
8210 (class dump_location_t): New class.
8211 (dump_printf_loc): Convert 2nd param from source_location to
8212 const dump_location_t &.
8213 (dump_generic_expr_loc): Delete.
8214 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
8215 const dump_location_t &.
8216 * gimple-fold.c (fold_gimple_assign): Update call to
8217 dump_printf_loc to pass in a dump_location_t rather than a
8218 location_t, via the gimple stmt.
8219 (gimple_fold_call): Likewise.
8220 * gimple-loop-interchange.cc
8221 (loop_cand::analyze_iloop_reduction_var): Update for change to
8222 check_reduction_path.
8223 (tree_loop_interchange::interchange): Update for change to
8224 find_loop_location.
8225 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
8226 change in return-type of find_loop_location.
8227 (graphite_regenerate_ast_isl): Likewise.
8228 * graphite-optimize-isl.c (optimize_isl): Likewise.
8229 * graphite.c (graphite_transform_loops): Likewise.
8230 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
8231 pass in a dump_location_t rather than a location_t, via the
8232 gimple stmt.
8233 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8234 * ipa.c (walk_polymorphic_call_targets): Likewise.
8235 * loop-unroll.c (report_unroll): Convert "locus" param from
8236 location_t to dump_location_t.
8237 (decide_unrolling): Update for change to get_loop_location's
8238 return type.
8239 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
8240 location_t to dump_user_location_t.
8241 (grid_find_single_omp_among_assignments_1): Updates calls to
8242 dump_printf_loc to pass in a dump_location_t rather than a
8243 location_t, via the gimple stmt.
8244 (grid_parallel_clauses_gridifiable): Convert "tloc" from
8245 location_t to dump_location_t. Updates calls to dump_printf_loc
8246 to pass in a dump_location_t rather than a location_t, via the
8247 gimple stmt.
8248 (grid_inner_loop_gridifiable_p): Likewise.
8249 (grid_dist_follows_simple_pattern): Likewise.
8250 (grid_gfor_follows_tiling_pattern): Likewise.
8251 (grid_target_follows_gridifiable_pattern): Likewise.
8252 (grid_attempt_target_gridification): Convert initialization
8253 of local "grid" from memset to zero-initialization; FIXME: does
8254 this require C++11? Update call to dump_printf_loc to pass in a
8255 optinfo_location rather than a location_t, via the gimple stmt.
8256 * profile.c (read_profile_edge_counts): Updates call to
8257 dump_printf_loc to pass in a dump_location_t rather than a
8258 location_t
8259 (compute_branch_probabilities): Likewise.
8260 * selftest-run-tests.c (selftest::run_tests): Call
8261 dumpfile_c_tests.
8262 * selftest.h (dumpfile_c_tests): New decl.
8263 * tree-loop-distribution.c (pass_loop_distribution::execute):
8264 Update for change in return type of find_loop_location.
8265 * tree-parloops.c (parallelize_loops): Likewise.
8266 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
8267 "locus" from location_t to dump_user_location_t.
8268 (canonicalize_loop_induction_variables): Likewise.
8269 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
8270 for change in return type of find_loop_location.
8271 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
8272 to dump_printf_loc to pass in a dump_location_t rather than a
8273 location_t, via the stmt.
8274 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
8275 Likewise.
8276 * tree-vect-loop-manip.c (find_loop_location): Convert return
8277 type from source_location to dump_user_location_t.
8278 (vect_do_peeling): Update for above change.
8279 (vect_loop_versioning): Update for change in type of
8280 vect_location.
8281 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
8282 from location_t to dump_user_location_t.
8283 (vect_estimate_min_profitable_iters): Update for change in type
8284 of vect_location.
8285 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
8286 location_t to dump_location_t.
8287 (vect_slp_bb): Update for change in type of vect_location.
8288 * tree-vectorizer.c (vect_location): Convert from source_location
8289 to dump_user_location_t.
8290 (try_vectorize_loop_1): Update for change in vect_location's type.
8291 (vectorize_loops): Likewise.
8292 (increase_alignment): Likewise.
8293 * tree-vectorizer.h (vect_location): Convert from source_location
8294 to dump_user_location_t.
8295 (find_loop_location): Convert return type from source_location to
8296 dump_user_location_t.
8297 (check_reduction_path): Convert 1st param from location_t to
8298 dump_user_location_t.
8299 * value-prof.c (check_counter): Update call to dump_printf_loc to
8300 pass in a dump_user_location_t rather than a location_t; update
8301 call to error_at for change in type of "locus".
8302 (check_ic_target): Update call to dump_printf_loc to
8303 pass in a dump_user_location_t rather than a location_t, via the
8304 call_stmt.
8305
8306 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
8307
8308 * config/s390/s390.h (enum processor_flags): Do not use
8309 default tune parameter when -march was specified.
8310
8311 2018-06-26 Jakub Jelinek <jakub@redhat.com>
8312
8313 PR target/86314
8314 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
8315 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
8316 operands.
8317
8318 2018-06-26 Richard Biener <rguenther@suse.de>
8319
8320 PR tree-optimization/86287
8321 PR bootstrap/86316
8322 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
8323 (vect_analyze_loop): Initialize n_stmts.
8324
8325 2018-06-26 Richard Biener <rguenther@suse.de>
8326
8327 PR middle-end/86271
8328 * fold-const.c (fold_convertible_p): Pointer extension
8329 isn't valid.
8330
8331 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
8332
8333 PR debug/86064
8334 * dwarf2out.c (loc_list_has_views): Adjust comments.
8335 (dw_loc_list): Split single cross-partition range with
8336 nonzero locview.
8337
8338 2018-06-25 Jeff Law <law@redhat.com>
8339
8340 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8341 on -mbig-switch by default.
8342
8343 * config/v850/predicates.md (const_float_1_operand): Fix match_code
8344 test.
8345 (const_float_0_operand): Remove unused predicate.
8346 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8347 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8348 (recipsf2): New expander. Original pattern now called
8349 (recipsf2_insn).
8350 (recipdf2, recipdf2_insn): Similarly.
8351 (rsqrtsf2, rsqrtsf2_insn): Similarly
8352 (rsqrtdf2, rsqrtdf2_insn): Similarly
8353
8354 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
8355
8356 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8357 Simplify logic for FreeBSD (twice).
8358
8359 2018-06-25 Martin Sebor <msebor@redhat.com>
8360
8361 PR tree-optimization/86204
8362 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8363 a strnlen result if it's less than the length of the string.
8364
8365 2018-06-25 Martin Sebor <msebor@redhat.com>
8366
8367 PR tree-optimization/85700
8368 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8369 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8370 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8371
8372 2018-06-25 Martin Sebor <msebor@redhat.com>
8373
8374 * doc/extend.texi (Zero-length arrays): Update and clarify.
8375
8376 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
8377
8378 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8379 added IEEE/IBM long double multilib support on PowerPC little
8380 endian Linux systems.
8381 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8382 (MULTILIB_DEFAULTS): Likewise.
8383 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8384 Likewise.
8385 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8386 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8387 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8388
8389 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
8390
8391 PR middle-end/86311
8392 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8393 (REORDER_45): Likewise.
8394
8395 2018-06-25 Jeff Law <law@redhat.com>
8396
8397 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8398 dividend to 32 bits. Adjust length.
8399 (udivmodhi4): Cleanup output template. Fix length.
8400
8401 2018-06-25 Carl Love <cel@us.ibm.com>
8402
8403 * config/rs6000/vsx.md: Change word selector to prefered location.
8404
8405 2018-06-25 Richard Biener <rguenther@suse.de>
8406
8407 PR tree-optimization/86304
8408 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8409 epilogue-if-converted loops as well.
8410
8411 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
8412
8413 * lto-section-out.c (lto_begin_section): Do not print section
8414 name for noaddr and unnumbered dumps.
8415
8416 2018-06-25 Richard Biener <rguenther@suse.de>
8417
8418 * tree-vectorizer.h (struct vec_info_shared): New structure
8419 with parts split out from struct vec_info and loop_nest from
8420 struct _loop_vec_info.
8421 (struct vec_info): Adjust accordingly.
8422 (struct _loop_vec_info): Likewise.
8423 (LOOP_VINFO_LOOP_NEST): Adjust.
8424 (LOOP_VINFO_DATAREFS): Likewise.
8425 (LOOP_VINFO_DDRS): Likewise.
8426 (struct _bb_vec_info): Likewise.
8427 (BB_VINFO_DATAREFS): Likewise.
8428 (BB_VINFO_DDRS): Likewise.
8429 (struct _stmt_vec_info): Add dr_aux member.
8430 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8431 (DR_MISALIGNMENT_UNINITIALIZED): New.
8432 (set_dr_misalignment): Adjust.
8433 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8434 (vect_analyze_loop): Adjust prototype.
8435 (vect_analyze_loop_form): Likewise.
8436 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8437 Compute dependences lazily.
8438 (vect_record_base_alignments): Use shared datarefs/ddrs.
8439 (vect_verify_datarefs_alignment): Likewise.
8440 (vect_analyze_data_refs_alignment): Likewise.
8441 (vect_analyze_data_ref_accesses): Likewise.
8442 (vect_analyze_data_refs): Likewise.
8443 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8444 constructor parameter for shared part.
8445 (vect_analyze_loop_form): Pass in shared part and adjust.
8446 (vect_analyze_loop_2): Pass in storage for the number of
8447 stmts. Move loop nest finding to the caller. Compute
8448 datarefs lazily.
8449 (vect_analyze_loop): Pass in shared part.
8450 (vect_transform_loop): Verify shared datarefs are unchanged.
8451 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8452 constructor parameter for shared part.
8453 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8454 (vect_slp_bb): Verify shared datarefs are unchanged before
8455 transform.
8456 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8457 change.
8458 (new_stmt_vec_info): Initialize DR_AUX misalignment to
8459 DR_MISALIGNMENT_UNINITIALIZED.
8460 * tree-vectorizer.c (vec_info::vec_info): Add constructor
8461 parameter for shared part.
8462 (vec_info::~vec_info): Adjust.
8463 (vec_info_shared::vec_info_shared): New.
8464 (vec_info_shared::~vec_info_shared): Likewise.
8465 (vec_info_shared::save_datarefs): Likewise.
8466 (vec_info_shared::check_datarefs): Likewise.
8467 (try_vectorize_loop_1): Construct shared part live for analyses
8468 of a single loop for multiple vector sizes.
8469 * tree-parloops.c (gather_scalar_reductions): Adjust.
8470
8471 2018-06-25 Richard Biener <rguenther@suse.de>
8472
8473 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8474 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8475 (vect_analyze_data_refs): Remove similar code from here and
8476 simplify accordingly.
8477
8478 2018-06-25 Richard Biener <rguenther@suse.de>
8479
8480 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8481 for reverse storage order accesses rather than asserting
8482 they cannot happen here.
8483
8484 2018-06-25 Tom de Vries <tdevries@suse.de>
8485
8486 PR debug/86257
8487 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8488 Use data16 instead of .byte for insn prefix.
8489
8490 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
8491
8492 PR C++/86082
8493 * parser.c (make_char_string_pack): Pass this literal chars
8494 through cpp_interpret_string.
8495 (cp_parser_userdef_numeric_literal): Check the result of
8496 make_char_string_pack.
8497
8498 2018-06-24 Maya Rashish <coypu@sdf.org>
8499
8500 * ginclude/stddef.h: Simplify conditions around avoiding
8501 re-definition of __size_t.
8502
8503 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8504
8505 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8506 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8507
8508 2018-06-22 Maya Rashish <coypu@sdf.org>
8509
8510 * doc/invoke.texi (mno-fancy-math-387): Update for changes
8511 made to OpenBSD and NetBSD through the years.
8512
8513 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8514
8515 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8516 behavior of vec_pack (vector double, vector double) to match
8517 behavior of vec_float2 (vector double, vector double).
8518
8519 2018-06-22 Olivier Hainque <hainque@adacore.com>
8520
8521 * gimplify.c (gimplify_function_tree): Prevent creation
8522 of a trampoline for the address of the current function
8523 passed to entry/exit instrumentation hooks.
8524
8525 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
8526
8527 PR target/86222
8528 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8529 correctly.
8530
8531 2018-06-22 Martin Liska <mliska@suse.cz>
8532
8533 PR tree-optimization/86263
8534 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8535 Bail out if is_enabled is false.
8536 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8537 New declaration.
8538 (jump_table_cluster::is_enabled): New function.
8539
8540 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8541
8542 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8543 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8544 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8545 (lto_input_ts_binfo_tree_pointers): Likewise.
8546 * tree-streamer-out.c (streamer_write_tree_bitfields,
8547 write_ts_binfo_tree_pointers): Likewise.
8548 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8549
8550 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8551
8552 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8553
8554 2018-06-22 Martin Liska <mliska@suse.cz>
8555
8556 * symbol-summary.h (get): Make it pure and inline move
8557 functionality from ::get function.
8558 (get): Remove and inline into ::get and ::get_create.
8559 (get_create): Move code from ::get function.
8560
8561 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8562
8563 PR target/85994
8564 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8565 -x assembler-with-cpp.
8566
8567 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8568
8569 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8570 _FILE_OFFSET_BITS=64 for C++.
8571
8572 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8573
8574 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8575 conversion insn that shows up when pr85657-3.c is compiled using
8576 IEEE 128-bit long double.
8577 (neg<mode>2_internal): Use the correct mode to check whether the
8578 mode is IBM extended.
8579 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8580 multiply and divide external functions from being created more
8581 than once.
8582
8583 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8584
8585 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8586 functions.
8587 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8588 the edge can be forwarded.
8589 (cfg_layout_merge_blocks): Likewise.
8590
8591 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8592
8593 * except.c (finish_eh_generation): Commit edge insertions only after
8594 the EH edges have been redirected from post-landing to landing pads.
8595
8596 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8597
8598 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8599 create_tmp_var_for to create the FRAME decl.
8600 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8601
8602 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8603
8604 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8605 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8606 debug statement when resetting its value.
8607 (expand_call_inline): Copy the locus of the call onto the assignment
8608 of the return value, if any. Use local variable in more cases.
8609
8610 2018-06-21 Martin Liska <mliska@suse.cz>
8611
8612 * ipa-pure-const.c (propagate_nothrow): Use
8613 funct_state_summaries->get.
8614 (dump_malloc_lattice): Likewise.
8615 (propagate_malloc): Likewise.
8616
8617 2018-06-21 Richard Biener <rguenther@suse.de>
8618
8619 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8620 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8621 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8622 comment.
8623 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8624 BLOCK_ABSTRACT_ORIGIN unconditionally.
8625
8626 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8627
8628 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8629 deleting it.
8630 * ipa-reference.c (ipa_reference_c_finalize): Delete
8631 ipa_ref_opt_sum_summaries and set it to NULL.
8632
8633 2018-06-21 Tom de Vries <tdevries@suse.de>
8634
8635 PR tree-optimization/85859
8636 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8637 test with comment from bb_no_side_effects_p.
8638
8639 2018-06-21 Richard Biener <rguenther@suse.de>
8640
8641 PR tree-optimization/86232
8642 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8643 max for constant niter.
8644
8645 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8646
8647 * config/aarch64/aarch64-simd.md
8648 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8649
8650 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8651
8652 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8653 Make opernads of the unspec commutative.
8654
8655 2018-06-21 Richard Biener <rguenther@suse.de>
8656
8657 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8658 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8659 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8660 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8661 NULL DR_STEP.
8662 (vect_record_base_alignments): Do not record base alignment
8663 for gathers or scatters.
8664 (vect_compute_data_ref_alignment): Drop return value that is always
8665 true. Bail out early for gathers or scatters.
8666 (vect_enhance_data_refs_alignment): Bail out early for gathers
8667 or scatters.
8668 (vect_find_same_alignment_drs): Likewise.
8669 (vect_analyze_data_refs_alignment): Remove dead code.
8670 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8671 (vect_analyze_data_refs): For possible gathers or scatters do
8672 not create an alternate DR, just check their possible validity
8673 and mark them. Adjust DECL_NONALIASED handling to not rely
8674 on DR_BASE_ADDRESS.
8675 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8676 update inits of gathers or scatters.
8677 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8678 Also copy gather/scatter flag to pattern vinfo.
8679
8680 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8681
8682 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8683 behavior of vec_packsu (vector unsigned long long, vector unsigned
8684 long long) to match behavior of vec_packs with same signature.
8685
8686 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8687 Thomas Schwinge <thomas@codesourcery.com>
8688 Cesar Philippidis <cesar@codesourcery.com>
8689
8690 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8691 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8692 (gimplify_adjust_omp_clauses): Likewise.
8693 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8694 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8695 (gimplify_omp_target_update): Update handling of acc update and
8696 enter/exit data.
8697 * omp-low.c (install_var_field): Remove unused parameter
8698 base_pointers_restrict.
8699 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8700 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8701 FINALIZE}
8702 (omp_target_base_pointers_restrict_p): Delete.
8703 (scan_omp_target): Update call to scan_sharing_clauses.
8704 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8705 FINALIZE}.
8706 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8707 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8708 (convert_local_omp_clauses): Likewise.
8709 * tree-pretty-print.c (dump_omp_clause): Likewise.
8710 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8711 FINALIZE}.
8712 (omp_clause_code_name): Likewise.
8713
8714 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8715
8716 PR debug/86194
8717 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8718 be narrowed.
8719
8720 PR tree-optimization/86231
8721 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8722 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8723
8724 2018-06-20 Tom de Vries <tdevries@suse.de>
8725
8726 PR tree-optimization/86097
8727 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8728 iv type if signedness of iv type is not the same as that of *nit.
8729
8730 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8731
8732 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8733 EDGE_EH edges, verify they are all EDGE_EH.
8734
8735 2018-06-20 Maya Rashish <coypu@sdf.org>
8736
8737 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8738
8739 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8740
8741 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8742 * config/aarch64/aarch64.c (xgene1_tunings): Add
8743 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8744 (aarch64_mode_valid_for_sched_fusion_p):
8745 Allow 16-byte modes.
8746 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8747 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8748 128-bit modes.
8749 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8750 New pattern.
8751 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8752 * config/aarch64/iterators.md (VQ2): New mode iterator.
8753
8754 2018-06-20 Martin Liska <mliska@suse.cz>
8755
8756 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8757 Change default ratio from 10 to 8.
8758
8759 2018-06-20 Martin Liska <mliska@suse.cz>
8760
8761 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8762 New.
8763 (bit_test_cluster::find_bit_tests): Likewise.
8764 (switch_decision_tree::analyze_switch_statement): Find clusters.
8765 * tree-switch-conversion.h (struct jump_table_cluster): Document
8766 hierarchy.
8767
8768 2018-06-20 Martin Liska <mliska@suse.cz>
8769
8770 * tree-switch-conversion.c (switch_conversion::collect):
8771 Record m_uniq property.
8772 (switch_conversion::expand): Bail out for special conditions.
8773 (group_cluster::~group_cluster): New.
8774 (group_cluster::group_cluster): Likewise.
8775 (group_cluster::dump): Likewise.
8776 (jump_table_cluster::emit): New.
8777 (switch_decision_tree::fix_phi_operands_for_edges): New.
8778 (struct case_node): Remove struct.
8779 (jump_table_cluster::can_be_handled): New.
8780 (case_values_threshold): Moved to header.
8781 (reset_out_edges_aux): Likewise.
8782 (jump_table_cluster::is_beneficial): New.
8783 (bit_test_cluster::can_be_handled): Likewise.
8784 (add_case_node): Remove.
8785 (bit_test_cluster::is_beneficial): New.
8786 (case_bit_test::cmp): New.
8787 (bit_test_cluster::emit): New.
8788 (expand_switch_as_decision_tree_p): Remove.
8789 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8790 (fix_phi_operands_for_edge): Likewise.
8791 (switch_decision_tree::analyze_switch_statement): New.
8792 (compute_cases_per_edge): Move ...
8793 (switch_decision_tree::compute_cases_per_edge): ... here.
8794 (try_switch_expansion): Likewise.
8795 (switch_decision_tree::try_switch_expansion): Likewise.
8796 (record_phi_operand_mapping): Likewise.
8797 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8798 (emit_case_decision_tree): Likewise.
8799 (switch_decision_tree::emit): Likewise.
8800 (balance_case_nodes): Likewise.
8801 (switch_decision_tree::balance_case_nodes): Likewise.
8802 (dump_case_nodes): Likewise.
8803 (switch_decision_tree::dump_case_nodes): Likewise.
8804 (emit_jump): Likewise.
8805 (switch_decision_tree::emit_jump): Likewise.
8806 (emit_cmp_and_jump_insns): Likewise.
8807 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8808 (emit_case_nodes): Likewise.
8809 (switch_decision_tree::emit_case_nodes): Likewise.
8810 (conditional_probability): Remove.
8811 * tree-switch-conversion.h (enum cluster_type): New.
8812 (PRINT_CASE): New.
8813 (struct cluster): Likewise.
8814 (cluster::cluster): Likewise.
8815 (struct simple_cluster): Likewise.
8816 (simple_cluster::simple_cluster): Likewise.
8817 (struct group_cluster): Likewise.
8818 (struct jump_table_cluster): Likewise.
8819 (struct bit_test_cluster): Likewise.
8820 (struct min_cluster_item): Likewise.
8821 (struct case_tree_node): Likewise.
8822 (case_tree_node::case_tree_node): Likewise.
8823 (jump_table_cluster::case_values_threshold): Likewise.
8824 (struct case_bit_test): Likewise.
8825 (struct switch_decision_tree): Likewise.
8826 (struct switch_conversion): Likewise.
8827 (switch_decision_tree::reset_out_edges_aux): Likewise.
8828
8829 2018-06-20 Martin Liska <mliska@suse.cz>
8830
8831 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8832 (hoist_edge_and_branch_if_true): Likewise.
8833 (expand_switch_using_bit_tests_p): Likewise.
8834 (struct case_bit_test): Likewise.
8835 (case_bit_test_cmp): Likewise.
8836 (emit_case_bit_tests): Likewise.
8837 (switch_conversion::switch_conversion): New class.
8838 (struct switch_conv_info): Remove old struct.
8839 (collect_switch_conv_info): More to ...
8840 (switch_conversion::collect): ... this.
8841 (check_range): Likewise.
8842 (switch_conversion::check_range): Likewise.
8843 (check_all_empty_except_final): Likewise.
8844 (switch_conversion::check_all_empty_except_final): Likewise.
8845 (check_final_bb): Likewise.
8846 (switch_conversion::check_final_bb): Likewise.
8847 (create_temp_arrays): Likewise.
8848 (switch_conversion::create_temp_arrays): Likewise.
8849 (free_temp_arrays): Likewise.
8850 (gather_default_values): Likewise.
8851 (switch_conversion::gather_default_values): Likewise.
8852 (build_constructors): Likewise.
8853 (switch_conversion::build_constructors): Likewise.
8854 (constructor_contains_same_values_p): Likewise.
8855 (switch_conversion::contains_same_values_p): Likewise.
8856 (array_value_type): Likewise.
8857 (switch_conversion::array_value_type): Likewise.
8858 (build_one_array): Likewise.
8859 (switch_conversion::build_one_array): Likewise.
8860 (build_arrays): Likewise.
8861 (switch_conversion::build_arrays): Likewise.
8862 (gen_def_assigns): Likewise.
8863 (switch_conversion::gen_def_assigns): Likewise.
8864 (prune_bbs): Likewise.
8865 (switch_conversion::prune_bbs): Likewise.
8866 (fix_phi_nodes): Likewise.
8867 (switch_conversion::fix_phi_nodes): Likewise.
8868 (gen_inbound_check): Likewise.
8869 (switch_conversion::gen_inbound_check): Likewise.
8870 (process_switch): Use the newly created class.
8871 (switch_conversion::expand): New.
8872 (switch_conversion::~switch_conversion): New.
8873 * tree-switch-conversion.h: New file.
8874
8875 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8876
8877 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8878 tree-vect-patterns.c.
8879 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8880 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8881 (vect_recog_sad_pattern): Likewise.
8882 (vect_recog_widen_sum_pattern): Likewise.
8883 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8884 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8885 (vect_recog_rotate_pattern): Likewise.
8886 (vect_recog_mult_pattern): Likewise.
8887 (vect_recog_vector_vector_shift_pattern): Likewise.
8888 (vect_recog_divmod_pattern): Likewise.
8889 (vect_recog_mixed_size_cond_pattern): Likewise.
8890 (vect_recog_bool_pattern): Likewise.
8891 (vect_recog_mask_conversion_pattern): Likewise.
8892 (vect_try_gather_scatter_pattern): Likewise.
8893 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8894 (vect_recog_over_widening_pattern): Likewise.
8895 (vect_recog_gather_scatter_pattern): Likewise.
8896 (vect_recog_func_ptr): Move from tree-vectorizer.h
8897 (vect_vect_recog_func_ptrs): Move further down the file.
8898 (vect_recog_func): Likewise. Remove the third argument.
8899 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8900 (vect_pattern_recog_1): Expect the pattern function to do any
8901 necessary target tests. Also expect it to provide a vector type.
8902 Remove the type_in handling.
8903
8904 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8905
8906 * tree-vect-patterns.c (vect_pattern_detected): New function.
8907 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8908 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8909 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8910 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8911 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8912 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8913 (vect_recog_mask_conversion_pattern)
8914 (vect_try_gather_scatter_pattern): Likewise.
8915
8916 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8917
8918 * tree-vect-patterns.c (vect_get_internal_def): New function.
8919 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8920 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8921 (search_type_for_mask_1): Use it.
8922
8923 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8924
8925 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8926 redundant WIDEN_SUM_EXPR handling.
8927 (vect_recog_sad_pattern): Likewise.
8928
8929 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8930
8931 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8932 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8933 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8934 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8935 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8936
8937 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8938
8939 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8940 use the stmt_vec_info of the original bb statement for the
8941 new zero assignment, even if the call is part of a pattern.
8942
8943 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8944
8945 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8946 that the sequence is attached to the original statement rather
8947 than the pattern statement.
8948 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8949 PATTERN_DEF_SEQ from the original statement rather than
8950 the main pattern statement.
8951 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8952 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8953 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8954
8955 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8956
8957 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8958 definition statements before the early exit for statements that aren't
8959 live or relevant.
8960 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8961 split out from...
8962 (vect_transform_loop): ...here. Process pattern definition
8963 statements without first checking whether the main pattern
8964 statement is live or relevant.
8965
8966 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8967
8968 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8969 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8970
8971 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8972
8973 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8974 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8975 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8976 (expand_block_compare): Change select_block_compare_mode call.
8977 (expand_strncmp_align_check): Use new functions, fix comment.
8978 (emit_final_str_compare_gpr): New function.
8979 (expand_strn_compare): Refactor and clean up code.
8980 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8981
8982 2018-06-19 Tony Reix <tony.reix@atos.com>
8983 Damien Bergamini <damien.bergamini@atos.com>
8984 David Edelsohn <dje.gcc@gmail.com>
8985
8986 * collect2.c (static_obj): New variable.
8987 (static_libs): New variable.
8988 (is_in_list): Uncomment declaration.
8989 (main): Track AIX libraries linked statically.
8990 (is_in_list): Uncomment definition.
8991 (scan_prog_file): Don't add AIX shared libraries initializer
8992 to constructor list if linking statically.
8993
8994 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8995
8996 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8997 constant.
8998 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8999
9000 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
9001
9002 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
9003 blocks.
9004
9005 2018-06-19 Martin Liska <mliska@suse.cz>
9006
9007 * config/i386/i386.c (ix86_can_inline_p): Do not use
9008 ipa_fn_summaries::get_create.
9009 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
9010 get.
9011 (devirtualization_time_bonus): Likewise.
9012 (ipcp_propagate_stage): Likewise.
9013 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9014 (edge_set_predicate): Likewise.
9015 (evaluate_conditions_for_known_args): Likewise.
9016 (evaluate_properties_for_edge): Likewise.
9017 (ipa_call_summary::reset): Tranform to ...
9018 (ipa_call_summary::~ipa_call_summary): ... this.
9019 (ipa_fn_summary::reset): Transform to ...
9020 (ipa_fn_summary::~ipa_fn_summary): ... this.
9021 (ipa_fn_summary_t::remove): Rename to ...
9022 (ipa_fn_summary_t::remove_callees): ... this.
9023 (ipa_fn_summary_t::duplicate): Use placement new
9024 instead of memory copy.
9025 (ipa_call_summary_t::duplicate): Likewise.
9026 (ipa_call_summary_t::remove): Remove.
9027 (dump_ipa_call_summary): Change get_create to get.
9028 (ipa_dump_fn_summary): Dump only when summary exists.
9029 (analyze_function_body): Use symbol_summary::get instead
9030 of get_create.
9031 (compute_fn_summary): Likewise.
9032 (estimate_edge_devirt_benefit): Likewise.
9033 (estimate_edge_size_and_time): Likewise.
9034 (inline_update_callee_summaries): Likewise.
9035 (remap_edge_change_prob): Likewise.
9036 (remap_edge_summaries): Likewise.
9037 (ipa_merge_fn_summary_after_inlining): Likewise.
9038 (write_ipa_call_summary): Likewise.
9039 (ipa_fn_summary_write): Likewise.
9040 (ipa_free_fn_summary): Likewise.
9041 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
9042 (struct ipa_call_summary): Likewise.
9043 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
9044 of get_create.
9045 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
9046 (estimate_size_after_inlining): Likewise.
9047 (estimate_growth): Likewise.
9048 (growth_likely_positive): Likewise.
9049 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9050 (inline_call): Likewise.
9051 * ipa-inline.c (caller_growth_limits): Likewise.
9052 (can_inline_edge_p): Likewise.
9053 (can_inline_edge_by_limits_p): Likewise.
9054 (compute_uninlined_call_time): Likewise.
9055 (compute_inlined_call_time): Likewise.
9056 (want_inline_small_function_p): Likewise.
9057 (edge_badness): Likewise.
9058 (update_caller_keys): Likewise.
9059 (update_callee_keys): Likewise.
9060 (inline_small_functions): Likewise.
9061 (inline_to_all_callers_1): Likewise.
9062 (dump_overall_stats): Likewise.
9063 (early_inline_small_functions): Likewise.
9064 (early_inliner): Likewise.
9065 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9066 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9067 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9068 * ipa-split.c (execute_split_functions): Likewise.
9069 * symbol-summary.h: Likewise.
9070 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9071
9072 2018-06-19 Richard Biener <rguenther@suse.de>
9073
9074 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
9075 (vectorize_loops): ... here. Fix dbgcnt handling.
9076 (try_vectorize_loop): Wrap try_vectorize_loop_1.
9077
9078 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
9079
9080 PR target/86197
9081 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
9082 ieee128 argument takes up only one (vector) register, not two (floating
9083 point) registers.
9084
9085 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9086
9087 * gimplify.c (gimplify_init_constructor): Really never clear for an
9088 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
9089
9090 2018-06-19 Richard Biener <rguenther@suse.de>
9091
9092 PR tree-optimization/86179
9093 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
9094 after failed recognition.
9095
9096 2018-06-18 Martin Sebor <msebor@redhat.com>
9097
9098 PR middle-end/85602
9099 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
9100 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
9101 Handle integer subtraction.
9102 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
9103 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
9104
9105 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9106
9107 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
9108 param from rtx to rtx_insn *.
9109 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
9110 param.
9111 (frv_ifcvt_modify_insn): Likwise.
9112 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
9113 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
9114 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
9115 as_a <rtx_insn *> cast to local "unprotected_region" once
9116 it's been established that it's not NULL or pc_rtx.
9117 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
9118 param "sethi" from rtx to rtx_insn *.
9119 (nds32_group_float_insns): Likewise for param "insn".
9120 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
9121 param.
9122 (vax_output_int_subtract): Likewise.
9123 * config/vax/vax.c (vax_output_int_add): Likewise for param
9124 "insn".
9125 (vax_output_int_subtract): Likewise.
9126 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
9127 (emit_pattern_after): Likewise for param "after".
9128 (emit_insn_after): Likewise.
9129 (emit_jump_insn_after): Likewise.
9130 (emit_call_insn_after): Likewise.
9131 (emit_debug_insn_after): Likewise.
9132 (emit_pattern_before): Likewise for param "before".
9133 (emit_insn_before): Likewise.
9134 (emit_jump_insn_before): Likewise.
9135 * final.c (get_insn_template): Likewise for param "insn", removing
9136 a cast.
9137 * output.h (get_insn_template): Likewise for 2nd param.
9138 * rtl.h (emit_insn_before): Likewise.
9139 (emit_jump_insn_before): Likewise.
9140 (emit_debug_insn_before_noloc): Likewise.
9141 (emit_insn_after): Likewise.
9142 (emit_jump_insn_after): Likewise.
9143 (emit_call_insn_after): Likewise.
9144 (emit_debug_insn_after): Likewise.
9145 (set_insn_deleted): Likewise for param.
9146
9147 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
9148
9149 PR target/85358
9150 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
9151 floating point modes, so that IFmode is numerically greater than
9152 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
9153 to declare the ordering. This prevents IFmode from being
9154 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
9155 machine. Include rs6000-modes.h to share the fractional values
9156 between genmodes* and the rest of the compiler.
9157 (IFmode): Likewise.
9158 (KFmode): Likewise.
9159 (TFmode): Likewise.
9160 * config/rs6000/rs6000-modes.h: New file.
9161 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
9162 meaning of rs6000_long_double_size so that 126..128 selects an
9163 appropriate 128-bit floating point type.
9164 (rs6000_option_override_internal): Likewise.
9165 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
9166 (TARGET_LONG_DOUBLE_128): Change the meaning of
9167 rs6000_long_double_size so that 126..128 selects an appropriate
9168 128-bit floating point type.
9169 (LONG_DOUBLE_TYPE_SIZE): Update comment.
9170 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
9171 source and destination to match the standard usage.
9172 (truncifkf2): Likewise.
9173 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
9174 ISA 2.07 to use an explicit clobber, instead of passing in a
9175 temporary.
9176 (copysign<mode>3_soft): Likewise.
9177
9178 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9179
9180 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9181 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
9182 (vect_slp_analyze_instance_dependence): Likewise.
9183 (vect_enhance_data_refs_alignment): Likewise.
9184 (vect_analyze_data_refs_alignment): Likewise.
9185 (vect_slp_analyze_and_verify_instance_alignment
9186 (vect_analyze_data_ref_accesses): Likewise.
9187 (vect_prune_runtime_alias_test_list): Likewise.
9188 (vect_analyze_data_refs): Likewise.
9189 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
9190 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
9191 (vect_analyze_scalar_cycles_1): Likewise.
9192 (vect_get_loop_niters): Likewise.
9193 (vect_analyze_loop_form_1): Likewise.
9194 (vect_update_vf_for_slp): Likewise.
9195 (vect_analyze_loop_operations): Likewise.
9196 (vect_analyze_loop): Likewise.
9197 (vectorizable_induction): Likewise.
9198 (vect_transform_loop): Likewise.
9199 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
9200 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9201 (vect_make_slp_decision): Likewise.
9202 (vect_detect_hybrid_slp): Likewise.
9203 (vect_slp_analyze_operations): Likewise.
9204 (vect_slp_bb): Likewise.
9205 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
9206 (vectorizable_bswap): Likewise.
9207 (vectorizable_call): Likewise.
9208 (vectorizable_simd_clone_call): Likewise.
9209 (vectorizable_conversion): Likewise.
9210 (vectorizable_assignment): Likewise.
9211 (vectorizable_shift): Likewise.
9212 (vectorizable_operation): Likewise.
9213 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
9214
9215 2018-06-18 Martin Sebor <msebor@redhat.com>
9216
9217 PR tree-optimization/81384
9218 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
9219 * builtins.c (expand_builtin_strnlen): New function.
9220 (expand_builtin): Call it.
9221 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
9222 * builtins.def (BUILT_IN_STRNLEN): New.
9223 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
9224 Warn for bounds in excess of maximum object size.
9225 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
9226 single-value ranges. Handle strnlen.
9227 (handle_builtin_strlen): Handle strnlen.
9228 (strlen_check_and_optimize_stmt): Same.
9229 * doc/extend.texi (Other Builtins): Document strnlen.
9230
9231 2018-06-18 Maya Rashish <coypu@sdf.org>
9232
9233 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
9234 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
9235 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
9236
9237 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
9238 here to ...
9239 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
9240
9241 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9242
9243 * tree.c (escaped_string::escape): Replace cast to char * by
9244 const_cast<char *> (unescaped).
9245
9246 2018-06-18 Nick Clifton <nickc@redhat.com>
9247
9248 PR 84195
9249 * tree.c (escaped_string): New class. Converts an unescaped
9250 string into its escaped equivalent.
9251 (warn_deprecated_use): Use the new class to convert the
9252 deprecation message, if present.
9253 (test_escaped_strings): New self test.
9254 (test_c_tests): Add test_escaped_strings.
9255 * doc/extend.texi (deprecated): Add a note that the
9256 deprecation message is affected by the -fmessage-length
9257 option, and that control characters will be escaped.
9258 (#pragma GCC error): Document this pragma.
9259 (#pragma GCC warning): Likewise.
9260 * doc/invoke.texi (-fmessage-length): Document this option's
9261 effect on the #warning and #error preprocessor directives and
9262 the deprecated attribute.
9263
9264 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
9265
9266 * tree.c (decl_value_expr_lookup): Revert latest change.
9267 (decl_value_expr_insert): Likewise.
9268
9269 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
9270
9271 * gimplify.c (nonlocal_vlas): Delete.
9272 (nonlocal_vla_vars): Likewise.
9273 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
9274 referenced VLAs.
9275 (gimplify_body): Do not create and destroy nonlocal_vlas.
9276 * tree-nested.c: Include diagnostic.h.
9277 (use_pointer_in_frame): Tweak.
9278 (lookup_field_for_decl): Add assertion and declare the transformation.
9279 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
9280 internal error when the reference is in a wrong context. Do not
9281 create a debug decl by default.
9282 (note_nonlocal_block_vlas): Delete.
9283 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
9284 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
9285 create a debug decl by default.
9286 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
9287 call is in a wrong context.
9288 (fixup_vla_decls): New function.
9289 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
9290 debug variables were created.
9291 * tree.c (decl_value_expr_lookup): Add checking assertion.
9292 (decl_value_expr_insert): Likewise.
9293
9294 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9295
9296 PR middle-end/82479
9297 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
9298 * tree-scalar-evolution.c (interpret_expr): Likewise.
9299 (expression_expensive_p): Likewise.
9300 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
9301 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
9302 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
9303 (ssa_defined_by_minus_one_stmt_p): New.
9304
9305 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9306
9307 PR middle-end/64946
9308 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
9309 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
9310 * dojump.c (do_jump): Likewise.
9311 * expr.c (expand_expr_real_2): Check operand type's sign.
9312 * fold-const.c (const_unop): Handle ABSU_EXPR.
9313 (fold_abs_const): Likewise.
9314 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
9315 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
9316 (strip_sign_op_1): Likesise.
9317 * match.pd: Add new pattern to generate ABSU_EXPR.
9318 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
9319 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9320 * tree-eh.c (operation_could_trap_helper_p): Likewise.
9321 * tree-inline.c (estimate_operator_cost): Likewise.
9322 * tree-pretty-print.c (dump_generic_node): Likewise.
9323 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
9324 * tree.def (ABSU_EXPR): New.
9325
9326 2018-06-16 Jakub Jelinek <jakub@redhat.com>
9327
9328 PR middle-end/86095
9329 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
9330 documented as preserved for backward compatibility only.
9331 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9332
9333 PR rtl-optimization/86108
9334 * bb-reorder.c (create_forwarder_block): Renamed to ...
9335 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
9336 jump from new landing pad to the second part.
9337 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9338 Adjust callers.
9339
9340 2018-06-15 Jakub Jelinek <jakub@redhat.com>
9341
9342 PR middle-end/85878
9343 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9344 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9345 Only call store_expr for halves if the mode is the same.
9346
9347 PR middle-end/86123
9348 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9349 Fix up comment formatting.
9350
9351 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
9352
9353 * typed-splay-tree.h (typed_splay_tree::remove): New function.
9354 (typed_splay_tree::closure,
9355 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9356 (typed_splay_tree::typed_splay_tree,
9357 typed_splay_tree::operator =): Declared private.
9358 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9359 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9360 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9361 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9362 typed_splay_tree::splay_tree_splay,
9363 typed_splay_tree::splay_tree_foreach_helper,
9364 typed_splay_tree::splay_tree_insert,
9365 typed_splay_tree::splay_tree_remove,
9366 typed_splay_tree::splay_tree_lookup,
9367 typed_splay_tree::splay_tree_predecessor,
9368 typed_splay_tree::splay_tree_successor,
9369 typed_splay_tree::splay_tree_min,
9370 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9371 (typed_splay_tree::root, typed_splay_tree::comp,
9372 typed_splay_tree::delete_key,
9373 typed_splay_tree::delete_value): New data members.
9374 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9375 typed_splay_tree::remove.
9376
9377 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
9378
9379 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9380 -mginv and -mno-ginv to the assembler.
9381 * config/mips/mips.opt (-mcrc): New option.
9382 (-mginv): Likewise.
9383 * doc/invoke.text (-mcrc): Document.
9384 (-mginv): Likewise.
9385
9386 2018-06-15 Nick Clifton <nickc@redhat.com>
9387
9388 PR 84195
9389 * tree.c (escaped_string): New class. Converts an unescaped
9390 string into its escaped equivalent.
9391 (warn_deprecated_use): Use the new class to convert the
9392 deprecation message, if present.
9393 (test_escaped_strings): New self test.
9394 (test_c_tests): Add test_escaped_strings.
9395 * doc/extend.texi (deprecated): Add a note that the
9396 deprecation message is affected by the -fmessage-length
9397 option, and that control characters will be escaped.
9398 (#pragma GCC error): Document this pragma.
9399 (#pragma GCC warning): Likewise.
9400 * doc/invoke.texi (-fmessage-length): Document this option's
9401 effect on the #warning and #error preprocessor directives and
9402 the deprecated attribute.
9403
9404 2018-06-15 Richard Biener <rguenther@suse.de>
9405
9406 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9407 here, also noting vector size used.
9408 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
9409 size used in MSG_OPTIMIZED_LOCATIONS dump.
9410 (pass_slp_vectorize::execute): Adjust.
9411
9412 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
9413
9414 PR target/85968
9415 * config/arc/arc.c (arc_return_address_register): Fix
9416 if-condition.
9417
9418 2018-06-15 Richard Biener <rguenther@suse.de>
9419
9420 PR middle-end/86159
9421 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9422 leave useless conversion stripping to force_gimple_operand_gsi.
9423 (gimplify_build2): Likewise.
9424 (gimplify_build1): Likewise.
9425
9426 2018-06-15 Richard Biener <rguenther@suse.de>
9427
9428 PR middle-end/86076
9429 * tree-cfg.c (move_stmt_op): unshare invariant addresses
9430 before adjusting their block.
9431
9432 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
9433
9434 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9435 multilibs for *-*-rtems*.
9436 * config/riscv/t-rtems: New file.
9437
9438 2018-06-14 Jakub Jelinek <jakub@redhat.com>
9439
9440 PR middle-end/86122
9441 * match.pd ((A +- CST1) +- CST2): Punt if last resort
9442 unsigned_type_for returns NULL.
9443
9444 PR target/85945
9445 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9446 subregs of multi-word pseudos unless the float mode has word size.
9447
9448 2018-06-14 Richard Biener <rguenther@suse.de>
9449
9450 PR middle-end/86139
9451 * tree-vect-generic.c (build_word_mode_vector_type): Remove
9452 duplicate and harmful type_hash_canon.
9453 * tree.c (type_hash_canon): Assert we didn't find ourselves.
9454
9455 2018-06-14 Richard Biener <rguenther@suse.de>
9456
9457 PR ipa/86124
9458 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9459 NULL cgraph_node.
9460
9461 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
9462
9463 * config/rtems.h (STDINT_LONG32): Define.
9464
9465 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
9466 Prachi Godbole <prachi.godbole@imgtec.com>
9467
9468 * config/mips/mips-cpus.def: Define P6600.
9469 * config/mips/mips-tables.opt: Regenerate.
9470 * config/mips/mips.c (mips_ucbranch_type): New enum.
9471 (mips_rtx_cost_data): Add support for P6600.
9472 (mips_issue_rate): Likewise.
9473 (mips_multipass_dfa_lookahead): Likewise.
9474 (mips_avoid_hazard): Likewise.
9475 (mips_reorg_process_insns): Likewise.
9476 (mips_classify_branch_p6600): New function.
9477 * config/mips/mips.h (TUNE_P6600): New define.
9478 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9479 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9480 * config/mips/mips.md: Include p6600.md.
9481 (processor): Add p6600.
9482 * config/mips/p6600.md: New file.
9483 * doc/invoke.texi: Add p6600 to supported architectures.
9484
9485 2018-06-13 Martin Sebor <msebor@redhat.com>
9486
9487 PR tree-optimization/86114
9488 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9489 of integer types.
9490 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9491
9492 2018-06-13 Richard Biener <rguenther@suse.de>
9493
9494 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9495 Properly set vector type of the intermediate stmt.
9496 * tree-vect-stmts.c (vectorizable_operation): The destination
9497 var always has vectype_out type.
9498
9499 2018-06-13 Jeff Law <law@redhat.com>
9500
9501 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9502 integer 0 for argument to print_rtl_with_bb.
9503 (rl78_reorg): Likewise.
9504
9505 2018-06-13 David Malcolm <dmalcolm@redhat.com>
9506
9507 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9508 from rtx to rtx_insn *.
9509 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9510 "label".
9511 (add_sched_insns_for_speculation): Likewise for local "target",
9512 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9513 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9514 from rtx_insn ** to rtx_code_label **.
9515 (reorg_emit_nops): Likewise.
9516 (c6x_reorg): Likewise for local "call_labels".
9517 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9518 rtx to rtx_insn *.
9519 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9520 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9521 the loops over LABEL_REFS.
9522 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9523 braf_label.
9524 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9525 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9526 (split_branches): Strengthen local "olabel" from rtx to
9527 rtx_insn *, adding a safe_as_a cast.
9528 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9529 to "rtx_insn *".
9530 (add_insn_after): Likewise for first two params.
9531 (add_insn_before): Likewise.
9532 (remove_insn): Likewise for param.
9533 (emit_pattern_before_noloc): Likewise for second and third params.
9534 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9535 (emit_call_insn_before_noloc): Likewise.
9536 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9537 to "rtx_insn *".
9538 (emit_barrier_before): Likewise.
9539 (emit_label_before): Strengthen "label" param from "rtx" to
9540 "rtx_code_label *". Strengthen "before" param from "rtx" to
9541 "rtx_insn *".
9542 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9543 "rtx_insn *".
9544 (emit_pattern_after_noloc): Likewise.
9545 (emit_insn_after_noloc): Likewise.
9546 (emit_jump_insn_after_noloc): Likewise.
9547 (emit_call_insn_after_noloc): Likewise.
9548 (emit_debug_insn_after_noloc): Likewise.
9549 (emit_barrier_after): Likewise.
9550 (emit_label_after): Likewise for both params.
9551 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9552 "loc" param from "int" to "location_t".
9553 (emit_insn_after_setloc): Likewise.
9554 (emit_jump_insn_after_setloc): Likewise.
9555 (emit_call_insn_after_setloc): Likewise.
9556 (emit_debug_insn_after_setloc): Likewise.
9557 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9558 "loc" param from "int" to "location_t".
9559 (emit_pattern_before): Convert NULL_RTX to NULL.
9560 (emit_insn_before_setloc): Convert "loc" param from "int" to
9561 "location_t".
9562 (emit_jump_insn_before_setloc): Likewise.
9563 (emit_call_insn_before_setloc): Likewise.
9564 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9565 rtx_insn *. Convert "loc" param from "int" to "location_t".
9566 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9567 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9568 Convert 3rd param from "int" to "location_t".
9569 (emit_barrier_before, emit_barrier_after, next_real_insn):
9570 Strengthen param from rtx to rtx_insn *.
9571 (emit_label_before): Strengthen 1st param from "rtx" to
9572 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9573 "rtx_insn *".
9574 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9575 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9576 Strengthen 2nd param from "rtx" to "rtx_insn *".
9577 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9578 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9579 Likewise. Convert 3rd param from "int" to "location_t".
9580 (emit_label_after): Strengthen 1st param from "rtx" to
9581 "rtx_code_label *".
9582 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9583 "rtx_insn *".
9584 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9585 from "rtx" to "rtx_insn *".
9586
9587 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9588
9589 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9590 bodies streamed in with -Q.
9591 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9592 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9593 * gimple-streamer-out.c: Include gimple-pretty-print.h
9594 (output_bb): Dump stmts streamed.
9595 * lto-section-out.c: Include print-tree.h
9596 (lto_begin_section): Dump sections created.
9597 (lto_output_decl_index): Dump decl encoded.
9598 * lto-streamer-out.c: Include print-tree.h
9599 (create_output_block): Dump output block created.
9600 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9601 (output_function): Dump function output.
9602 (output_constructor): Dump constructor streamed.
9603 (write_global_stream): Output indexes encoded.
9604 (produce_asm_for_decls): Dump streams encoded.
9605 * lto-streamer.c (streamer_dump_file): New global var.
9606 * lto-streamer.h (streamer_dump_file): Declare.
9607 * passes.c (ipa_write_summaries): Initialize streamer dump.
9608 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9609 in.
9610
9611 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9612
9613 PR target/86048
9614 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9615 offsets for register save directives. Emit a second batch of save
9616 directives, if need be, when the function accesses prior frames.
9617
9618 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9619
9620 * config/arc/fpu.md (fmasf4): Force operand to register.
9621 (fnmasf4): Likewise.
9622
9623 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9624
9625 * config/arc/arc-protos.h (arc_pad_return): Remove.
9626 * config/arc/arc.c (machine_function): Remove force_short_suffix
9627 and size_reason.
9628 (arc_print_operand): Adjust printing of '&'.
9629 (arc_verify_short): Remove conditional printing of short suffix.
9630 (arc_final_prescan_insn): Remove reference to size_reason.
9631 (pad_return): New function.
9632 (arc_reorg): Call pad_return.
9633 (arc_pad_return): Remove.
9634 (arc_init_machine_status): Remove reference to force_short_suffix.
9635 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9636 (attr length): When attribute iscompact is true force to 2
9637 regardless; in the case of maybe check if we want to force the
9638 instruction to have 4 bytes length.
9639 (nopv): Change it to generate 4 byte long nop as well.
9640 (blockage): New pattern.
9641 (simple_return): Remove call to arc_pad_return.
9642 (p_return_i): Likewise.
9643
9644 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9645
9646 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9647
9648 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9649
9650 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9651 ARC cores.
9652
9653 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9654
9655 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9656 for ARC700 and ARCv2.
9657
9658 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9659
9660 PR target/86076
9661 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9662 operands[2] instead of operands[1].
9663
9664
9665 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9666
9667 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9668 case, check whether the outer register overlaps an unallocatable
9669 register, not just whether it fits the required class.
9670
9671 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9672
9673 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9674 are poly_ints.
9675 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9676 (memrefs_conflict_p): Likewise.
9677 (init_alias_analysis): Likewise.
9678 * cfgexpand.c (expand_debug_expr): Likewise.
9679 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9680 * cse.c (fold_rtx): Likewise.
9681 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9682 * expr.c (emit_block_move_hints): Likewise.
9683 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9684 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9685 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9686 (emit_group_store): Likewise.
9687 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9688 to read the PRE/POST_MODIFY increment.
9689 * calls.c (store_one_arg): Use strip_offset.
9690 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9691 poly_int_rtx_p.
9692 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9693 by a VEC_SELECT.
9694 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9695 (simplify_binary_operation_1): Extend CONST_INT handling to
9696 poly_int_rtx_p.
9697 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9698 than a HOST_WIDE_INT.
9699 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9700 poly_int64.
9701 (adjust_mems, add_stores): Update accodingly.
9702 (vt_canonicalize_addr): Track polynomial offsets.
9703 (emit_note_insn_var_location): Likewise.
9704 (vt_add_function_parameter): Likewise.
9705 (vt_initialize): Likewise.
9706
9707 2018-06-12 Jeff Law <law@redhat.com>
9708
9709 * config.gcc (alpha*-*-freebsd*): Remove.
9710 * config/alpha/freebsd.h: Remove.
9711
9712 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9713
9714 PR other/69968
9715 * spellcheck-tree.c (levenshtein_distance): Rename to...
9716 (get_edit_distance): ...this, and update for underlying renaming.
9717 * spellcheck-tree.h (levenshtein_distance): Rename to...
9718 (get_edit_distance): ...this.
9719 * spellcheck.c (levenshtein_distance): Rename to...
9720 (get_edit_distance): ...this. Convert from Levenshtein distance
9721 to Damerau-Levenshtein distance by supporting transpositions of
9722 adjacent characters. Rename "v1" to "v_next" and "v0" to
9723 "v_one_ago".
9724 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9725 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9726 update for underlying renaming.
9727 (selftest::levenshtein_distance_unit_test): Rename to...
9728 (selftest::test_get_edit_distance_unit): ...this, and update for
9729 underlying renaming.
9730 (selftest::test_find_closest_string): Add example from PR 69968
9731 where transposition helps
9732 (selftest::test_metric_conditions): Update for renaming.
9733 (selftest::test_metric_conditions): Likewise.
9734 (selftest::spellcheck_c_tests): Likewise.
9735 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9736 (get_edit_distance): ...this.
9737 (best_match::consider): Update for renaming.
9738
9739 2018-06-12 Martin Sebor <msebor@redhat.com>
9740
9741 PR tree-optimization/85259
9742 * builtins.c (compute_objsize): Handle constant offsets.
9743 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9744 true iff a warning has been issued.
9745 * gimple.h (gimple_nonartificial_location): New function.
9746 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9747 gimple_nonartificial_location and handle -Wno-system-headers.
9748 (handle_builtin_stxncpy): Same.
9749
9750 2018-06-12 Martin Sebor <msebor@redhat.com>
9751
9752 PR c/85931
9753 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9754
9755 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9756
9757 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9758 BUILTIN_VEC_XST entries for pointer to double and long long.
9759
9760 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9761
9762 PR target/85990
9763 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9764 Update comments.
9765 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9766 Likewise.
9767
9768 2018-06-12 Martin Liska <mliska@suse.cz>
9769
9770 * doc/options.texi: Document IntegerRange.
9771
9772 2018-06-12 Martin Liska <mliska@suse.cz>
9773
9774 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9775 * opt-functions.awk: Handle Deprecated flag.
9776 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9777 and report error.
9778 (read_cmdline_option): Report warning for a deprecated option.
9779 * opts.h (struct cl_option): Add new field cl_deprecated.
9780 (CL_ERR_DEPRECATED): New.
9781
9782 2018-06-12 Martin Liska <mliska@suse.cz>
9783
9784 * doc/options.texi: Document Deprecated option flag.
9785
9786 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9787
9788 * config/arc/arc-arch.h (arc_extras): New enum.
9789 (arc_cpu_t):Add field extra.
9790 (arc_cpu_types): Consider the extras.
9791 * config/arc/arc-cpus.def: Add extras info.
9792 * config/arc/arc-opts.h (processor_type): Consider extra field.
9793 * config/arc/arc.c (arc_override_options): Handle extra field.
9794
9795 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9796
9797 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9798 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9799 field.
9800 * config/arc/arc.c (arc_init): Update pic warning.
9801 (irq_range): Update irq range parsing warnings.
9802 (arc_override_options): Update various warning messages.
9803 (arc_handle_aux_attribute): Likewise.
9804
9805 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9806
9807 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9808
9809 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9810
9811 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9812 compiler messages directives.
9813
9814 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9815
9816 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9817 * config/mips/mips-tables.opt: Regenerate.
9818 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9819 mips64r6.
9820 * doc/invoke.texi: Document -march=i6500.
9821
9822 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9823
9824 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9825 (i6400_gpmul): Add cpu_unit.
9826 (i6400_gpdiv): Likewise.
9827 (i6400_msa_add_d): Update reservations.
9828 (i6400_msa_int_add) Likewise.
9829 (i6400_msa_short_logic3) Likewise.
9830 (i6400_msa_short_logic2) Likewise.
9831 (i6400_msa_short_logic) Likewise.
9832 (i6400_msa_move) Likewise.
9833 (i6400_msa_cmp) Likewise.
9834 (i6400_msa_short_float2) Likewise.
9835 (i6400_msa_div_d) Likewise.
9836 (i6400_msa_long_logic1) Likewise.
9837 (i6400_msa_long_logic2) Likewise.
9838 (i6400_msa_mult) Likewise.
9839 (i6400_msa_long_float2) Likewise.
9840 (i6400_msa_long_float4) Likewise.
9841 (i6400_msa_long_float5) Likewise.
9842 (i6400_msa_long_float8) Likewise.
9843 (i6400_fpu_fadd): Include frint type.
9844 (i6400_fpu_store): New define_insn_reservation.
9845 (i6400_fpu_load): Likewise.
9846 (i6400_fpu_move): Likewise.
9847 (i6400_fpu_fcmp): Likewise.
9848 (i6400_fpu_fmadd): Likewise.
9849 (i6400_int_mult): Include imul3nc type and update reservation.
9850 (i6400_int_div): Include idiv3 type and update reservation.
9851 (i6400_int_load): Update to check type not move_type.
9852 (i6400_int_store): Likewise.
9853 (i6400_int_prefetch): Set zero latency.
9854
9855 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9856
9857 * gcc.c: Document new %@{...} sequence.
9858 (LINK_COMMAND_SPEC): Use it for the -L switches.
9859 (cpp_unique_options): Use it for the -I switches.
9860 (at_file_argbuf): New global variable.
9861 (in_at_file): Likewise.
9862 (alloc_args): Create at_file_argbuf.
9863 (clear_args): Truncate at_file_argbuf.
9864 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9865 (open_at_file): New function.
9866 (close_at_file): Likewise.
9867 (create_at_file): Delete.
9868 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9869 <'o'>: Likewise.
9870 <'@'>: New case.
9871 (validate_switches_from_spec): Deal with %@{...} sequence.
9872 (validate_switches): Likewise.
9873 (driver::finalize): Call clear_args.
9874
9875 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9876
9877 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9878
9879 2018-06-11 Martin Sebor <msebor@redhat.com>
9880
9881 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9882 (Wno-class-memaccess): Add @opindex.
9883 (Wno-templates, Wno-multiple-inheritance): Same.
9884 (Wno-virtual-inheritance, Wno-namespaces): Same.
9885 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9886 (Wno-format-overflow, Wno-format-truncation): Same.
9887 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9888 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9889 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9890 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9891 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9892 (Wno-misspelled-isr): Same.
9893
9894 2018-06-11 Martin Sebor <msebor@redhat.com>
9895
9896 * PR tree-optimization/86083
9897 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9898
9899 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9900
9901 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9902
9903 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9904
9905 PR target/85755
9906 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9907 on the correct operand.
9908 (*movdi_internal64): Ditto.
9909
9910 2018-06-11 Martin Liska <mliska@suse.cz>
9911
9912 PR tree-optimization/86089
9913 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9914
9915 2018-06-11 Julia Koval <julia.koval@intel.com>
9916
9917 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9918 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9919 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9920
9921 2018-06-11 Olivier Hainque <hainque@adacore.com>
9922
9923 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9924 for Ada with strict dwarf2.
9925
9926 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9927
9928 PR target/85755
9929 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9930 addresses.
9931
9932 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9933
9934 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9935
9936 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9937
9938 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9939 TARGET_ELF.
9940
9941 2018-06-08 Martin Liska <mliska@suse.cz>
9942
9943 * tree-cfg.h (debug_function): Fix argument type to match
9944 implementation.
9945
9946 2018-06-08 Martin Liska <mliska@suse.cz>
9947
9948 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9949 Remove usage of MPX-related (and removed) fields.
9950 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9951
9952 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9953
9954 * cfg.c (debug): Use TDF_NONE rather than 0.
9955 * cfghooks.c (debug): Likewise.
9956 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9957 (struct dump_option_value_info): Convert to...
9958 (struct kv_pair): ...this template type.
9959 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9960 rather than 0.
9961 (optinfo_verbosity_options): Likewise.
9962 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9963 OPTGROUP_NONE.
9964 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9965 than int for "optgroup_flags" param.
9966 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9967 "dump_kind" param.
9968 (dump_dec): Likewise.
9969 (dump_finish): Use TDF_NONE rather than 0.
9970 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9971 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9972 than 0. Update for change to option_ptr.
9973 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9974 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9975 0. Update for changes to optinfo_verbosity_options and
9976 optgroup_options.
9977 (opt_info_switch_p): Convert optgroup_flags from int to
9978 optgroup_flags_t.
9979 (dump_basic_block): Use dump_flags_t rather than int
9980 for "dump_kind" param.
9981 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9982 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9983 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9984 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9985 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9986 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9987 TDF_NONE): Convert from macros to...
9988 (enum dump_flag): ...this new enum.
9989 (dump_flags_t): Update to use enum.
9990 (operator|, operator&, operator~, operator|=, operator&=):
9991 Implement for dump_flags_t.
9992 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9993 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9994 Convert from macros to...
9995 (enum optgroup_flag): ...this new enum.
9996 (optgroup_flags_t): New typedef.
9997 (operator|, operator|=): Implement for optgroup_flags_t.
9998 (struct dump_file_info): Convert field "alt_flags" to
9999 dump_flags_t. Convert field "optgroup_flags" to
10000 optgroup_flags_t.
10001 (dump_basic_block): Use dump_flags_t rather than int for param.
10002 (dump_generic_expr_loc): Likewise.
10003 (dump_dec): Likewise.
10004 (dump_register): Convert param "optgroup_flags" to
10005 optgroup_flags_t.
10006 (opt_info_enable_passes): Likewise.
10007 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
10008 than 0.
10009 * gimple-pretty-print.c (debug): Likewise.
10010 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
10011 (merged_store_group::apply_stores): Likewise.
10012 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
10013 * gimple.c (verify_gimple_pp): Likewise.
10014 * graphite-poly.c (print_pbb_body): Likewise.
10015 * passes.c (pass_manager::register_one_dump_file): Convert
10016 local "optgroup_flags" to optgroup_flags_t.
10017 * print-tree.c (print_node): Use TDF_NONE rather than 0.
10018 (debug): Likewise.
10019 (debug_body): Likewise.
10020 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
10021 to optgroup_flags_t.
10022 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
10023 than 0.
10024 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
10025 (convert_mult_to_fma): Likewise.
10026 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
10027 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
10028 * tree-vect-data-refs.c (dump_lower_bound): Convert param
10029 "dump_kind" to dump_flags_t.
10030
10031 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10032
10033 * config/rs6000/rs6000.c (min, max): Delete.
10034
10035 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10036
10037 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
10038 -mabi=spe and -mabi=no-spe.
10039
10040 2018-06-08 Martin Liska <mliska@suse.cz>
10041
10042 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
10043 where we expect an existing summary.
10044
10045 2018-06-08 Martin Liska <mliska@suse.cz>
10046
10047 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
10048 * ipa-inline.h (estimate_edge_growth): Likewise.
10049
10050 2018-06-08 Martin Liska <mliska@suse.cz>
10051
10052 * cgraph.c (function_version_hasher::hash): Use
10053 cgraph_node::get_uid ().
10054 (function_version_hasher::equal):
10055 * cgraph.h (cgraph_node::get_uid): New method.
10056 * ipa-inline.c (update_caller_keys): Use
10057 cgraph_node::get_uid ().
10058 (update_callee_keys): Likewise.
10059 * ipa-utils.c (searchc): Likewise.
10060 (ipa_reduced_postorder): Likewise.
10061 * lto-cgraph.c (input_node): Likewise.
10062 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
10063 * symbol-summary.h (symtab_insertion): Likewise.
10064 (symtab_removal): Likewise.
10065 (symtab_duplication): Likewise.
10066 * tree-pretty-print.c (dump_function_header): Likewise.
10067 * tree-sra.c (convert_callers_for_node): Likewise.
10068
10069 2018-06-08 Martin Liska <mliska@suse.cz>
10070
10071 * cgraph.c (symbol_table::create_edge): Always assign a new
10072 unique number.
10073 (symbol_table::free_edge): Do not recycle numbers.
10074 * cgraph.h (cgraph_edge::get): New method.
10075 * symbol-summary.h (symtab_removal): Use it.
10076 (symtab_duplication): Likewise.
10077 (call_summary::hashable_uid): Remove.
10078
10079 2018-06-08 Martin Liska <mliska@suse.cz>
10080
10081 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
10082 (initialize_growth_caches): Remove.
10083 (free_growth_caches): Likewise.
10084 (do_estimate_edge_time): Use edge_growth_cache.
10085 (do_estimate_edge_size): Likewise.
10086 (do_estimate_edge_hints): Likewise.
10087 * ipa-inline.c (reset_edge_caches): Likewise.
10088 (recursive_inlining): Likewise.
10089 (inline_small_functions): Likewise.
10090 * ipa-inline.h (initialize_growth_caches): Remove.
10091 (estimate_edge_size): Likewise.
10092 (estimate_edge_time): Likewise.
10093 (estimate_edge_hints): Likewise.
10094 (reset_edge_growth_cache): Likewise.
10095 * symbol-summary.h (call_summary::remove): New method.
10096
10097 2018-06-08 Martin Liska <mliska@suse.cz>
10098
10099 * ipa-cp.c (class edge_clone_summary): New summary.
10100 (grow_edge_clone_vectors): Remove.
10101 (ipcp_edge_duplication_hook): Remove.
10102 (class edge_clone_summary_t): New call_summary class.
10103 (ipcp_edge_removal_hook): Remove.
10104 (edge_clone_summary_t::duplicate): New function.
10105 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
10106 (create_specialized_node): Likewise.
10107 (ipcp_driver): Initialize edge_clone_summaries and do not
10108 register hooks.
10109
10110 2018-06-08 Martin Liska <mliska@suse.cz>
10111
10112 * symbol-summary.h (get): New function.
10113 (call_summary::m_initialize_when_cloning): New class member.
10114
10115 2018-06-08 Martin Liska <mliska@suse.cz>
10116
10117 * cgraph.c (cgraph_node::remove): Do not recycle uid.
10118 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
10119 (symbol_table::allocate_cgraph_symbol): Do not set uid.
10120 * passes.c (uid_hash_t): Record removed_nodes by their uids.
10121 (remove_cgraph_node_from_order): Use the removed_nodes set.
10122 (do_per_function_toporder): Likwise.
10123 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
10124 instead of summary_uid.
10125 (symtab_removal): Likewise.
10126 (symtab_duplication): Likewise.
10127
10128 2018-06-08 Martin Liska <mliska@suse.cz>
10129
10130 * ipa-cp.c (ipcp_store_bits_results): Use
10131 ipcp_transformation_sum.
10132 (ipcp_store_vr_results): Likewise.
10133 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
10134 to ...
10135 (ipcp_transformation_initialize): ... this.
10136 (ipa_set_node_agg_value_chain):
10137 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
10138 (write_ipcp_transformation_info): Likewise.
10139 (read_ipcp_transformation_info): Likewise.
10140 (ipcp_update_bits): Likewise.
10141 (ipcp_update_vr): Likewise.
10142 (ipcp_transform_function): Likewise.
10143 * ipa-prop.h: Rename ipcp_transformation_summary to
10144 ipcp_transformation.
10145 (class ipcp_transformation_t): New function summary.
10146 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
10147 (ipa_get_agg_replacements_for_node): Likewise.
10148
10149 2018-06-08 Martin Liska <mliska@suse.cz>
10150
10151 * ipa-pure-const.c (struct funct_state_d): Do it class instead
10152 of struct.
10153 (class funct_state_summary_t): New function_summary class.
10154 (has_function_state): Remove.
10155 (get_function_state): Likewise.
10156 (set_function_state): Likewise.
10157 (add_new_function): Likewise.
10158 (funct_state_summary_t::insert): New function.
10159 (duplicate_node_data): Remove.
10160 (remove_node_data): Remove.
10161 (funct_state_summary_t::duplicate): New function.
10162 (register_hooks): Create new funct_state_summaries.
10163 (pure_const_generate_summary): Use it.
10164 (pure_const_write_summary): Likewise.
10165 (pure_const_read_summary): Likewise.
10166 (propagate_pure_const): Likewise.
10167 (propagate_nothrow): Likewise.
10168 (dump_malloc_lattice): Likewise.
10169 (propagate_malloc): Likewise.
10170 (execute): Do not register hooks, just remove summary
10171 instead.
10172 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
10173 constructor.
10174
10175 2018-06-08 Martin Liska <mliska@suse.cz>
10176
10177 * ipa-reference.c (remove_node_data): Remove.
10178 (duplicate_node_data): Likewise.
10179 (class ipa_ref_var_info_summary_t): New class.
10180 (class ipa_ref_opt_summary_t): Likewise.
10181 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
10182 (get_reference_optimization_summary): Use
10183 ipa_ref_opt_sum_summaries.
10184 (set_reference_vars_info): Remove.
10185 (set_reference_optimization_summary): Likewise.
10186 (ipa_init): Create summaries.
10187 (init_function_info): Use function summary.
10188 (ipa_ref_opt_summary_t::duplicate): New function.
10189 (ipa_ref_opt_summary_t::remove): New function.
10190 (get_read_write_all_from_node): Fix GNU coding style.
10191 (propagate): Use function summary.
10192 (write_node_summary_p): Fix GNU coding style.
10193 (stream_out_bitmap): Likewise.
10194 (ipa_reference_read_optimization_summary): Use function summary.
10195 (ipa_reference_c_finalize): Do not release hooks.
10196
10197 2018-06-08 Martin Liska <mliska@suse.cz>
10198
10199 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
10200 (analyze_function_body): Extract multiple calls of get_create.
10201 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10202 * ipa-inline.c (recursive_inlining): Use ::get method.
10203 * ipa-inline.h (estimate_edge_growth): Likewise.
10204
10205 2018-06-08 Martin Liska <mliska@suse.cz>
10206
10207 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
10208 HSA_INVALID.
10209 (hsa_function_summary::hsa_function_summary): Use the new enum
10210 value.
10211 (hsa_gpu_implementation_p): Use hsa_summaries::get.
10212 * hsa-gen.c (hsa_get_host_function): Likewise.
10213 (get_brig_function_name): Likewise.
10214 * ipa-hsa.c (process_hsa_functions): Likewise.
10215 (ipa_hsa_write_summary): Likewise.
10216 * symbol-summary.h (symtab_duplication): Use ::get function/
10217 (get): New function.
10218
10219 2018-06-08 Martin Liska <mliska@suse.cz>
10220
10221 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
10222 of get.
10223 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
10224 (hsa_register_kernel): Likewise.
10225 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
10226 * hsa-gen.c (hsa_get_host_function): Likewise.
10227 (get_brig_function_name): Likewise.
10228 (generate_hsa): Likewise.
10229 (pass_gen_hsail::execute): Likewise.
10230 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
10231 (devirtualization_time_bonus): Likewise.
10232 (ipcp_propagate_stage): Likewise.
10233 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10234 (edge_set_predicate): Likewise.
10235 (evaluate_conditions_for_known_args): Likewise.
10236 (evaluate_properties_for_edge): Likewise.
10237 (ipa_fn_summary::reset): Likewise.
10238 (ipa_fn_summary_t::duplicate): Likewise.
10239 (dump_ipa_call_summary): Likewise.
10240 (ipa_dump_fn_summary): Likewise.
10241 (analyze_function_body): Likewise.
10242 (compute_fn_summary): Likewise.
10243 (estimate_edge_devirt_benefit): Likewise.
10244 (estimate_edge_size_and_time): Likewise.
10245 (estimate_calls_size_and_time): Likewise.
10246 (estimate_node_size_and_time): Likewise.
10247 (inline_update_callee_summaries): Likewise.
10248 (remap_edge_change_prob): Likewise.
10249 (remap_edge_summaries): Likewise.
10250 (ipa_merge_fn_summary_after_inlining): Likewise.
10251 (ipa_update_overall_fn_summary): Likewise.
10252 (read_ipa_call_summary): Likewise.
10253 (inline_read_section): Likewise.
10254 (write_ipa_call_summary): Likewise.
10255 (ipa_fn_summary_write): Likewise.
10256 (ipa_free_fn_summary): Likewise.
10257 * ipa-hsa.c (process_hsa_functions): Likewise.
10258 (ipa_hsa_write_summary): Likewise.
10259 (ipa_hsa_read_section): Likewise.
10260 * ipa-icf.c (sem_function::merge): Likewise.
10261 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10262 (do_estimate_edge_time): Likewise.
10263 (estimate_size_after_inlining): Likewise.
10264 (estimate_growth): Likewise.
10265 (growth_likely_positive): Likewise.
10266 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10267 (inline_call): Likewise.
10268 * ipa-inline.c (caller_growth_limits): Likewise.
10269 (can_inline_edge_p): Likewise.
10270 (can_inline_edge_by_limits_p): Likewise.
10271 (compute_uninlined_call_time): Likewise.
10272 (compute_inlined_call_time): Likewise.
10273 (want_inline_small_function_p): Likewise.
10274 (edge_badness): Likewise.
10275 (update_caller_keys): Likewise.
10276 (update_callee_keys): Likewise.
10277 (recursive_inlining): Likewise.
10278 (inline_small_functions): Likewise.
10279 (inline_to_all_callers_1): Likewise.
10280 (dump_overall_stats): Likewise.
10281 (early_inline_small_functions): Likewise.
10282 (early_inliner): Likewise.
10283 * ipa-inline.h (estimate_edge_growth): Likewise.
10284 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10285 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10286 * ipa-prop.h (IPA_NODE_REF): Likewise.
10287 (IPA_EDGE_REF): Likewise.
10288 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10289 (propagate_malloc): Likewise.
10290 * ipa-split.c (execute_split_functions): Likewise.
10291 * symbol-summary.h: Rename get to get_create.
10292 (get): Likewise.
10293 (get_create): Likewise.
10294 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10295
10296 2018-06-08 Martin Liska <mliska@suse.cz>
10297
10298 * symbol-summary.h (release): Move definition out of class
10299 declaration.
10300 (symtab_removal): Likewise.
10301 (symtab_duplication): Likewise.
10302
10303 2018-06-08 Martin Liska <mliska@suse.cz>
10304
10305 * symbol-summary.h (function_summary): Move constructor
10306 implementation out of class declaration.
10307 (release): Likewise.
10308 (symtab_insertion): Likewise.
10309 (symtab_removal): Likewise.
10310 (symtab_duplication): Likewise.
10311 (get): Likewise.
10312
10313 2018-06-08 Martin Liska <mliska@suse.cz>
10314
10315 * Makefile.in: Remove support for MPX (macros, related functions,
10316 fields in cgraph_node, ...).
10317 * builtin-types.def (BT_BND): Likewise.
10318 (BT_FN_BND_CONST_PTR): Likewise.
10319 (BT_FN_CONST_PTR_BND): Likewise.
10320 (BT_FN_VOID_PTR_BND): Likewise.
10321 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
10322 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
10323 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
10324 (expand_builtin_mempcpy_with_bounds): Likewise.
10325 (expand_builtin_memset_with_bounds): Likewise.
10326 (expand_builtin_memset_args): Likewise.
10327 (std_expand_builtin_va_start): Likewise.
10328 (expand_builtin): Likewise.
10329 (expand_builtin_with_bounds): Likewise.
10330 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
10331 (DEF_LIB_BUILTIN_CHKP): Likewise.
10332 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10333 (DEF_CHKP_BUILTIN): Likewise.
10334 (BUILT_IN_MEMCPY): Likewise.
10335 (BUILT_IN_MEMMOVE): Likewise.
10336 (BUILT_IN_MEMPCPY): Likewise.
10337 (BUILT_IN_MEMSET): Likewise.
10338 (BUILT_IN_STPCPY): Likewise.
10339 (BUILT_IN_STRCAT): Likewise.
10340 (BUILT_IN_STRCHR): Likewise.
10341 (BUILT_IN_STRCPY): Likewise.
10342 (BUILT_IN_STRLEN): Likewise.
10343 (BUILT_IN_MEMCPY_CHK): Likewise.
10344 (BUILT_IN_MEMMOVE_CHK): Likewise.
10345 (BUILT_IN_MEMPCPY_CHK): Likewise.
10346 (BUILT_IN_MEMSET_CHK): Likewise.
10347 (BUILT_IN_STPCPY_CHK): Likewise.
10348 (BUILT_IN_STRCAT_CHK): Likewise.
10349 (BUILT_IN_STRCPY_CHK): Likewise.
10350 * calls.c (store_bounds): Likewise.
10351 (emit_call_1): Likewise.
10352 (special_function_p): Likewise.
10353 (maybe_warn_nonstring_arg): Likewise.
10354 (initialize_argument_information): Likewise.
10355 (finalize_must_preallocate): Likewise.
10356 (compute_argument_addresses): Likewise.
10357 (expand_call): Likewise.
10358 * cfgexpand.c (expand_call_stmt): Likewise.
10359 (expand_return): Likewise.
10360 (expand_gimple_stmt_1): Likewise.
10361 (pass_expand::execute): Likewise.
10362 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10363 (cgraph_node::remove): Likewise.
10364 (cgraph_node::dump): Likewise.
10365 (cgraph_node::verify_node): Likewise.
10366 * cgraph.h (chkp_function_instrumented_p): Likewise.
10367 (symtab_node::get_alias_target): Likewise.
10368 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10369 (cgraph_local_p): Likewise.
10370 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10371 (cgraph_edge::rebuild_references): Likewise.
10372 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10373 (walk_polymorphic_call_targets): Likewise.
10374 (cgraph_node::expand_thunk): Likewise.
10375 (symbol_table::output_weakrefs): Likewise.
10376 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10377 (ix86_handle_option): Likewise.
10378 * config/i386/constraints.md: Likewise.
10379 * config/i386/i386-builtin-types.def (BND): Likewise.
10380 (VOID): Likewise.
10381 (PVOID): Likewise.
10382 (ULONG): Likewise.
10383 * config/i386/i386-builtin.def (BDESC_END): Likewise.
10384 (BDESC_FIRST): Likewise.
10385 (BDESC): Likewise.
10386 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10387 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10388 * config/i386/i386.c (enum reg_class): Likewise.
10389 (ix86_target_string): Likewise.
10390 (ix86_option_override_internal): Likewise.
10391 (ix86_conditional_register_usage): Likewise.
10392 (ix86_valid_target_attribute_inner_p): Likewise.
10393 (ix86_set_indirect_branch_type): Likewise.
10394 (ix86_set_current_function): Likewise.
10395 (ix86_function_arg_regno_p): Likewise.
10396 (init_cumulative_args): Likewise.
10397 (ix86_function_arg_advance): Likewise.
10398 (ix86_function_arg): Likewise.
10399 (ix86_pass_by_reference): Likewise.
10400 (ix86_function_value_regno_p): Likewise.
10401 (ix86_function_value_1): Likewise.
10402 (ix86_function_value_bounds): Likewise.
10403 (ix86_return_in_memory): Likewise.
10404 (ix86_setup_incoming_vararg_bounds): Likewise.
10405 (ix86_va_start): Likewise.
10406 (indirect_thunk_need_prefix): Likewise.
10407 (print_reg): Likewise.
10408 (ix86_print_operand): Likewise.
10409 (ix86_expand_call): Likewise.
10410 (ix86_output_function_return): Likewise.
10411 (reg_encoded_number): Likewise.
10412 (BDESC_VERIFYS): Likewise.
10413 (ix86_init_mpx_builtins): Likewise.
10414 (ix86_init_builtins): Likewise.
10415 (ix86_emit_cmove): Likewise.
10416 (ix86_emit_move_max): Likewise.
10417 (ix86_expand_builtin): Likewise.
10418 (ix86_builtin_mpx_function): Likewise.
10419 (ix86_get_arg_address_for_bt): Likewise.
10420 (ix86_load_bounds): Likewise.
10421 (ix86_store_bounds): Likewise.
10422 (ix86_load_returned_bounds): Likewise.
10423 (ix86_store_returned_bounds): Likewise.
10424 (ix86_class_likely_spilled_p): Likewise.
10425 (ix86_hard_regno_mode_ok): Likewise.
10426 (x86_order_regs_for_local_alloc): Likewise.
10427 (ix86_mitigate_rop): Likewise.
10428 (ix86_bnd_prefixed_insn_p): Likewise.
10429 (ix86_mpx_bound_mode): Likewise.
10430 (ix86_make_bounds_constant): Likewise.
10431 (ix86_initialize_bounds): Likewise.
10432 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10433 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10434 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10435 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10436 (TARGET_CHKP_BOUND_MODE): Likewise.
10437 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10438 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10439 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10440 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10441 * config/i386/i386.h (TARGET_MPX): Likewise.
10442 (TARGET_MPX_P): Likewise.
10443 (VALID_BND_REG_MODE): Likewise.
10444 (FIRST_BND_REG): Likewise.
10445 (LAST_BND_REG): Likewise.
10446 (enum reg_class): Likewise.
10447 (BND_REG_P): Likewise.
10448 (BND_REGNO_P): Likewise.
10449 (BNDmode): Likewise.
10450 (ADJUST_INSN_LENGTH): Likewise.
10451 * config/i386/i386.md: Likewise.
10452 * config/i386/i386.opt: Likewise.
10453 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10454 (defined): Likewise.
10455 (LINK_MPX): Likewise.
10456 (MPX_SPEC): Likewise.
10457 (LIBMPX_SPEC): Likewise.
10458 (LIBMPXWRAPPERS_SPEC): Likewise.
10459 (CHKP_SPEC): Likewise.
10460 * config/i386/predicates.md: Likewise.
10461 * dbxout.c (dbxout_type): Likewise.
10462 * doc/extend.texi: Likewise.
10463 * doc/invoke.texi: Likewise.
10464 * doc/md.texi: Likewise.
10465 * doc/tm.texi: Likewise.
10466 * doc/tm.texi.in: Likewise.
10467 * dwarf2out.c (is_base_type): Likewise.
10468 (gen_formal_types_die): Likewise.
10469 (gen_subprogram_die): Likewise.
10470 (gen_type_die_with_usage): Likewise.
10471 (gen_decl_die): Likewise.
10472 (dwarf2out_late_global_decl): Likewise.
10473 * expr.c (expand_assignment): Likewise.
10474 (emit_storent_insn): Likewise.
10475 (store_expr_with_bounds): Likewise.
10476 (store_expr): Likewise.
10477 (expand_expr_real_1): Likewise.
10478 * expr.h (store_expr_with_bounds): Likewise.
10479 * function.c (use_register_for_decl): Likewise.
10480 (struct bounds_parm_data): Likewise.
10481 (assign_parms_augmented_arg_list): Likewise.
10482 (assign_parm_find_entry_rtl): Likewise.
10483 (assign_parm_is_stack_parm): Likewise.
10484 (assign_parm_load_bounds): Likewise.
10485 (assign_bounds): Likewise.
10486 (assign_parms): Likewise.
10487 (expand_function_start): Likewise.
10488 * gcc.c (CHKP_SPEC): Likewise.
10489 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10490 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10491 (wrestrict_dom_walker::check_call): Likewise.
10492 * gimple.c (gimple_build_call_from_tree): Likewise.
10493 * gimple.h (enum gf_mask): Likewise.
10494 (gimple_call_with_bounds_p): Likewise.
10495 (gimple_call_set_with_bounds): Likewise.
10496 * gimplify.c (gimplify_init_constructor): Likewise.
10497 * ipa-cp.c (initialize_node_lattices): Likewise.
10498 (propagate_constants_across_call): Likewise.
10499 (find_more_scalar_values_for_callers_subset): Likewise.
10500 * ipa-hsa.c (process_hsa_functions): Likewise.
10501 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10502 * ipa-icf.c (sem_function::merge): Likewise.
10503 * ipa-inline.c (early_inliner): Likewise.
10504 * ipa-pure-const.c (warn_function_noreturn): Likewise.
10505 (warn_function_cold): Likewise.
10506 (propagate_pure_const): Likewise.
10507 * ipa-ref.h (enum GTY): Likewise.
10508 * ipa-split.c (find_retbnd): Likewise.
10509 (consider_split): Likewise.
10510 (split_function): Likewise.
10511 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10512 * ipa.c (walk_polymorphic_call_targets): Likewise.
10513 (symbol_table::remove_unreachable_nodes): Likewise.
10514 (process_references): Likewise.
10515 (cgraph_build_static_cdtor_1): Likewise.
10516 * lto-cgraph.c (lto_output_node): Likewise.
10517 (output_refs): Likewise.
10518 (compute_ltrans_boundary): Likewise.
10519 (input_overwrite_node): Likewise.
10520 (input_node): Likewise.
10521 (input_cgraph_1): Likewise.
10522 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10523 * passes.c (pass_manager::execute_early_local_passes): Likewise.
10524 (class pass_chkp_instrumentation_passes): Likewise.
10525 (make_pass_chkp_instrumentation_passes): Likewise.
10526 * passes.def: Likewise.
10527 * rtl.h (struct GTY): Likewise.
10528 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10529 * stor-layout.c (layout_type): Likewise.
10530 * symtab.c: Likewise.
10531 * target.def: Likewise.
10532 * targhooks.c (default_chkp_bound_type): Likewise.
10533 (default_chkp_bound_mode): Likewise.
10534 (default_builtin_chkp_function): Likewise.
10535 (default_chkp_function_value_bounds): Likewise.
10536 (default_chkp_make_bounds_constant): Likewise.
10537 (default_chkp_initialize_bounds): Likewise.
10538 * targhooks.h (default_chkp_bound_type): Likewise.
10539 (default_chkp_bound_mode): Likewise.
10540 (default_builtin_chkp_function): Likewise.
10541 (default_chkp_function_value_bounds): Likewise.
10542 (default_chkp_make_bounds_constant): Likewise.
10543 (default_chkp_initialize_bounds): Likewise.
10544 * toplev.c (compile_file): Likewise.
10545 (process_options): Likewise.
10546 * tree-core.h (DEF_BUILTIN): Likewise.
10547 (DEF_BUILTIN_CHKP): Likewise.
10548 * tree-inline.c (declare_return_variable): Likewise.
10549 (remap_gimple_stmt): Likewise.
10550 (copy_bb): Likewise.
10551 (initialize_inlined_parameters): Likewise.
10552 (expand_call_inline): Likewise.
10553 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10554 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10555 (make_pass_ipa_chkp_produce_thunks): Likewise.
10556 (make_pass_chkp): Likewise.
10557 (make_pass_chkp_opt): Likewise.
10558 (make_pass_chkp_instrumentation_passes): Likewise.
10559 * tree-pretty-print.c (dump_generic_node): Likewise.
10560 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10561 * tree-ssa-dce.c (propagate_necessity): Likewise.
10562 (eliminate_unnecessary_stmts): Likewise.
10563 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10564 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10565 * tree-ssa-sccvn.h: Likewise.
10566 * tree-ssa-strlen.c (get_string_length): Likewise.
10567 (valid_builtin_call): Likewise.
10568 (adjust_last_stmt): Likewise.
10569 (handle_builtin_strchr): Likewise.
10570 (handle_builtin_strcpy): Likewise.
10571 (handle_builtin_stxncpy): Likewise.
10572 (handle_builtin_memcpy): Likewise.
10573 (handle_builtin_strcat): Likewise.
10574 (strlen_check_and_optimize_stmt): Likewise.
10575 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10576 * tree-streamer-in.c: Likewise.
10577 * tree-streamer.c (record_common_node): Likewise.
10578 * tree.c (tree_code_size): Likewise.
10579 (wide_int_to_tree_1): Likewise.
10580 (type_contains_placeholder_1): Likewise.
10581 (build_common_tree_nodes): Likewise.
10582 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10583 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10584 (POINTER_BOUNDS_P): Likewise.
10585 (BOUNDED_TYPE_P): Likewise.
10586 (BOUNDED_P): Likewise.
10587 (CALL_WITH_BOUNDS_P): Likewise.
10588 (pointer_bounds_type_node): Likewise.
10589 * value-prof.c (gimple_ic): Likewise.
10590 * var-tracking.c (vt_add_function_parameters): Likewise.
10591 * varasm.c (make_decl_rtl): Likewise.
10592 (assemble_start_function): Likewise.
10593 (output_constant): Likewise.
10594 (maybe_assemble_visibility): Likewise.
10595 * varpool.c (ctor_for_folding): Likewise.
10596 * chkp-builtins.def: Remove.
10597 * ipa-chkp.c: Remove.
10598 * ipa-chkp.h: Remove.
10599 * rtl-chkp.c: Remove.
10600 * rtl-chkp.h: Remove.
10601 * tree-chkp-opt.c: Remove.
10602 * tree-chkp.c: Remove.
10603 * tree-chkp.h: Remove.
10604
10605 2018-06-07 Carl Love <cel@us.ibm.com>
10606
10607 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10608 vextract_fp_from_shortl): Add BE support.
10609
10610 2018-06-07 Paul Koning <ni1d@arrl.net>
10611
10612 * compare-elim.c (try_merge_compare): Don't merge compare if
10613 address contains a side effect.
10614 (try_eliminate_compare): Likewise.
10615
10616 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10617
10618 * config.gcc: Support "tremont".
10619 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10620 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10621 PROCESSOR_TREMONT.
10622 * config/i386/i386.c (m_TREMONT): Define.
10623 (processor_target_table): Add "tremont".
10624 (PTA_TREMONT): Define.
10625 (ix86_lea_outperforms): Add TARGET_TREMONT.
10626 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10627 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10628 and M_INTEL_GOLDMONT_PLUS.
10629 (fold_builtin_cpu): Add "tremont".
10630 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10631 (ix86_option_override_internal): Add "tremont".
10632 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10633 (processor_type): Add PROCESSOR_TREMONT.
10634 * config/i386/x86-tune.def: Add m_TREMONT.
10635 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10636
10637 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10638
10639 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10640 symbol defined for msp430i* devices to be lower case.
10641
10642 2018-06-07 Richard Biener <rguenther@suse.de>
10643
10644 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10645 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10646 Properly wrap signed arithmetic if overflow wraps.
10647
10648 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10649
10650 PR tree-optimization/69615
10651 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10652 of a cast from a same precision integral SSA_NAME in a bb dominated
10653 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10654 cast to utype if rhs2 has already a compatible type.
10655
10656 2018-06-07 Richard Biener <rguenther@suse.de>
10657
10658 PR tree-optimization/85935
10659 * graphite-scop-detection.c (find_params_in_bb): Analyze
10660 condition operands with respect to the correct loop. Assert
10661 the analysis doesn't fail.
10662
10663 2018-06-04 Carl Love <cel@us.ibm.com>
10664
10665 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10666 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10667 as it is slightly cheaper.
10668 (first_match_or_eos_index_<mode>):
10669 Calculate index using natural element order.
10670 (first_match_index_<mode>):
10671 Calculate index using natural element order.
10672 (first_match_or_eos_index_<mode>):
10673 Calculate index using natural order.
10674 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10675 for BE and LE modes.
10676 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10677 P9V_BUILTIN_VCLZLSBB_V16QI.
10678 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10679 specific.
10680
10681 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10682
10683 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10684 indentation and line wrap for many prototypes. Add missing
10685 @smallexample directives around block of prototypes for vec_xl and
10686 vec_xst.
10687
10688 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10689
10690 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10691 track if we pass or return IEEE 128-bit floating point.
10692 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10693 C++ mangling that is compatible with GCC 8.1.
10694 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10695 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10696 floating point types.
10697 (rs6000_function_arg_advance_1): Likewise.
10698 (rs6000_mangle_type): Optionally generate mangled names that match
10699 what GCC 8.1 generated for IEEE 128-bit floating point types.
10700 (rs6000_globalize_decl_name): If we have an external function that
10701 passes or returns IEEE 128-bit types, generate a weak reference
10702 from the mangled name used in GCC 8.1 to the current mangled
10703 name.
10704 (rs6000_init_builtins): Make __ibm128 use the long double type if
10705 long double is IBM extended double. Make __float128 use the long
10706 double type if long double is IEEE 128-bit.
10707
10708 PR target/85657
10709 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10710 macro for __ibm128 built-in functions.
10711 (PACK_IF): Add __ibm128 pack/unpack functions.
10712 (UNPACK_IF): Likewise.
10713 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10714 enable long double built-in functions if long double is IEEE
10715 128-bit floating point.
10716 (rs6000_invalid_builtin): Update long double built-in function
10717 error message.
10718 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10719 functions, adjust the built-in function to use the long double
10720 built-in function if __ibm128 and long double are the same type.
10721 * doc/extend.texi (PowerPC builtins): Update documention for
10722 __builtin_{,un}pack_longdouble. Add documentation for
10723 __builtin_{,un}pack_ibm128.
10724
10725 2018-06-06 Jim Wilson <jimw@sifive.com>
10726
10727 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10728 (struct machine_function): New field interrupt_mode.
10729 (riscv_handle_type_attribute): New function. Add forward declaration.
10730 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10731 (riscv_expand_epilogue): Check interrupt_mode field.
10732 (riscv_set_current_function): Check interrupt attribute args and
10733 set interrupt_mode field.
10734 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10735 (riscv_sret, riscv_uret): New.
10736 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10737 new arguments to interrupt attribute.
10738
10739 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10740
10741 PR target/63177
10742 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10743 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10744
10745 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10746
10747 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10748 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10749 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10750 several redundant entries.
10751
10752 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10753
10754 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10755 type from "rtx" to "rtx_insn *".
10756 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10757 for local "call_insn", removing cast.
10758 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10759
10760 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10761
10762 PR tree-optimization/86066
10763 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10764 for BIT_INSERT_EXPR stores.
10765
10766 2018-06-06 Richard Biener <rguenther@suse.de>
10767
10768 PR tree-optimization/86062
10769 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10770 component refs ontop
10771 of to be offsetted base.
10772
10773 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10774
10775 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10776 to be static and remove check on interrupt attribute name.
10777
10778 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10779
10780 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10781 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10782
10783 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10784
10785 PR target/79924
10786 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10787 second argument.
10788 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10789 Remove second argument, change how error is called.
10790 (aarch64_layout_arg): Remove second argument from
10791 aarch64_err_no_fpadvsimd call.
10792 (aarch64_init_cumulative_args): Ditto.
10793 (aarch64_gimplify_va_arg_expr): Ditto.
10794 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10795
10796 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10797
10798 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10799 (*simple_return_indirect_internal<mode>): Rename from
10800 simple_return_indirect_internal. Use W mode iterator.
10801 (rstorssp): New expander.
10802 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10803 (clrssbsy): New expander.
10804 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10805
10806 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10807
10808 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10809 __typeof__.
10810 (cmse_check_pointed_object): Likewise.
10811
10812 2018-06-05 Martin Liska <mliska@suse.cz>
10813
10814 PR gcov-profile/47618
10815 * doc/invoke.texi: Document how -fprofile-dir format
10816 is extended.
10817
10818 2018-06-05 Richard Biener <rguenther@suse.de>
10819
10820 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10821 removal pretend DOM info isn't available so we do not update
10822 it and only remove edges, not dominated blocks. Actually free
10823 DOM info in case we removed something. Remove unreachable blocks.
10824 (mfb_keep_latches): Work with either DOM info or marked backedges.
10825 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10826 first. Mark backedges if DOM info isn't available.
10827 (Re-)compute DOM info after cleanup_control_flow_pre.
10828
10829 2018-06-05 Richard Biener <rguenther@suse.de>
10830
10831 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10832 (locus_discrim_hasher::hash): Adjust.
10833 (locus_discrim_hasher::equal): Likewise.
10834 (next_discriminator_for_locus): Work on line directly.
10835 (same_line_p): Pass in expanded locus1 as well.
10836 (assign_discriminators): Avoid redundant location expansions.
10837
10838 2018-06-05 Richard Biener <rguenther@suse.de>
10839
10840 PR tree-optimization/86046
10841 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10842 if required after clearing TREE_ADDRESSABLE.
10843
10844 2018-06-05 Richard Biener <rguenther@suse.de>
10845
10846 PR tree-optimization/86047
10847 * tree-ssa-loop.c (for_each_index): Glob handling of all
10848 decls and constants and really handle all of them.
10849
10850 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10851
10852 PR target/81497
10853 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10854 qualifier_void_pointer and qualifier_const_void_pointer.
10855 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10856 (arm_init_builtins): Handle the above.
10857 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10858 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10859 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10860 void intrinsics.
10861
10862 2018-06-05 Martin Liska <mliska@suse.cz>
10863
10864 * auto-profile.c (read_autofdo_file): Do not use
10865 gcov_ctr_summary struct.
10866 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10867 * coverage.c (struct counts_entry): Likewise.
10868 (read_counts_file): Read just single summary entry.
10869 (get_coverage_counts): Use gcov_summary struct.
10870 * coverage.h (get_coverage_counts): Likewise.
10871 * gcov-dump.c (dump_working_sets): Likewise.
10872 (tag_summary): Dump just single summary.
10873 * gcov-io.c (gcov_write_summary): Write just histogram
10874 summary.
10875 (gcov_read_summary): Read just single summary.
10876 (compute_working_sets): Use gcov_summary struct.
10877 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10878 of GCOV_COUNTERS_SUMMABLE.
10879 (GCOV_COUNTERS_SUMMABLE): Remove.
10880 (GCOV_FIRST_VALUE_COUNTER): Replace with
10881 GCOV_COUNTER_V_INTERVAL.
10882 (struct gcov_ctr_summary): Remove.
10883 (struct gcov_summary): Directly use fields of former
10884 gcov_ctr_summary.
10885 (compute_working_sets): Use gcov_summary struct.
10886 * gcov.c (read_count_file): Do not use ctrs fields.
10887 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10888 struct.
10889 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10890 struct.
10891 * profile.c: Likewise.
10892 * profile.h: Likewise.
10893
10894 2018-06-05 Martin Liska <mliska@suse.cz>
10895
10896 PR gcov-profile/84846
10897 * gcov.c (output_lines): Print working directory only
10898 in intermediate format.
10899
10900 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10901
10902 * config/s390/s390-builtin-types.def: Add void function type.
10903 * config/s390/s390-builtins.def: Use the function type for the
10904 tbeginc builtin.
10905
10906 2018-06-04 Jim Wilson <jimw@sifive.com>
10907
10908 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10909 to int.
10910 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10911 and maybe_eh_return. Change regno to unsigned int. Use new args to
10912 handle EH_RETURN_DATA_REGNO registers properly.
10913 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10914 (riscv_expand_epilogue): Update comment. Change argument name and
10915 type. Update code to use new name and type. Pass new args to
10916 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10917 EXCEPTION_RETURN.
10918 * config/riscv/riscv.md (NORMAL_RETURN): New.
10919 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10920 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10921 (eh_return): Call gen_eh_return_internal and emit barrier.
10922 (eh_return_internal): Call riscv_expand_epilogue.
10923
10924 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10925
10926 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10927 bit_insertion field and declare can_be_merged_into method.
10928 (merged_store_group::can_be_merged_into): New method.
10929 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10930 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10931 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10932
10933 2018-06-04 Richard Biener <rguenther@suse.de>
10934
10935 PR tree-optimization/85955
10936 * builtins.c (fold_builtin_sincos): Convert pointers to
10937 destination to appropriate type before dereferencing.
10938
10939 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10940
10941 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10942
10943 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10944
10945 * expr.c (expand_expr_real_1): Force the operand into memory if
10946 its TYPE_MODE is BLKmode and if there is no integer mode for
10947 the number of bits being extracted.
10948
10949 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10950
10951 PR target/85832
10952 PR target/86036
10953 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10954 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10955
10956 2018-06-04 Richard Biener <rguenther@suse.de>
10957
10958 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10959 (cleanup_tree_cfg_noloop): ... single caller. Do
10960 start_recording_case_labels later.
10961
10962 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10963
10964 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10965 to _IMMINTRIN_H_INCLUDED.
10966 * config/i386/pconfigintrin.h: Ditto.
10967 * config/i386/waitpkgintrin.h: Ditto.
10968 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10969 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10970 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10971 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10972 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10973 waitpkgintrin.h and cldemoteintrin.h.
10974
10975 2018-06-04 Richard Biener <rguenther@suse.de>
10976
10977 PR tree-optimization/86038
10978 * tracer.c (find_best_successor): Check probability for
10979 being initialized, bail out if not.
10980
10981 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10982
10983 PR target/86003
10984 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10985 of bits to ignore when comparing architectures.
10986
10987 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10988
10989 PR tree-optimization/69615
10990 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10991 maximum or minimum of the type, try to merge it also as if
10992 range1 is + [-, x - 1] or + [x + 1, -].
10993
10994 PR c++/86025
10995 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10996
10997 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10998
10999 PR tree-optimization/86034
11000 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
11001 the unsigned bitfield type in a bit insertion sequence if it does not
11002 have a larger precision than the bitfield size.
11003 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
11004
11005 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
11006
11007 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
11008
11009 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11010
11011 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
11012 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
11013 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
11014 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
11015
11016 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11017
11018 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
11019 Disable -fdelete-null-pointer-checks for ELF toolchain.
11020
11021 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11022 Kito Cheng <kito.cheng@gmail.com>
11023
11024 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
11025 (nds32le-*-*, nds32be-*-*): Integrate checking process.
11026 (nds32*-*-*): Add glibc and uclibc conditions.
11027 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
11028 (TARGET_EXCEPT_UNWIND_INFO): Define.
11029 * config/nds32/elf.h: New file.
11030 * config/nds32/linux.h: New file.
11031 * config/nds32/nds32-elf.opt: New file.
11032 * config/nds32/nds32-linux.opt: New file.
11033 * config/nds32/nds32-fp-as-gp.c
11034 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
11035 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
11036 TARGET_LINUX_ABI.
11037 (nds32_asm_file_end): Ditto.
11038 (nds32_print_operand): Ditto.
11039 (nds32_insert_attributes): Ditto.
11040 (nds32_init_libfuncs): New function.
11041 (TARGET_HAVE_TLS): Define.
11042 (TARGET_INIT_LIBFUNCS): Define.
11043 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
11044 spec content.
11045 (TARGET_ELF): Apply different mcmodel setting.
11046 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
11047 been migrated into elf.h and linux.h files.
11048 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
11049 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
11050 (mcmodel): The content has been migrated into nds32-elf.opt and
11051 nds32-linux.opt files.
11052 * config/nds32/t-elf: New file.
11053 * config/nds32/t-linux: New file.
11054
11055 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11056 Shiva Chen <shiva0217@gmail.com>
11057
11058 * config/nds32/constants.md (unspec_volatile_element): Add
11059 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
11060 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
11061 optimization.
11062 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
11063 (make_pass_nds32_fp_as_gp): Declare.
11064 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
11065 optmization pass.
11066 (nds32_asm_function_end_prologue): Remove unused asm output.
11067 (nds32_asm_function_begin_epilogue): Remove unused asm output.
11068 (nds32_asm_file_start): Output necessary fp_as_gp information.
11069 (nds32_option_override): Adjust register usage.
11070 (nds32_expand_prologue): Consider fp_as_gp situation.
11071 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
11072 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
11073 (epilogue): Ditto.
11074 (return): Ditto.
11075 (simple_return): Ditto.
11076 (omit_fp_begin): Output special directive for fp_as_gp.
11077 (omit_fp_end): Output special directive for fp_as_gp.
11078 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
11079 mforbid-fp-as-gp): New options.
11080
11081 2018-06-01 Mark Wielaard <mark@klomp.org>
11082
11083 * dwarf2out.c (dwarf2out_finish): Remove generation of
11084 DW_AT_loclists_base.
11085
11086 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
11087
11088 * gimple-ssa-store-merging.c: Include gimple-fold.h.
11089 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
11090 (struct merged_store_group): Add bit_insertion field.
11091 (dump_char_array): Use standard hexadecimal format.
11092 (merged_store_group::merged_store_group): Set bit_insertion to false.
11093 (merged_store_group::apply_stores): Use optimal buffer size. Deal
11094 with BIT_INSERT_EXPR stores. Move up code updating the mask and
11095 also print the mask in the dump file.
11096 (pass_store_merging::gate): Minor tweak.
11097 (imm_store_chain_info::coalesce_immediate): Fix wrong association
11098 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
11099 stores with INTEGER_CST stores.
11100 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
11101 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
11102 and use it throughout. Generate bit insertion sequences if need be.
11103 (pass_store_merging::process_store): Remove redundant condition.
11104 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
11105
11106 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
11107
11108 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
11109 the 128-bit floating point types. Fix function comment.
11110
11111 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11112
11113 * config/aarch64/aarch64-simd.md
11114 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
11115 mnemonics.
11116 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
11117 mnemonics.
11118
11119 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11120
11121 PR tree-optimization/85989
11122 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
11123 variable.
11124 (backprop::intersect_uses): Check it when deciding whether this
11125 is a backedge reference.
11126 (backprop::process_block): Add each phi to m_visited_phis
11127 after visiting it, then clear it at the end.
11128
11129 2018-06-01 Richard Biener <rguenther@suse.de>
11130
11131 * tree-vectorizer.h (vect_dr_stmt): New function.
11132 (vect_get_load_cost): Adjust.
11133 (vect_get_store_cost): Likewise.
11134 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
11135 Use vect_dr_stmt instead of DR_SMTT.
11136 (vect_record_base_alignments): Likewise.
11137 (vect_calculate_target_alignment): Likewise.
11138 (vect_compute_data_ref_alignment): Likewise and make static.
11139 (vect_update_misalignment_for_peel): Likewise.
11140 (vect_verify_datarefs_alignment): Likewise.
11141 (vector_alignment_reachable_p): Likewise.
11142 (vect_get_data_access_cost): Likewise. Pass down
11143 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
11144 (vect_get_peeling_costs_all_drs): Likewise.
11145 (vect_peeling_hash_get_lowest_cost): Likewise.
11146 (vect_enhance_data_refs_alignment): Likewise.
11147 (vect_find_same_alignment_drs): Likewise.
11148 (vect_analyze_data_refs_alignment): Likewise.
11149 (vect_analyze_group_access_1): Likewise.
11150 (vect_analyze_group_access): Likewise.
11151 (vect_analyze_data_ref_access): Likewise.
11152 (vect_analyze_data_ref_accesses): Likewise.
11153 (vect_vfa_segment_size): Likewise.
11154 (vect_small_gap_p): Likewise.
11155 (vectorizable_with_step_bound_p): Likewise.
11156 (vect_prune_runtime_alias_test_list): Likewise.
11157 (vect_analyze_data_refs): Likewise.
11158 (vect_supportable_dr_alignment): Likewise.
11159 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11160 (vect_gen_prolog_loop_niters): Likewise.
11161 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11162 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
11163 modify DR_STMT.
11164 (vect_recog_mask_conversion_pattern): Likewise.
11165 (vect_try_gather_scatter_pattern): Likewise.
11166 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
11167 to vect_get_store_cost.
11168 (vect_get_store_cost): Get stmt_info instead of DR.
11169 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
11170 (vect_get_load_cost): Get stmt_info instead of DR.
11171
11172 2018-06-01 Richard Biener <rguenther@suse.de>
11173
11174 PR middle-end/86017
11175 * gimple-fold.c (var_decl_component_p): Also allow offsetted
11176 vars wrapped in MEM_REFs.
11177
11178 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11179
11180 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11181 Fix subreg tests so that we only return a choice between
11182 GENERAL_REGS and FP_REGS if the original classes included both.
11183
11184 2018-06-01 Richard Biener <rguenther@suse.de>
11185
11186 PR ipa/85960
11187 * tree-ssa-structalias.c (get_function_part_constraint):
11188 Handle NULL fi->decl.
11189 (find_func_aliases_for_call): Properly handle indirect
11190 fi from direct call.
11191 (find_func_clobbers): Likewise.
11192 (ipa_pta_execute): Likewise.
11193 (create_variable_info_for): For functions that are ifunc_resolver
11194 resolve to a varinfo that contains the result of the resolver call.
11195 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
11196 aliases.
11197
11198 2018-05-31 Michael Collison <michael.collison@arm.com>
11199
11200 * config/aarch64/aarch64.md:
11201 (*fix_to_zero_extenddfdi2): New pattern.
11202 * gcc.target/aarch64/fix_extend1.c: New testcase.
11203
11204 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
11205
11206 PR middle-end/78809
11207 PR middle-end/83026
11208 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
11209 and BUILT_IN_STRNCMP_EQ.
11210 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
11211 BUILT_IN_STRNCMP_EQ.
11212 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
11213 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11214 (gimple_fold_builtin): Likewise.
11215 * tree-ssa-strlen.c (compute_string_length): New function.
11216 (determine_min_obsize): New function.
11217 (handle_builtin_string_cmp): New function to handle calls to
11218 string compare functions.
11219 (strlen_optimize_stmt): Add handling to builtin string compare
11220 calls.
11221 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
11222 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11223 * tree.c (build_common_builtin_nodes): Add new defines of
11224 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
11225
11226 2018-05-31 Jakub Jelinek <jakub@redhat.com>
11227
11228 PR target/85984
11229 * bb-reorder.c (pass_partition_blocks::gate): Return false for
11230 functions with naked attribute.
11231
11232 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
11233
11234 * config/i386/sse.md (avx_vec_concat<mode>):
11235 Substitute concat_tg_mode mode attribute with xtg_mode.
11236 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
11237 (concat_tg_mode): Remove mode attribute.
11238
11239 2018-05-31 Martin Sebor <msebor@redhat.com>
11240
11241 PR c/82063
11242 * calls.c (alloc_max_size): Correct a logic error/typo.
11243 Treat excessive arguments as infinite. Warn for invalid arguments.
11244 * doc/invoke.texi (-Walloc-size-larger-than): Update.
11245
11246 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
11247
11248 PR target/85829
11249 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
11250 and movx for Haswell.
11251
11252 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
11253 Cesar Philippidis <cesar@codesourcery.com>
11254
11255 PR middle-end/85879
11256 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
11257 when emitting error on private/firstprivate reductions.
11258 * omp-low.c (lower_omp_target): Avoid reference-type processing
11259 on pointers for firstprivate clause.
11260
11261 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11262
11263 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
11264 (st1x2): Likewise.
11265 (st1x3): Likewise.
11266 * config/aarch64/aarch64-simd.md
11267 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
11268 (aarch64_ld1_x3_<mode>): Likewise
11269 (aarch64_st1x2<VALLDIF:mode>): Likewise
11270 (aarch64_st1_x2_<mode>): Likewise
11271 (aarch64_st1x3<VALLDIF:mode>): Likewise
11272 (aarch64_st1_x3_<mode>): Likewise
11273 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
11274 (vld1_s8_x3): Likewise.
11275 (vld1_u16_x3): Likewise.
11276 (vld1_s16_x3): Likewise.
11277 (vld1_u32_x3): Likewise.
11278 (vld1_s32_x3): Likewise.
11279 (vld1_u64_x3): Likewise.
11280 (vld1_s64_x3): Likewise.
11281 (vld1_f16_x3): Likewise.
11282 (vld1_f32_x3): Likewise.
11283 (vld1_f64_x3): Likewise.
11284 (vld1_p8_x3): Likewise.
11285 (vld1_p16_x3): Likewise.
11286 (vld1_p64_x3): Likewise.
11287 (vld1q_u8_x3): Likewise.
11288 (vld1q_s8_x3): Likewise.
11289 (vld1q_u16_x3): Likewise.
11290 (vld1q_s16_x3): Likewise.
11291 (vld1q_u32_x3): Likewise.
11292 (vld1q_s32_x3): Likewise.
11293 (vld1q_u64_x3): Likewise.
11294 (vld1q_s64_x3): Likewise.
11295 (vld1q_f16_x3): Likewise.
11296 (vld1q_f32_x3): Likewise.
11297 (vld1q_f64_x3): Likewise.
11298 (vld1q_p8_x3): Likewise.
11299 (vld1q_p16_x3): Likewise.
11300 (vld1q_p64_x3): Likewise.
11301 (vst1_s64_x2): Likewise.
11302 (vst1_u64_x2): Likewise.
11303 (vst1_f64_x2): Likewise.
11304 (vst1_s8_x2): Likewise.
11305 (vst1_p8_x2): Likewise.
11306 (vst1_s16_x2): Likewise.
11307 (vst1_p16_x2): Likewise.
11308 (vst1_s32_x2): Likewise.
11309 (vst1_u8_x2): Likewise.
11310 (vst1_u16_x2): Likewise.
11311 (vst1_u32_x2): Likewise.
11312 (vst1_f16_x2): Likewise.
11313 (vst1_f32_x2): Likewise.
11314 (vst1_p64_x2): Likewise.
11315 (vst1q_s8_x2): Likewise.
11316 (vst1q_p8_x2): Likewise.
11317 (vst1q_s16_x2): Likewise.
11318 (vst1q_p16_x2): Likewise.
11319 (vst1q_s32_x2): Likewise.
11320 (vst1q_s64_x2): Likewise.
11321 (vst1q_u8_x2): Likewise.
11322 (vst1q_u16_x2): Likewise.
11323 (vst1q_u32_x2): Likewise.
11324 (vst1q_u64_x2): Likewise.
11325 (vst1q_f16_x2): Likewise.
11326 (vst1q_f32_x2): Likewise.
11327 (vst1q_f64_x2): Likewise.
11328 (vst1q_p64_x2): Likewise.
11329 (vst1_s64_x3): Likewise.
11330 (vst1_u64_x3): Likewise.
11331 (vst1_f64_x3): Likewise.
11332 (vst1_s8_x3): Likewise.
11333 (vst1_p8_x3): Likewise.
11334 (vst1_s16_x3): Likewise.
11335 (vst1_p16_x3): Likewise.
11336 (vst1_s32_x3): Likewise.
11337 (vst1_u8_x3): Likewise.
11338 (vst1_u16_x3): Likewise.
11339 (vst1_u32_x3): Likewise.
11340 (vst1_f16_x3): Likewise.
11341 (vst1_f32_x3): Likewise.
11342 (vst1_p64_x3): Likewise.
11343 (vst1q_s8_x3): Likewise.
11344 (vst1q_p8_x3): Likewise.
11345 (vst1q_s16_x3): Likewise.
11346 (vst1q_p16_x3): Likewise.
11347 (vst1q_s32_x3): Likewise.
11348 (vst1q_s64_x3): Likewise.
11349 (vst1q_u8_x3): Likewise.
11350 (vst1q_u16_x3): Likewise.
11351 (vst1q_u32_x3): Likewise.
11352 (vst1q_u64_x3): Likewise.
11353 (vst1q_f16_x3): Likewise.
11354 (vst1q_f32_x3): Likewise.
11355 (vst1q_f64_x3): Likewise.
11356 (vst1q_p64_x3): Likewise.
11357
11358 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11359
11360 * config/msp430/msp430.c (msp430_output_labelref): Prepend
11361 user_label_prefix to name.
11362
11363 * tree-core.h: Update comment about the format of NAME string
11364 passed to handler in attribute_spec.
11365
11366 * config/msp430/msp430.md: Remove erroneous subreg expression from
11367 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11368 zero_extend{q,h}isi2.
11369
11370 2018-05-30 Borislav Petkov <bp@suse.de>
11371
11372 * doc/extend.texi: Document some architecture specific
11373 constraints and sort entries.
11374
11375 2018-05-30 Martin Sebor <msebor@redhat.com>
11376
11377 PR middle-end/85369
11378 * builtins.c (expand_builtin_stpcpy_1): New function.
11379 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11380 only if the former succeeds.
11381
11382 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11383
11384 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11385 in saphira.
11386
11387 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11388
11389 * doc/invoke.texi (-flinker-output): Document
11390
11391 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11392
11393 * passes.c (ipa_write_summaries): Only modify statements if body
11394 is in memory.
11395 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11396 incrementally linking.
11397 (ipa_passes): Likewise.
11398 * lto-cgraph.c (lto_output_node): When incrementally linking do not
11399 pass down resolution info.
11400 * common.opt (flag_incremental_link): Update info.
11401 * gcc.c (plugin specs): Turn flinker-output=* to
11402 -plugin-opt=-linker-output-known
11403 * toplev.c (compile_file): Also cut compilation when doing incremental
11404 link.
11405 * flag-types. (enum lto_partition_model): Add
11406 LTO_LINKER_OUTPUT_NOLTOREL.
11407 (invoke.texi): Add -flinker-output docs.
11408 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11409 link same way as WPA; do not stream in dead initializers.
11410
11411 * dwarf2out.c (dwarf2out_die_ref_for_decl,
11412 darf2out_register_external_decl): Support incremental link.
11413
11414 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11415
11416 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11417
11418 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11419
11420 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11421 it down to simple_object_copy_lto_debug_sections.
11422 (run_gcc): Determine incremental LTO link time and configure
11423 lto1 into non-wpa mode, disable renaming of debug sections.
11424
11425 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
11426
11427 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11428 descriptions of various incorrectly documented functions.
11429
11430 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
11431
11432 Revert:
11433 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11434 address check not strict.
11435
11436 2018-05-30 Richard Biener <rguenther@suse.de>
11437
11438 PR tree-optimization/85964
11439 * tracer.c (better_p): Drop initialized count check, we only
11440 call the function with initialized counts now.
11441 (find_best_successor): Do find a best edge if one
11442 has uninitialized count.
11443 (find_best_predecessor): Likewise. Do BB frequency check only
11444 if count is initialized.
11445
11446 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
11447
11448 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11449 (aarch64_ldrstr_offset_compare): New.
11450 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11451 load/store orderings.
11452 (aarch64_gen_adjusted_ldpstp): Likewise.
11453
11454 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
11455
11456 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11457 Check for subset of GENERAL_REGS and FP_REGS.
11458 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11459 r=w alternative.
11460
11461 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
11462
11463 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11464 and wi::to_poly_offset. Add the current offset and then check
11465 whether the sum fits, rather than using an unchecked addition of
11466 a checked term. Check for a shwi rather than a uhwi.
11467 * expr.c (get_bit_range): Use tree_to_poly_uint64.
11468 (store_constructor): Use poly_int_tree_p.
11469 (expand_expr_real_1): Likewise.
11470 * function.c (assign_temp): Likewise.
11471 * fold-const.c (const_binop): Use poly_int_tree_p and
11472 wi::to_poly_offset.
11473 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
11474 division.
11475 * ipa-icf-gimple.c (func_checker::compare_operand): Use
11476 to_poly_offset for MEM offsets.
11477 * ipa-icf.c (sem_variable::equals): Likewise.
11478 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11479 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11480 wi::to_poly_offset for BIT_FIELD_REF offsets.
11481 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11482 wi::to_poly_offset.
11483 * var-tracking.c (emit_note_insn_var_location): Use
11484 tree_to_poly_uint64.
11485
11486 2018-05-29 Jim Wilson <jimw@sifive.com>
11487
11488 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11489
11490 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
11491
11492 PR target/85950
11493 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11494 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11495 sequence.
11496 (sse4_1_round<mode>2): Use nonimmediate_operand
11497 for operand 1 predicate.
11498
11499 2018-05-29 Martin Sebor <msebor@redhat.com>
11500 Richard Biener <rguenther@suse.de>
11501
11502 PR testsuite/85888
11503 * calls.c (get_size_range): Call determine_value_range instead
11504 of get_value_range..
11505 * tree-vrp.h (determine_value_range): Declared new function.
11506 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11507
11508 2018-05-29 Richard Biener <rguenther@suse.de>
11509
11510 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11511 sure to use non-pattern stmts for get_earlier_stmt arguments.
11512 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11513 called on pattern stmts.
11514 (get_later_stmt): Likewise.
11515
11516 2018-05-29 Martin Liska <mliska@suse.cz>
11517
11518 PR gcov-profile/85759
11519 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11520 env variables.
11521
11522 2018-05-29 Jakub Jelinek <jakub@redhat.com>
11523
11524 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11525 VEC_UNPACK_*_EXPR.
11526 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11527 VEC_PACK_*_EXPR.
11528
11529 PR target/85918
11530 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11531 VEC_PACK_FLOAT_EXPR): New tree codes.
11532 * tree-pretty-print.c (op_code_prio): Handle
11533 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11534 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11535 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11536 * tree-inline.c (estimate_operator_cost): Likewise.
11537 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11538 * fold-const.c (const_binop): Likewise.
11539 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11540 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11541 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11542 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11543 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11544 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11545 * expr.c (expand_expr_real_2): Likewise.
11546 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11547 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11548 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11549 optabs.
11550 * optabs.c (expand_widen_pattern_expr): For
11551 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11552 sign from result type rather than operand's type.
11553 (expand_binop_directly): For vec_packu_float_optab and
11554 vec_packs_float_optab allow result type to be different from operand's
11555 type.
11556 * optabs-tree.c (optab_for_tree_code): Handle
11557 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11558 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11559 * tree-vect-generic.c (expand_vector_operations_1): Handle
11560 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11561 VEC_PACK_FLOAT_EXPR.
11562 * tree-vect-stmts.c (supportable_widening_operation): Handle
11563 FIX_TRUNC_EXPR.
11564 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11565 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11566 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11567 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11568 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11569 mode attributes.
11570 (vec_pack<floatprefix>_float_<mode>): New expander.
11571 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11572 attributes.
11573 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11574 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11575 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11576 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11577 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11578 Document.
11579 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11580 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11581 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11582 VEC_PACK_FLOAT_EXPR): Document.
11583
11584 2018-05-29 Richard Biener <rguenther@suse.de>
11585
11586 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11587 member.
11588 (stmt_vec_info_vec): Make pointer.
11589 (init_stmt_vec_info_vec): Remove.
11590 (free_stmt_vec_info_vec): Likewise.
11591 (set_stmt_vec_info_vec): New function.
11592 (free_stmt_vec_infos): Likewise.
11593 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11594 (set_vinfo_for_stmt): Likewise.
11595 (get_earlier_stmt): Likewise.
11596 (get_later_stmt): Likewise.
11597 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11598 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11599 (vec_info::~vec_info): Free stmt_vec_infos.
11600 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11601 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11602 (pass_slp_vectorize::execute): Likewise.
11603 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11604 (free_stmt_vec_info_vec): Likewise.
11605 (set_stmt_vec_info_vec): New function.
11606 (free_stmt_vec_infos): Likewise.
11607 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11608 the global stmt_vec_info_vec.
11609 * tree-parloops.c (gather_scalar_reductions): Use
11610 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11611 vector.
11612
11613 2018-05-29 Richard Biener <rguenther@suse.de>
11614
11615 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11616
11617 2018-05-29 Martin Liska <mliska@suse.cz>
11618 David Malcolm <dmalcolm@redhat.com>
11619
11620 * vec.c (test_reverse): New.
11621 (vec_c_tests): Add new test.
11622 * vec.h (vl_ptr>::reverse): New function.
11623
11624 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11625
11626 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11627
11628 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11629 and later.
11630
11631 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11632
11633 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11634
11635 2018-05-28 Richard Biener <rguenther@suse.de>
11636
11637 PR tree-optimization/85933
11638 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11639 look at stmts marked as vectorizable.
11640
11641 2018-05-28 Richard Biener <rguenther@suse.de>
11642
11643 PR tree-optimization/85934
11644 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11645 vector boolean check before scalar optimization.
11646
11647 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11648
11649 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11650 for armv5te.
11651
11652 2018-05-28 Mark Wielaard <mark@klomp.org>
11653
11654 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11655 if it is an expression containing a minus sign.
11656
11657 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11658
11659 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11660
11661 2018-05-27 Paul Koning <ni1d@arrl.net>
11662
11663 * config/pdp11/pdp11.md (truncsihi2): Remove.
11664
11665 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11666 Chung-Ju Wu <jasonwucj@gmail.com>
11667
11668 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11669 implementation.
11670 (unaligned_store_dw): Ditto.
11671 * config/nds32/nds32-memory-manipulation.c
11672 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11673 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11674 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11675 (emit_setmem_word_loop): Rename to ...
11676 (emit_setmem_doubleword_loop): ... this.
11677 (nds32_gen_dup_4_byte_to_word_value): New function.
11678 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11679 (nds32_expand_setmem_loop): Refine implementation.
11680 (nds32_expand_setmem_loop_v3m): Ditto.
11681 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11682 pattern.
11683
11684 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11685
11686 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11687
11688 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11689
11690 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11691 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11692 machine->attr_no_prologue_p.
11693 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11694 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11695 (nds32_expand_epilogue): Consider attr_naked_p.
11696 (nds32_expand_epilogue_v3pop): Likewise.
11697 (nds32_can_use_return_insn): Likewise.
11698 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11699 attr_no_prologue_p fields.
11700 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11701
11702 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11703
11704 PR target/85918
11705 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11706 attributes.
11707 * config/i386/sse.md
11708 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11709 Rename to ...
11710 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11711 ... this.
11712 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11713 Rename to ...
11714 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11715 ... this.
11716 (*<floatsuffix>floatv2div2sf2): Rename to ...
11717 (*float<floatunssuffix>v2div2sf2): ... this.
11718 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11719 (float<floatunssuffix>v2div2sf2_mask): ... this.
11720 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11721 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11722 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11723 to ...
11724 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11725 ... this.
11726 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11727 Rename to ...
11728 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11729 ... this.
11730 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11731 Rename to ...
11732 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11733 ... this.
11734 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11735 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11736 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11737 gen_ufix_truncv8dfv8si2.
11738 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11739 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11740 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11741 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11742 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11743 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11744 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11745 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11746
11747 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11748
11749 PR target/85900
11750 PR target/85345
11751 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11752
11753 2018-05-25 Jim Wilson <jimw@sifive.com>
11754
11755 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11756 * config/riscv/riscv.c (struct machine_function): Add
11757 interrupt_handler_p and attribute_checked_p fields.
11758 (riscv_attribute_table): Add interrupt.
11759 (riscv_interrupt_type_p): New.
11760 (riscv_save_reg_p): Save extra regs for interrupt handler.
11761 (riscv_use_save_libcall): Return false for interrupt handler.
11762 (riscv_first_stack_step): Add forward declaration.
11763 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11764 for interrupt handler with large frame. Use it for saved reg list.
11765 (riscv_expand_prologue): Move flag_stack_usage_info support to
11766 eliminate duplication.
11767 (riscv_expand_epilogue): Generate mret for interrupt handler.
11768 (riscv_epilogue_uses): New.
11769 (riscv_can_use_return_insn): Return false for interrupt handler.
11770 (riscv_function_ok_for_sibcall): Likewise.
11771 (riscv_set_current_function): Add interrupt handler support.
11772 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11773 * config/riscv/riscv.md (UNSPECV_MRET): New.
11774 (GP_REGNUM): New.
11775 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11776 (riscv_mret): New.
11777 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11778
11779 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11780
11781 PR tree-optimization/85712
11782 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11783 this candidate has already been replaced in-situ by a copy.
11784
11785 2018-05-25 Jason Merrill <jason@redhat.com>
11786
11787 PR c++/80485 - inline function non-zero address.
11788 * symtab.c (nonzero_address): Check DECL_COMDAT.
11789
11790 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11791
11792 PR target/83628
11793 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11794 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11795 extension of SImode operation. Use const123_operand predicate.
11796 (*saddsi_1): Remove.
11797 (*saddl_se_1): Ditto.
11798 (*ssubsi_1): Ditto.
11799 (*ssubl_se_1): Ditto.
11800 * config/alpha/predicates.md (const123_operand): New predicate.
11801 * config/alpha/constraints.md (P): Use IN_RANGE.
11802
11803 2018-05-25 Richard Biener <rguenther@suse.de>
11804
11805 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11806 defaulted to true.
11807 (ref_maybe_used_by_stmt_p): Likewise.
11808 (stmt_may_clobber_ref_p): Likewise.
11809 (stmt_may_clobber_ref_p_1): Likewise.
11810 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11811 and pass it along.
11812 (ref_maybe_used_by_stmt_p): Likewise.
11813 (stmt_may_clobber_ref_p): Likewise.
11814 (stmt_may_clobber_ref_p_1): Likewise.
11815 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11816 the alias oracle to disambiguate DRs with stmts DR analysis
11817 couldn't handle.
11818 (vect_analyze_data_refs): Do not give up on not analyzable
11819 DRs for BB vectorization. Remove code truncating the dataref
11820 vector.
11821
11822 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11823
11824 PR target/85832
11825 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11826 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11827 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11828
11829 2018-05-25 Richard Biener <rguenther@suse.de>
11830
11831 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11832 function, combining stmt data ref gathering and fatal analysis
11833 parts.
11834 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11835 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11836 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11837 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11838 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11839
11840 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11841
11842 PR tree-optimization/85720
11843 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11844 SCC if all partitions are builtins.
11845 (version_loop_by_alias_check): New parameter. Generate cancelable
11846 runtime alias check if all partitions are builtins.
11847 (distribute_loop): Update call to above function.
11848
11849 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11850
11851 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11852 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11853 (parm_default_def_partition_arg): Ditto.
11854 (set_parm_default_def_partition): Ditto.
11855 (get_parm_default_def_partitions): Ditto and make it static.
11856 (get_undefined_value_partitions): Ditto and make it static.
11857 (remove_ssa_form): Refactor call to init_var_map here.
11858 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11859 computation for loop region.
11860 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11861 (register_default_def): Delete.
11862 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11863 (parm_default_def_partition_arg): Ditto.
11864 (set_parm_default_def_partition): Ditto.
11865 (get_parm_default_def_partitions): Ditto and make it static.
11866 (get_undefined_value_partitions): Ditto and make it static.
11867 (coalesce_with_default, coalesce_with_default): Update comment.
11868 (create_coalesce_list_for_region): New func factored out from
11869 create_outofssa_var_map.
11870 (populate_coalesce_list_for_outofssa): New func factored out from
11871 create_outofssa_var_map and coalesce_ssa_name.
11872 (create_outofssa_var_map): Delete.
11873 (coalesce_ssa_name): Refactor to support live range computation.
11874 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11875 (get_parm_default_def_partitions): Delete.
11876 (get_undefined_value_partitions): Ditto.
11877 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11878 computation for loop region.
11879 (new_tree_live_info, loe_visit_block): Ditto.
11880 (live_worklist, set_var_live_on_entry): Ditto.
11881 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11882 * tree-ssa-live.h (struct _var_map): New fields.
11883 (init_var_map): Change decl.
11884 (region_contains_p): New.
11885
11886 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11887
11888 * tree-ssa-live.h (live_merge_and_clear): Delete.
11889
11890 2018-05-25 Richard Biener <rguenther@suse.de>
11891
11892 PR c++/85912
11893 * tree-dump.c (dequeue_and_dump): Remove access to removed
11894 operand 2 of a SWITCH_EXPR.
11895
11896 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11897
11898 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11899 multiplication and division.
11900 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11901 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11902 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11903 (cond_udiv_optab, cond_umod_optab): New optabs.
11904 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11905 (IFN_COND_RDIV): New internal functions.
11906 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11907 TRUNC_MOD_EXPR and RDIV_EXPR.
11908 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11909 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11910 New unspecs.
11911 (SVE_INT_BINARY): Include mult.
11912 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11913 (optab, sve_int_op): Handle mult.
11914 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11915 UNSPEC_COND_DIV.
11916 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11917 for SVE_INT_BINARY_SD.
11918
11919 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11920
11921 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11922 (optab, sve_int_op): Handle div and udiv.
11923 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11924 for SVE_INT_BINARY_SD.
11925 (*<optab><mode>3): New insn for the same.
11926
11927 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11928
11929 * tree-vect-patterns.c: Include predict.h.
11930 (vect_recog_divmod_pattern): Restrict check for division support
11931 to when optimizing for size.
11932
11933 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11934
11935 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11936 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11937 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11938 (gimple_match_op::set_op): Likewise.
11939 (gimple_resimplify4): Declare.
11940 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11941 (expr::gen_transform): Likewise.
11942 (decision_tree::gen): Generate a simplification routine for 4 operands.
11943 * gimple-match-head.c (gimple_simplify): Add an overload for
11944 4 operands. In the top-level function, handle up to 4 call
11945 arguments and call gimple_resimplify4.
11946 (gimple_resimplify4): New function.
11947 (build_call_internal): Pass a fourth operand.
11948 (maybe_push_to_seq): Likewise.
11949 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11950 Fold VEC_COND_EXPRs of an operation and a default value into
11951 an IFN_COND_* function if possible.
11952 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11953 New unspecs.
11954 (SVE_COND_FP_BINARY): Include them.
11955 (optab, sve_fp_op): Handle them.
11956 (SVE_INT_BINARY_REV): New code iterator.
11957 (SVE_COND_FP_BINARY_REV): New int iterator.
11958 (commutative): New int attribute.
11959 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11960 Declare.
11961 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11962 function.
11963 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11964 (*cond_<optab><mode>): New patterns for reversed operands.
11965
11966 2018-05-25 Richard Biener <rguenther@suse.de>
11967
11968 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11969 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11970 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11971 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11972 * tree-vect-data-refs.c (everywhere): Adjust users.
11973 * tree-vect-loop.c (everywhere): Likewise.
11974 * tree-vect-slp.c (everywhere): Likewise.
11975 * tree-vect-stmts.c (everywhere): Likewise.
11976 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11977
11978 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11979
11980 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11981 Rename to...
11982 (gcc_cv_as_section_exclude): ... this.
11983 Try Solaris as #exclude syntax.
11984 * configure: Regenerate.
11985 * config.in: Regenerate.
11986 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11987 SECTION_EXCLUDE.
11988 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11989 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11990
11991 * varasm.c (default_elf_asm_named_section): Don't check if
11992 HAVE_GAS_SECTION_EXCLUDE is defined.
11993
11994 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11995
11996 * doc/md.texi: Update the documentation of the cond_* optabs
11997 to mention the new final operand. Fix GET_MODE_NUNITS call.
11998 Describe the scalar case too.
11999 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
12000 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
12001 instead of 2.
12002 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
12003 (get_conditional_internal_fn): Update comment.
12004 * tree-vect-loop.c (vectorizable_reduction): Pass the original
12005 accumulator value as a final argument to conditional functions.
12006 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
12007 a define_expand and add an "else" operand. Assert for now that
12008 the else operand is equal to operand 2. Use SVE_INT_BINARY and
12009 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
12010 (*cond_<optab><mode>): New patterns.
12011 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
12012 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12013 (UNSPEC_COND_EOR): Delete.
12014 (optab): Remove associated mappings.
12015 (SVE_INT_BINARY): New code iterator.
12016 (sve_int_op): Remove int attribute and add "minus" to the code
12017 attribute.
12018 (SVE_COND_INT_OP): Delete.
12019 (SVE_COND_FP_OP): Rename to...
12020 (SVE_COND_FP_BINARY): ...this.
12021
12022 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12023
12024 * optabs.c (can_reuse_operands_p): New function.
12025 (maybe_legitimize_operands): Try to reuse the results for
12026 earlier operands.
12027
12028 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12029
12030 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
12031 Add {q} suffix to insn mnemonic.
12032
12033 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12034
12035 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
12036 (msp430_warn_func_return): New.
12037
12038 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
12039
12040 * fold-const.c (tree_nonzero_bits): New function.
12041 * fold-const.h (tree_nonzero_bits): Likewise.
12042 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
12043 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
12044
12045 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
12046
12047 PR target/85900
12048 PR target/85345
12049 * varasm.c (assemble_alias): Check ifunc_resolver only on
12050 FUNCTION_DECL.
12051
12052 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12053
12054 PR target/85903
12055 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
12056 when memory input operand is handled.
12057
12058 2018-05-24 Luis Machado <luis.machado@linaro.org>
12059
12060 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
12061 global.
12062 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
12063
12064 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12065
12066 * match.pd: Delay FMA folds until after vectorization.
12067
12068 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
12069
12070 PR target/83009
12071 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12072 address check not strict.
12073
12074 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12075
12076 * gimple-match.h (gimple_match_op): New class.
12077 (mprts_hook): Replace parameters with a gimple_match_op *.
12078 (maybe_build_generic_op): Likewise.
12079 (gimple_simplified_result_is_gimple_val): Replace parameters with
12080 a const gimple_match_op *.
12081 (gimple_simplify): Replace code_helper * and tree * parameters with
12082 a gimple_match_op * parameter.
12083 (gimple_resimplify1): Replace code_helper *, tree and tree *
12084 parameters with a gimple_match_op * parameter.
12085 (gimple_resimplify2): Likewise.
12086 (gimple_resimplify3): Likewise.
12087 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
12088 parameters with a gimple_match_op * parameter.
12089 * gimple-match-head.c (gimple_simplify): Change prototypes of
12090 auto-generated functions to take a gimple_match_op * instead of
12091 separate code_helper * and tree * parameters. Make the same
12092 change in the top-level overload and update calls to the
12093 gimple_resimplify routines. Update calls to the auto-generated
12094 functions and to maybe_push_res_to_seq in the publicly-facing
12095 operation-specific gimple_simplify overloads.
12096 (gimple_match_op::MAX_NUM_OPS): Define.
12097 (gimple_resimplify1): Replace rcode and ops with a single res_op
12098 parameter. Update call to gimple_simplify.
12099 (gimple_resimplify2): Likewise.
12100 (gimple_resimplify3): Likewise.
12101 (mprts_hook): Replace parameters with a gimple_match_op *.
12102 (maybe_build_generic_op): Likewise.
12103 (build_call_internal): Replace type, nargs and ops with
12104 a gimple_match_op *.
12105 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
12106 with a single gimple_match_op *. Update calls to mprts_hook,
12107 build_call_internal and gimple_simplified_result_is_gimple_val.
12108 Factor out code that is common to the tree_code and combined_fn cases.
12109 * genmatch.c (expr::gen_transform): Replace tem_code and
12110 tem_ops with a gimple_match_op called tem_op. Update calls
12111 to the gimple_resimplify functions and maybe_push_res_to_seq.
12112 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
12113 res_ops. Update call to the gimple_resimplify functions.
12114 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
12115 (decision_tree::gen): Make the functions take a gimple_match_op *
12116 called res_op instead of separate res_code and res_ops parameters.
12117 Update call accordingly.
12118 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
12119 and ops with a single res_op parameter. Update calls to
12120 maybe_build_generic_op and maybe_push_res_to_seq.
12121 (fold_stmt_1): Update calls to gimple_simplify and
12122 replace_stmt_with_simplification.
12123 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
12124 and gimple_simplified_result_is_gimple_val.
12125 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
12126 gimple_simplify.
12127 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
12128 with a gimple_match_op *.
12129 (vn_nary_build_or_lookup): Likewise. Update call to
12130 vn_nary_build_or_lookup_1.
12131 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
12132 gimple_match_op *. Update calls to the gimple_resimplify routines
12133 and to gimple_simplified_result_is_gimple_val.
12134 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
12135 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
12136 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
12137 (visit_nary_op): Likewise.
12138 (visit_reference_op_load): Likewise.
12139
12140 2018-05-23 Luis Machado <luis.machado@linaro.org>
12141
12142 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
12143 modifier for printing the step amount.
12144
12145 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
12146
12147 PR target/78849
12148 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
12149 types.
12150
12151 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
12152
12153 * doc/sourcebuild.texi (Endianness): New subsubsection.
12154
12155 2018-05-23 Luis Machado <luis.machado@linaro.org>
12156
12157 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12158 <prefetch_dynamic_strides>: New const bool field.
12159 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12160 prefetch_dynamic_strides.
12161 (exynosm1_prefetch_tune): Likewise.
12162 (thunderxt88_prefetch_tune): Likewise.
12163 (thunderx_prefetch_tune): Likewise.
12164 (thunderx2t99_prefetch_tune): Likewise.
12165 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
12166 false.
12167 (aarch64_override_options_internal): Update to set
12168 PARAM_PREFETCH_DYNAMIC_STRIDES.
12169 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12170 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12171 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12172 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12173 prefetch-dynamic-strides setting.
12174
12175 2018-05-23 Luis Machado <luis.machado@linaro.org>
12176
12177 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12178 <minimum_stride>: New const int field.
12179 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12180 minimum_stride field defaulting to -1.
12181 (exynosm1_prefetch_tune): Likewise.
12182 (thunderxt88_prefetch_tune): Likewise.
12183 (thunderx_prefetch_tune): Likewise.
12184 (thunderx2t99_prefetch_tune): Likewise.
12185 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
12186 <default_opt_level>: Set to 3.
12187 (aarch64_override_options_internal): Update to set
12188 PARAM_PREFETCH_MINIMUM_STRIDE.
12189 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12190 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12191 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12192 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12193 stride is constant and is below the minimum stride threshold.
12194
12195 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12196
12197 * config/arm/arm-cpus.in (mode26): Delete.
12198 (armv4): Delete mode26 reference.
12199 * config/arm/arm.c (arm_configure_build_target): Delete use of
12200 isa_bit_mode26.
12201
12202 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12203
12204 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
12205 New insn pattern.
12206 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
12207 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
12208 for non-SSE modes.
12209 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
12210 (floatunsdidf2): Ditto.
12211
12212 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12213
12214 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
12215 (fixuns_trunc<mode>si2_avx512f): Ditto.
12216 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
12217 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
12218 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
12219
12220 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12221
12222 PR rtl-optimization/79985
12223 * df-scan.c (df_insn_refs_collect): Remove special case for
12224 global registers and asm statements.
12225
12226 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12227
12228 * extend.texi (Global Register Variables): Rewrite the bullet list.
12229 Note that the register is available for allocation. Note that access
12230 via inline asm must use constraints. Add note about async-signal
12231 handlers. Remove paragraph about automagic register selection.
12232
12233 2018-05-23 Richard Biener <rguenther@suse.de>
12234
12235 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
12236 of fixed offset from memset VN.
12237
12238 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
12239
12240 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
12241 first_interp field.
12242 (alloc_cand_and_find_basis): Initialize first_interp field.
12243 (slsr_process_mul): Modify first_interp field.
12244 (slsr_process_add): Likewise.
12245 (slsr_process_cast): Modify first_interp field for each new
12246 interpretation.
12247 (slsr_process_copy): Likewise.
12248 (dump_candidate): Dump first_interp field.
12249 (replace_mult_candidate): Process all interpretations, not just
12250 subsequent ones.
12251 (replace_rhs_if_not_dup): Likewise.
12252 (replace_one_candidate): Likewise.
12253
12254 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
12255
12256 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
12257 Add new boolean.
12258 (aarch64_needs_frame_chain): New function.
12259 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
12260
12261 2018-05-23 Sudakshina Das <sudi.das@arm.com>
12262
12263 PR target/84882
12264 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
12265 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
12266 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
12267 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
12268 as true for strict-align.
12269 (aarch64_can_inline_p): Perform checks even when callee has no
12270 attributes to check for strict alignment.
12271 * doc/extend.texi (AArch64 Function Attributes): Document
12272 no-strict-align.
12273 * doc/invoke.texi: (AArch64 Options): Likewise.
12274
12275 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
12276
12277 PR tree-optimization/85853
12278 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
12279 the handling of the root of the node to...
12280 (vect_slp_analyze_node_operations_1): ...this new function,
12281 and run the whole thing with the child nodes' def types
12282 set according to their SLP node's def type.
12283
12284 2018-05-23 Richard Biener <rguenther@suse.de>
12285
12286 PR middle-end/85874
12287 * tree-data-ref.c (create_runtime_alias_checks): Defer
12288 and ignore overflow warnings.
12289
12290 2018-05-23 Yury Gribov <tetra2005@gmail.com>
12291
12292 PR tree-optimization/85822
12293 * tree-vrp.c (is_masked_range_test): Fix handling of negative
12294 constants.
12295
12296 2018-05-23 Richard Biener <rguenther@suse.de>
12297
12298 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12299 memset constants via native_interpret_expr.
12300
12301 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
12302
12303 PR target/85345
12304 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
12305 attribute.
12306 (cgraph_node::create_alias): Likewise.
12307 (cgraph_node::get_availability): Check ifunc_resolver instead
12308 of looking up ifunc attribute.
12309 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12310 * varasm.c (do_assemble_alias): Likewise.
12311 (assemble_alias): Likewise.
12312 (default_binds_local_p_3): Likewise.
12313 * cgraph.h (cgraph_node): Add ifunc_resolver.
12314 (cgraph_node::only_called_directly_or_aliased_p): Return false
12315 for IFUNC resolver.
12316 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
12317 attribute.
12318 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
12319 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
12320 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
12321 instead of looking up ifunc attribute.
12322
12323 2018-05-22 Luis Machado <luis.machado@linaro.org>
12324
12325 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
12326
12327 2018-05-22 Martin Sebor <msebor@redhat.com>
12328
12329 PR middle-end/85359
12330 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
12331 only when expasion succeeds.
12332 (expand_builtin_strcmp): Same.
12333 (expand_builtin_strncmp): Same.
12334
12335 2018-05-22 Martin Sebor <msebor@redhat.com>
12336
12337 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12338
12339 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12340 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12341
12342 * config/aarch64/aarch64-ldpstp.md: Replace uses of
12343 aarch64_mem_pair_operand with memory_operand and delete operand swapping
12344 code.
12345 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12346 Add check for legitimate_address.
12347 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12348 (aarch64_swap_ldrstr_operands): New.
12349 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12350 Define prototype.
12351
12352 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12353 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12354
12355 * config/aarch64/aarch64.md: New patterns to generate stp
12356 and ldp.
12357 (store_pair_sw, store_pair_dw): New patterns to generate stp for
12358 single words and double words.
12359 (load_pair_sw, load_pair_dw): Likewise.
12360 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12361 Delete.
12362 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12363 Delete.
12364 * config/aarch64/aarch64-ldpstp.md: Modify peephole
12365 for different mode ldpstp and add peephole for merged zero stores.
12366 Likewise for loads.
12367 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12368 Add size check.
12369 (aarch64_gen_store_pair): Rename calls to match new patterns.
12370 (aarch64_gen_load_pair): Rename calls to match new patterns.
12371 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12372 (load_pair<DREG:mode><DREG2:mode>): ... This.
12373 (store_pair<mode>): Rename to...
12374 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12375 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12376 New mode iterators.
12377 (V_INT_EQUIV): Handle SImode.
12378 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12379 New predicate.
12380
12381 2018-05-22 Martin Sebor <msebor@redhat.com>
12382
12383 PR c/85623
12384 * calls.c (maybe_warn_nonstring_arg): Use string length to set
12385 or ajust the presumed bound on an operation to avoid unnecessary
12386 warnings.
12387
12388 2018-05-22 Martin Sebor <msebor@redhat.com>
12389
12390 PR tree-optimization/85826
12391 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12392 assuming that a DECL necesarily has a constant size.
12393
12394 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
12395
12396 PR middle-end/85862
12397 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12398
12399 2018-05-22 Richard Biener <rguenther@suse.de>
12400
12401 PR tree-optimization/85834
12402 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12403 non-constant and non-zero memset arguments.
12404
12405 2018-05-22 Martin Liska <mliska@suse.cz>
12406
12407 PR ipa/85607
12408 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12409
12410 2018-05-22 Richard Biener <rguenther@suse.de>
12411
12412 PR tree-optimization/85863
12413 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12414 comparisons when vectype is specified.
12415 (vectorizable_condition): Do not specify vectype for
12416 vect_is_simple_cond when SLP vectorizing.
12417
12418 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
12419
12420 PR target/85657
12421 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12422 define __ibm128 as long double.
12423 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12424 as a distinct type when IEEE 128-bit support is enabled.
12425 (init_float128_ieee): Fix up conversions between IFmode and IEEE
12426 128-bit types to use the correct functions.
12427 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12428 convert between 128-bit floating point types that have different
12429 modes but the same representation, instead of using gen_lowpart to
12430 makean alias.
12431 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12432 KFmode.
12433 (IFKF_reg): New attributes to give the register constraints for
12434 IFmode and KFmode.
12435 (extend<mode>tf2_internal): New insns to mark an explicit
12436 conversion between 128-bit floating point types that have a
12437 different mode but share the same representation.
12438
12439 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
12440
12441 PR tree-optimization/85814
12442 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12443 a null return from get_strinfo when unsharing the next
12444 strinfo in the chain.
12445
12446 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12447
12448 PR gcc/84923
12449 * varasm.c (weak_finish): Clean up weak_decls.
12450
12451 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12452
12453 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12454 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12455 UNSPEC_UADALP values.
12456 * config/aarch64/iterators.md (ABAL): New int iterator.
12457 (ABDL2): Likewise.
12458 (ADALP): Likewise.
12459 (sur): Add mappings for the above.
12460 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12461 New define_insn.
12462 (aarch64_<sur>abal<mode>_4): Likewise.
12463 (aarch64_<sur>adalp<mode>_3): Likewise.
12464 (<sur>sadv16qi): New define_expand.
12465
12466 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
12467
12468 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12469 (*movdf_internal): Ditto.
12470 (*rcpsf2_sse): Ditto.
12471 (*rsqrtsf2_sse): Ditto.
12472 (*sqrt<mode>2_sse): Ditto.
12473
12474 2018-05-21 Tamar Christina <tamar.christina@arm.com>
12475
12476 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12477 eor3q<mode>4.
12478 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12479 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12480 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12481 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12482 vbcaxq_s64): New.
12483 * config/aarch64/arm_neon.h: Likewise.
12484 * config/aarch64/iterators.md (VQ_I): New.
12485
12486 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
12487
12488 * config.gcc: Add arc/t-multilib-linux to tmake_file for
12489 arc*-*-linux*.
12490 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12491 MULTILIB_DIRNAMES
12492
12493 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12494
12495 * config/nds32/constraints.md (S): New constraint.
12496 * config/nds32/nds32.md (call_internal): Use constraint S.
12497 (call_value_internal): Likewise.
12498 (sibcall_internal): Likewise.
12499 (sibcall_value_internal): Likewise.
12500
12501 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12502 Chung-Ju Wu <jasonwucj@gmail.com>
12503
12504 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12505 into consideration.
12506
12507 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12508 Chung-Ju Wu <jasonwucj@gmail.com>
12509
12510 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12511 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12512 (nds32_rtx_costs_impl): Simplify.
12513 (nds32_address_cost_impl): Simplify.
12514 (nds32_init_rtx_costs): New function.
12515 (nds32_rtx_costs_speed_prefer): Likewise.
12516 (nds32_rtx_costs_size_prefer): Likewise.
12517 (nds32_address_cost_speed_prefer): Likewise.
12518 (nds32_address_cost_speed_fwprop): Likewise.
12519 (nds32_address_cost_size_prefer): Likewise.
12520 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12521 * config/nds32/nds32.c (nds32_option_override): Use
12522 nds32_init_rtx_costs function.
12523
12524 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12525
12526 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12527 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12528 (TARGET_PIPELINE_N8): Likewise.
12529 (TARGET_PIPELINE_N10): Likewise.
12530 (TARGET_PIPELINE_N13): Likewise.
12531 (TARGET_PIPELINE_GRAYWOLF): Likewise.
12532
12533 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
12534
12535 * config/nds32/nds32-fpu.md: Update copyright year.
12536
12537 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12538
12539 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12540
12541 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12542
12543 * config/nds32/nds32.c
12544 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12545 * config/nds32/nds32.opt (minline-asm-r15): New option.
12546
12547 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12548
12549 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12550 MASK_HW_ABS.
12551 * config/nds32/nds32.md (abssi2): New pattern.
12552
12553 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12554
12555 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12556 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12557 Merge insn pattern from sse_cvtsi2ss<round_name> and
12558 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12559 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12560 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12561 using SWI48 mode iterator.
12562 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12563 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12564 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12565 pattern from sse_cvttss2si<round_saeonly_name>
12566 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12567 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12568 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12569 using SWI48 mode iterator.
12570 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12571 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12572 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12573 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12574 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12575 using SWI48 mode iterator.
12576 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12577 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12578 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12579 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12580 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12581 SWI48 mode iterator.
12582 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12583 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12584 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12585 pattern from sse_cvttsd2si<round_saeonly_name>
12586 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12587
12588 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12589
12590 * config/nds32/nds32-md-auxiliary.c
12591 (nds32_valid_smw_lwm_base_p): Refine.
12592 (nds32_output_smw_single_word): Refine.
12593 (nds32_output_smw_double_word): New.
12594 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12595
12596 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12597
12598 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12599 (nds32_output_stack_pop): Refine.
12600 (nds32_expand_unaligned_load): Refine.
12601 (nds32_expand_unaligned_store): Refine.
12602
12603 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12604 Chung-Ju Wu <jasonwucj@gmail.com>
12605
12606 * config/nds32/constants.md: Add TP_REGNUM constant.
12607 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12608 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12609 UNSPEC_ADD32.
12610 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12611 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12612 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12613 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12614 and PIC code generation.
12615 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12616 code generation.
12617 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12618 optimization.
12619 * config/nds32/nds32.md: Support TLS and PIC.
12620 * config/nds32/nds32.c: Support TLS and PIC.
12621 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12622 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12623 predicate.
12624
12625 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12626
12627 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12628 mode with E_ prefix.
12629
12630 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12631 Chung-Ju Wu <jasonwucj@gmail.com>
12632
12633 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12634 * config/nds32/nds32-md-auxiliary.c
12635 (symbolic_reference_mentioned_p): New.
12636 (nds32_legitimize_ict_address): New.
12637 (nds32_expand_ict_move): New.
12638 (nds32_indirect_call_referenced_p): New.
12639 (nds32_symbol_binds_local_p): Delete.
12640 (nds32_long_call_p): Modify.
12641 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12642 * config/nds32/nds32-protos.h
12643 (symbolic_reference_mentioned_p): Declare.
12644 (nds32_legitimize_ict_address): Declare.
12645 (nds32_expand_ict_move): Declare.
12646 (nds32_indirect_call_referenced_p): Declare.
12647 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12648 (nds32_relax_group): Use nds32_ict_const_p as condition.
12649 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12650 (nds32_asm_file_start): Output ict_model directive in asm code.
12651 (nds32_legitimate_address_p): Consider indirect call.
12652 (nds32_print_operand): Consider indirect call.
12653 (nds32_print_operand_address): Consider indirect call.
12654 (nds32_insert_attributes): Handle "indirect_call" attribute.
12655 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12656 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12657 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12658 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12659 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12660 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12661 (TARGET_ICT_MODEL_SMALL): Define.
12662 (TARGET_ICT_MODEL_LARGE): Define.
12663 * config/nds32/nds32.md (movsi): Consider ict model.
12664 (call, call_value): Consider ict model.
12665 (sibcall, sibcall_value): Consider ict model.
12666 * config/nds32/nds32.opt (mict-model): New option.
12667 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12668 model.
12669
12670 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12671 Monk Chiang <sh.chiang04@gmail.com>
12672 Jim Wilson <jimw@sifive.com>
12673
12674 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12675 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12676 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12677 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12678 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12679 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12680 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12681 compute save_libcall_adjustment properly.
12682 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12683 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12684 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12685 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12686 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12687 (ABI_SPEC): Handle mabi=ilp32e.
12688 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12689 (RVE): Add RVE mask.
12690 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12691 <-march>: Add rv32e as an example.
12692
12693 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12694
12695 PR c++/82899
12696 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12697 (intra_create_variable_infos): Handle C++ constructors.
12698
12699 2018-05-18 Martin Liska <mliska@suse.cz>
12700
12701 * passes.def: Remove a redundant pass.
12702
12703 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12704
12705 PR bootstrap/85838
12706 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12707
12708 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12709
12710 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12711 (ARMv4): Update.
12712 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12713 (ARMv6m): Update.
12714 (armv2, armv2a, armv3, armv3m): Delete architectures.
12715 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12716 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12717 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12718 Delete cpus.
12719 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12720 (*mulsidi3adddi): Likewise.
12721 (mulsidi3): Likewise.
12722 (*mulsidi3_nov6): Likewise.
12723 (umulsidi3): Likewise.
12724 (umulsidi3_nov6): Likewise.
12725 (umaddsidi4): Likewise.
12726 (*umulsidi3adddi): Likewise.
12727 (smulsi3_highpart): Likewise.
12728 (*smulsi3_highpart_nov6): Likewise.
12729 (umulsi3_highpart): Likewise.
12730 (*umulsi3_highpart_nov6): Likewise.
12731 * config/arm/arm.h (arm_arch3m): Delete.
12732 * config/arm/arm.c (arm_arch3m): Delete.
12733 (arm_option_override_internal): Update armv3-related comment.
12734 (arm_configure_build_target): Delete use of isa_bit_mode32.
12735 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12736 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12737 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12738 (mulsa3): Likewise.
12739 (mulusa3): Likewise.
12740 * config/arm/arm-protos.h (arm_arch3m): Delete.
12741 * config/arm/arm-tables.opt: Regenerate.
12742 * config/arm/arm-tune.md: Likewise.
12743 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12744 deleted architectures.
12745
12746 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12747
12748 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12749 (armv5t, armv5te): New features.
12750 (ARMv5, ARMv5e): Delete fgroups.
12751 (ARMv5t, ARMv5te): Adjust for above changes.
12752 (ARMv6m): Likewise.
12753 (armv5, armv5e): Delete arches.
12754 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12755 arm_arch5.
12756 (*call_reg_arm): Likewise.
12757 (*call_value_reg_armv5): Likewise.
12758 (*call_value_reg_arm): Likewise.
12759 (*call_symbol): Likewise.
12760 (*call_value_symbol): Likewise.
12761 (*sibcall_insn): Likewise.
12762 (*sibcall_value_insn): Likewise.
12763 (clzsi2): Likewise.
12764 (prefetch): Likewise.
12765 (define_split and define_peephole2 dependent on arm_arch5):
12766 Likewise.
12767 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12768 arm_arch5e.
12769 (TARGET_ARM_QBIT): Likewise.
12770 (TARGET_DSP_MULTIPLY): Likewise.
12771 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12772 (arm_arch5, arm_arch5e): Delete.
12773 (arm_arch5t, arm_arch5te): Declare.
12774 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12775 (arm_arch5t): Declare.
12776 (arm_option_reconfigure_globals): Update for the above.
12777 (arm_options_perform_arch_sanity_checks): Update comment, replace
12778 use of arm_arch5 with arm_arch5t.
12779 (use_return_insn): Likewise.
12780 (arm_emit_call_insn): Likewise.
12781 (output_return_instruction): Likewise.
12782 (arm_final_prescan_insn): Likewise.
12783 (arm_coproc_builtin_available): Likewise.
12784 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12785 arm_arch5e with arm_arch5t and arm_arch5te.
12786 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12787 (arm_arch5t, arm_arch5te): Declare.
12788 * config/arm/arm-tables.opt: Regenerate.
12789 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12790 * config/arm/t-multilib: Likewise.
12791 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12792 instead of arm_arch5.
12793 (*call_reg_thumb1): Likewise.
12794 (*call_value_reg_thumb1_v5): Likewise.
12795 (*call_value_reg_thumb1): Likewise.
12796 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12797 unreachable path.
12798 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12799
12800 2018-05-18 Martin Liska <mliska@suse.cz>
12801
12802 PR gcov-profile/84846
12803 * doc/gcov.texi: Document -t option of gcov tool.
12804
12805 2018-05-18 Martin Liska <mliska@suse.cz>
12806
12807 PR gcov-profile/84846
12808 * gcov.c (print_usage): Add new -t option.
12809 (process_args): Handle the option.
12810 (generate_results): Use stdout as output when requested by
12811 the option.
12812
12813 2018-05-18 Martin Liska <mliska@suse.cz>
12814
12815 PR gcov-profile/84846
12816 * coverage.c (coverage_init): Write PWD to .gcno file.
12817 * doc/gcov.texi: Document how working directory is printed.
12818 * gcov-dump.c (dump_gcov_file): Print PWD.
12819 * gcov.c (output_intermediate_file): Likewise.
12820 (read_graph_file): Read PWD string.
12821 (output_lines): Print PWD.
12822
12823 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12824
12825 PR middle-end/85817
12826 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12827 for retval and return false if all args to phi are zero.
12828
12829 2018-05-18 Richard Biener <rguenther@suse.de>
12830
12831 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12832 method.
12833 (evrp_dom_walker::before_dom_children): Call it.
12834
12835 2018-05-18 Richard Biener <rguenther@suse.de>
12836
12837 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12838 results when processing array refs with variable index.
12839
12840 2018-05-18 Toon Moene <toon@moene.org>
12841
12842 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12843 directly after that of -floop-interchange. Indicate that both
12844 options are enabled by default when specifying -O3.
12845
12846 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12847
12848 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12849 iterator. Delete separate integer-mode vec_set<mode> expander.
12850 (aarch64_simd_vec_setv2di): Delete.
12851 (vec_setv2di): Delete.
12852 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12853 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12854 the "w, r" alternative.
12855
12856 2018-05-18 Martin Liska <mliska@suse.cz>
12857
12858 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12859 * tree-pass.h (make_pass_lower_switch_O0): New function.
12860 * tree-switch-conversion.c (node_has_low_bound): Remove.
12861 (node_has_high_bound): Likewise.
12862 (node_is_bounded): Likewise.
12863 (class pass_lower_switch): Make it a template type and create
12864 two instances.
12865 (pass_lower_switch::execute): Add template argument.
12866 (make_pass_lower_switch): New function.
12867 (make_pass_lower_switch_O0): New function.
12868 (do_jump_if_equal): Remove.
12869 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12870 all the hard work to tree optimization passes.
12871
12872 2018-05-18 Martin Liska <mliska@suse.cz>
12873
12874 * dbgcnt.c (limit_low): Renamed from limit.
12875 (limit_high): New variable.
12876 (dbg_cnt_is_enabled): Check for upper limit.
12877 (dbg_cnt): Adjust dumping.
12878 (dbg_cnt_set_limit_by_index): Add new argument for high
12879 value.
12880 (dbg_cnt_set_limit_by_name): Likewise.
12881 (dbg_cnt_process_single_pair): Parse new format.
12882 (dbg_cnt_process_opt): Use strtok.
12883 (dbg_cnt_list_all_counters): Remove 'value' and add
12884 'limit_high'.
12885 * doc/invoke.texi: Document changes.
12886
12887 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12888
12889 * doc/sourcebuild.texi (scalar_all_fma): Document.
12890 * tree.def (FMA_EXPR): Delete.
12891 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12892 * internal-fn.c (ternary_direct): New macro.
12893 (expand_ternary_optab_fn): Likewise.
12894 (direct_ternary_optab_supported_p): Likewise.
12895 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12896 * builtins.c (fold_builtin_fma): Delete.
12897 (fold_builtin_3): Don't call it.
12898 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12899 * expr.c (expand_expr_real_2): Likewise.
12900 * fold-const.c (operand_equal_p): Likewise.
12901 (fold_ternary_loc): Likewise.
12902 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12903 * gimple.c (DEFTREECODE): Likewise.
12904 * gimplify.c (gimplify_expr): Likewise.
12905 * optabs-tree.c (optab_for_tree_code): Likewise.
12906 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12907 * tree-eh.c (operation_could_trap_p): Likewise.
12908 (stmt_could_throw_1_p): Likewise.
12909 * tree-inline.c (estimate_operator_cost): Likewise.
12910 * tree-pretty-print.c (dump_generic_node): Likewise.
12911 (op_code_prio): Likewise.
12912 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12913 * tree-ssa-operands.c (get_expr_operands): Likewise.
12914 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12915 * fold-const-call.h (fold_fma): Delete.
12916 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12917 CFN_FNMA and CFN_FNMS.
12918 (fold_fma): Delete.
12919 * genmatch.c (combined_fn): New enum.
12920 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12921 (commutative_op): New function.
12922 (commutate): Use it. Handle more than 2 operands.
12923 (dt_operand::gen_gimple_expr): Use commutative_op.
12924 (parser::parse_expr): Allow :c to be used with non-binary
12925 operators if the commutative operand is known.
12926 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12927 CFN_FMS, CFN_FNMA and CFN_FNMS.
12928 (backprop::process_assign_use): Remove FMA_EXPR handling.
12929 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12930 (gen_hsa_fma): New function.
12931 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12932 IFN_FNMA and IFN_FNMS.
12933 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12934 * gimple-fold.h (follow_all_ssa_edges): Declare.
12935 * gimple-fold.c (follow_all_ssa_edges): New function.
12936 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12937 gimple_build interface and use follow_all_ssa_edges to fold the result.
12938 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12939 instead of checking for optabs directly.
12940 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12941 rather than FMA_EXPRs.
12942 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12943 call to IFN_FMA instead of an FMA_EXPR.
12944
12945 2018-05-17 Jim Wilson <jimw@sifive.com>
12946
12947 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12948 sign extended promoted subreg, and the range does not have the sign bit
12949 set, then do a sign extend.
12950
12951 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12952 test, check for sign extended subreg and/or constant operands, and
12953 do a sign extend in that case.
12954
12955 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12956
12957 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12958 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12959 Add untyped.
12960 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12961 Change logics_shift_reg to logics_shift_imm.
12962 (thunderx2t99_fp_loadpair_basic): Delete.
12963 (thunderx2t99_fp_storepair_basic): Delete.
12964 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12965 (thunderx2t99_asimd_polynomial): Delete.
12966 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12967 and neon_fp_mul_d_scalar_q.
12968 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12969 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12970 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12971 (thunderx2t99_asimd_lut): Add missing tbl types.
12972 (thunderx2t99_asimd_ext): Delete.
12973 (thunderx2t99_asimd_load1_1_mult): Delete.
12974 (thunderx2t99_asimd_load1_2_mult): Delete.
12975 (thunderx2t99_asimd_load1_ldp): New.
12976 (thunderx2t99_asimd_load1): New.
12977 (thunderx2t99_asimd_load2): Add missing *load2* types.
12978 (thunderx2t99_asimd_load3): New.
12979 (thunderx2t99_asimd_load4): New.
12980 (thunderx2t99_asimd_store1_1_mult): Delete.
12981 (thunderx2t99_asimd_store1_2_mult): Delete.
12982 (thunderx2t99_asimd_store2_mult): Delete.
12983 (thunderx2t99_asimd_store2_onelane): Delete.
12984 (thunderx2t99_asimd_store_stp): New.
12985 (thunderx2t99_asimd_store1): New.
12986 (thunderx2t99_asimd_store2): New.
12987 (thunderx2t99_asimd_store3): New.
12988 (thunderx2t99_asimd_store4): New.
12989
12990 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12991
12992 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12993 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12994
12995 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12996 Segher Boessenkool <segher@kernel.crashing.org>
12997
12998 PR target/85698
12999 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
13000 operand.
13001
13002 2018-05-17 Richard Biener <rguenther@suse.de>
13003
13004 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
13005 for pruning loop and prune defs feeding only already visited PHIs.
13006
13007 2018-05-17 Richard Biener <rguenther@suse.de>
13008
13009 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
13010
13011 2018-05-17 Bin Cheng <bin.cheng@arm.com>
13012 Richard Biener <rguenther@suse.de>
13013
13014 PR tree-optimization/85793
13015 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
13016 for VMAT_ELEMENTWISE.
13017
13018 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13019
13020 * internal-fn.h (lookup_internal_fn): Declare
13021 * internal-fn.c (lookup_internal_fn): New function.
13022 * gimple.c (gimple_build_call_from_tree): Handle calls to
13023 internal functions.
13024 * gimple-pretty-print.c (dump_gimple_call): Print "." before
13025 internal function names.
13026 * tree-pretty-print.c (dump_generic_node): Likewise.
13027 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
13028
13029 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13030
13031 * gimple-fold.h (gimple_build): Make the function forms take
13032 combined_fn rather than built_in_function.
13033 (gimple_simplify): Likewise.
13034 * gimple-match-head.c (gimple_simplify): Likewise.
13035 * gimple-fold.c (gimple_build): Likewise.
13036 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
13037 rather than gimple_build_call_internal.
13038 (get_initial_defs_for_reduction): Likewise.
13039 (vect_create_epilog_for_reduction): Likewise.
13040 (vectorizable_live_operation): Likewise.
13041
13042 2018-05-17 Martin Liska <mliska@suse.cz>
13043
13044 * gimple-ssa-sprintf.c (format_directive): Do not use
13045 space in between 'G_' and '('.
13046
13047 2018-05-17 Jakub Jelinek <jakub@redhat.com>
13048
13049 PR target/85323
13050 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
13051 even if the mask is not all ones.
13052
13053 PR target/85323
13054 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
13055 vector.
13056 (ix86_gimple_fold_builtin): Likewise.
13057
13058 PR target/85323
13059 * config/i386/i386.c: Include tree-vector-builder.h.
13060 (ix86_vector_shift_count): New function.
13061 (ix86_fold_builtin): Fold shift builtins by scalar count.
13062 (ix86_gimple_fold_builtin): Likewise.
13063
13064 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
13065 _mm512_setzero): New intrinsics.
13066
13067 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
13068 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13069
13070 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
13071 code generation for cases where splatting a value is not useful.
13072 * simplify-rtx.c (simplify_ternary_operation): Simplify
13073 vec_merge across a vec_duplicate and a paradoxical subreg forming
13074 a vector mode to a vec_concat.
13075
13076 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
13077
13078 * config.gcc: Support "goldmont-plus".
13079 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13080 "goldmont-plus".
13081 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13082 PROCESSOR_GOLDMONT_PLUS.
13083 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
13084 (processor_target_table): Add "goldmont-plus".
13085 (PTA_GOLDMONT_PLUS): Define.
13086 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
13087 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
13088 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
13089 (fold_builtin_cpu): Add "goldmont-plus".
13090 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
13091 (ix86_option_override_internal): Add "goldmont-plus".
13092 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
13093 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
13094 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
13095 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
13096
13097 2018-05-17 Richard Biener <rguenther@suse.de>
13098
13099 PR tree-optimization/85757
13100 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
13101 remove defs that only feed that PHI from further processing.
13102
13103 2018-05-16 Jim Wilson <jimw@sifive.com>
13104
13105 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
13106 asterisk to name.
13107 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
13108
13109 2018-05-16 Mark Wielaard <mark@klomp.org>
13110
13111 * dwarf2out.c (count_index_strings): New function.
13112 (output_indirect_strings): Call count_index_strings and generate
13113 header for dwarf_version >= 5.
13114
13115 2018-05-16 Mark Wielaard <mark@klomp.org>
13116
13117 * dwarf2out.c (dwarf_FORM): New function.
13118 (set_indirect_string): Use dwarf_FORM.
13119 (reset_indirect_string): Likewise.
13120 (size_of_die): Likewise.
13121 (value_format): Likewise.
13122 (output_die): Likewise.
13123 (add_skeleton_AT_string): Likewise.
13124 (output_macinfo_op): Likewise.
13125 (index_string): Likewise.
13126 (output_index_string_offset): Likewise.
13127 (output_index_string): Likewise.
13128 (count_index_strings): Likewise.
13129
13130 2018-05-16 Carl Love <cel@us.ibm.com>
13131
13132 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13133 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
13134
13135 2018-05-16 Martin Jambor <mjambor@suse.cz>
13136
13137 * ipa-prop.c (ipa_free_all_edge_args): Remove.
13138 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
13139
13140 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
13141
13142 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
13143 (fnma<mode>4): Likewise.
13144 (fms<mode>4): Likewise.
13145 (fnms<mode>4): Likewise.
13146 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
13147 (aarch64_fnma<mode>4): Likewise.
13148 (aarch64_fms<mode>4): Likewise.
13149 (aarch64_fnms<mode>4): Likewise.
13150 (aarch64_fnmadd<mode>4): Likewise.
13151
13152 2018-05-16 Jason Merrill <jason@redhat.com>
13153
13154 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
13155
13156 2018-05-16 Richard Biener <rguenther@suse.de>
13157
13158 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
13159 (dump_stmt_cost): Declare.
13160 (add_stmt_cost): Dump cost we add.
13161 (add_stmt_costs): New function.
13162 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
13163 No longer exported.
13164 (vect_analyze_stmt): Adjust prototype.
13165 (vectorizable_condition): Likewise.
13166 (vectorizable_live_operation): Likewise.
13167 (vectorizable_reduction): Likewise.
13168 (vectorizable_induction): Likewise.
13169 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
13170 cost vector to pass to vectorizable_ and record afterwards.
13171 (vect_model_reduction_cost): Take cost vector argument and adjust.
13172 (vect_model_induction_cost): Likewise.
13173 (vectorizable_reduction): Likewise.
13174 (vectorizable_induction): Likewise.
13175 (vectorizable_live_operation): Likewise.
13176 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
13177 SLP_TREE_NUMBER_OF_VEC_STMTS.
13178 (vect_analyze_slp_cost_1): Remove.
13179 (vect_analyze_slp_cost): Likewise.
13180 (vect_slp_analyze_node_operations): Take visited args and
13181 a target cost vector. Avoid processing already visited stmt sets.
13182 (vect_slp_analyze_operations): Use a local cost vector to gather
13183 costs and register those of non-discarded instances.
13184 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
13185 (vect_schedule_slp_instance): Remove copying of
13186 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
13187 zero.
13188 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
13189 adding cost. Record cost entry location.
13190 (vect_prologue_cost_for_slp_op): Function to compute cost of
13191 a constant or invariant generated for SLP vect in the prologue,
13192 split out from vect_analyze_slp_cost_1.
13193 (vect_model_simple_cost): Make static. Adjust for SLP costing.
13194 (vect_model_promotion_demotion_cost): Likewise.
13195 (vect_model_store_cost): Likewise, make static.
13196 (vect_model_load_cost): Likewise.
13197 (vectorizable_bswap): Add cost vector arg and adjust.
13198 (vectorizable_call): Likewise.
13199 (vectorizable_simd_clone_call): Likewise.
13200 (vectorizable_conversion): Likewise.
13201 (vectorizable_assignment): Likewise.
13202 (vectorizable_shift): Likewise.
13203 (vectorizable_operation): Likewise.
13204 (vectorizable_store): Likewise.
13205 (vectorizable_load): Likewise.
13206 (vectorizable_condition): Likewise.
13207 (vectorizable_comparison): Likewise.
13208 (can_vectorize_live_stmts): Likewise.
13209 (vect_analyze_stmt): Likewise.
13210 (vect_transform_stmt): Adjust calls to vectorizable_*.
13211 * tree-vectorizer.c: Include gimple-pretty-print.h.
13212 (dump_stmt_cost): New function.
13213
13214 2018-05-16 Richard Biener <rguenther@suse.de>
13215
13216 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
13217 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
13218 * tree-ssa-dse.c: Include tree-ssa-loop.h.
13219 (check_name): New callback.
13220 (dse_classify_store): Track cycles via a visited bitmap of PHI
13221 defs and simplify handling of in-loop and across loop dead stores
13222 and properly fail for loop-variant refs. Handle byte-tracking with
13223 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
13224 limiting the walk.
13225
13226 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
13227
13228 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
13229 (vect_get_mask_type_for_stmt): Likewise.
13230 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
13231 split out from...
13232 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
13233 to determine the statement's vector type and the vector type that
13234 should be used for calculating nunits. Deal with cases in which
13235 the type has to be deferred.
13236 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
13237 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
13238 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
13239 (vect_determine_vf_for_stmt): New functions, split out from...
13240 (vect_determine_vectorization_factor): ...here.
13241 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
13242 (vect_get_mask_type_for_stmt): New functions, split out from
13243 vect_determine_vectorization_factor.
13244
13245 2018-05-16 Richard Biener <rguenther@suse.de>
13246
13247 * tree-cfg.c (verify_gimple_assign_ternary): Properly
13248 verify the [VEC_]COND_EXPR embedded comparison.
13249
13250 2018-05-15 Martin Sebor <msebor@redhat.com>
13251
13252 PR tree-optimization/85753
13253 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
13254 RECORD_TYPE in addition to ARRAY_TYPE.
13255
13256 2018-05-15 Martin Sebor <msebor@redhat.com>
13257
13258 PR middle-end/85643
13259 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
13260
13261 2018-05-15 Richard Biener <rguenther@suse.de>
13262
13263 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
13264 add by_clobber_p one. Change algorithm to collect all defs
13265 representing uses we need to walk and try reducing them to
13266 a single one before failing.
13267 (dse_dom_walker::dse_optimize_stmt): Adjust.
13268
13269 2018-05-13 Mark Wielaard <mark@klomp.org>
13270
13271 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
13272 (size_of_loc_descr): Likewise.
13273 (output_loc_operands): Likewise.
13274 (output_loc_operands_raw): Likewise.
13275 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
13276 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
13277 (hash_loc_operands): Likewise.
13278 (compare_loc_operands): Likewise.
13279
13280 2018-05-14 Mark Wielaard <mark@klomp.org>
13281
13282 * dwarf2out.c (count_index_addrs): New function.
13283 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
13284
13285 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13286
13287 PR tree-optimization/83648
13288 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
13289 return value as malloc candidate.
13290
13291 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13292
13293 PR ipa/85734
13294 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
13295 param as true in call to suggest_attribute.
13296
13297 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
13298
13299 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
13300 -mreadonly-in-sdata.
13301
13302 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13303
13304 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
13305 New pattern.
13306 (aarch64_crypto_aesd_fused): Likewise.
13307
13308 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
13309
13310 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
13311 (movsi_aarch64): Likewise.
13312 (load_pairsi): Likewise.
13313 (load_pairdi): Likewise.
13314 (store_pairsi): Likewise.
13315 (store_pairdi): Likewise.
13316 (load_pairsf): Likewise.
13317 (load_pairdf): Likewise.
13318 (store_pairsf): Likewise.
13319 (store_pairdf): Likewise.
13320 (zero_extend): Likewise.
13321 (trunc): Swap alternatives.
13322 (fcvt_target): Add '?' to prefer w over r.
13323
13324 2018-05-14 Jakub Jelinek <jakub@redhat.com>
13325
13326 PR target/85756
13327 * config/i386/i386.md: Disallow non-commutative arithmetics in
13328 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
13329 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
13330 in the peephole2 before it.
13331
13332 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
13333
13334 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13335 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13336 (ix86_handle_option): Handle -mcldemote.
13337 * config.gcc: New header.
13338 * config/i386/cldemoteintrin.h: New file.
13339 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13340 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13341 -mcldemote.
13342 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13343 OPTION_MASK_ISA_CLDEMOTE.
13344 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13345 (ix86_valid_target_attribute_inner_p): Ditto.
13346 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13347 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13348 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13349 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13350 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13351 (cldemote): New.
13352 * config/i386/i386.opt: Add -mcldemote.
13353 * config/i386/x86intrin.h: New header.
13354 * doc/invoke.texi: Add -mcldemote.
13355
13356 2018-05-14 Richard Biener <rguenther@suse.de>
13357
13358 * doc/match-and-simplify.texi: Adjust :s documentation.
13359
13360 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
13361
13362 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13363 intended memcpy size.
13364 (REORDER_45): Likewise.
13365
13366 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
13367
13368 * sort.cc: New file.
13369 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13370 * vec.c (qsort_chk): Use gcc_qsort.
13371 * Makefile.in (OBJS-libcommon): Add sort.o.
13372 (build/sort.o): New target. Use it...
13373 (BUILD_RTL): ... here, and...
13374 (build/gencfn-macros): ... here, and...
13375 (build/genmatch): ... here.
13376
13377 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13378 Chung-Ju Wu <jasonwucj@gmail.com>
13379
13380 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13381 * config/nds32/nds32-graywolf.md: New file.
13382 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13383 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13384 pipeline.
13385 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13386 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13387 * config/nds32/nds32.md (pipeline_model): Add graywolf.
13388 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13389 * config/nds32/pipelines.md: Include n15 settings.
13390
13391 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13392 Chung-Ju Wu <jasonwucj@gmail.com>
13393
13394 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13395 * config/nds32/nds32-n13.md: New file.
13396 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13397 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13398 pipeline.
13399 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13400 * config/nds32/nds32.md (pipeline_model): Add n13.
13401 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13402 * config/nds32/pipelines.md: Include n13 settings.
13403
13404 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13405 Chung-Ju Wu <jasonwucj@gmail.com>
13406
13407 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13408 * config/nds32/nds32-n10.md: New file.
13409 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13410 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13411 pipeline.
13412 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13413 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13414 * config/nds32/nds32.md (pipeline_model): Add n10.
13415 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13416 * config/nds32/pipelines.md: Include n10 settings.
13417
13418 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
13419 Kito Cheng <kito.cheng@gmail.com>
13420 Chung-Ju Wu <jasonwucj@gmail.com>
13421
13422 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13423 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13424 Add enum values for DSP extension instructions.
13425 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13426 New constraints.
13427 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13428 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13429 New code iterators.
13430 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13431 * config/nds32/nds32-dspext.md: New file for DSP implementation.
13432 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13433 * config/nds32/nds32-intrinsic.md: Likewise.
13434 * config/nds32/nds32_intrinsic.h: Likewise.
13435 * config/nds32/nds32-md-auxiliary.c: Likewise.
13436 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13437 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13438 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13439 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13440 * config/nds32/nds32-protos.h: New declarations for DSP extension.
13441 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13442 TYPE_DMAC in switch statement.
13443 * config/nds32/nds32.c: New checking and implementation for DSP
13444 extension instructions.
13445 * config/nds32/nds32.h: Likewise.
13446 * config/nds32/nds32.md: Likewise.
13447 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13448 * config/nds32/predicates.md: Implement new predicates for DSP
13449 extension.
13450
13451 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13452
13453 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13454 Reformat alternatives and attributes so it is easier to identify
13455 which constraints/attributes go with which instruction.
13456 (mov<mode>_hardfloat32, FMOVE64): Likewise.
13457 (mov<mode>_softfloat32, FMOVE64): Likewise.
13458 (mov<mode>_hardfloat64, FMOVE64): Likewise.
13459 (mov<mode>_softfloat64, FMOVE64): Likewise.
13460
13461 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
13462
13463 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13464 subsection.
13465 (Basic PowerPC Built-in Functions): The new name of the
13466 subsection previously known as "PowerPC Built-in Functions".
13467 (Basic PowerPC Built-in Functions Available on all Configurations):
13468 New subsubsection.
13469 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13470 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13471 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13472 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13473
13474 2018-05-11 Martin Jambor <mjambor@suse.cz>
13475
13476 PR ipa/85655
13477 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13478 single const.
13479
13480 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13481
13482 PR target/85733
13483 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13484
13485 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
13486
13487 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13488 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13489 (ix86_handle_option): Handle -mwaitpkg.
13490 * config.gcc: New header.
13491 * config/i386/cpuid.h (bit_WAITPKG): New bit.
13492 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13493 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13494 function type.
13495 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13496 OPTION_MASK_ISA_WAITPKG.
13497 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13498 (ix86_option_override_internal): Add PTA_WAITPKG.
13499 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13500 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13501 IX86_BUILTIN_TPAUSE.
13502 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13503 __builtin_ia32_umwait and __builtin_ia32_tpause.
13504 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13505 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13506 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13507 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13508 UNSPECV_TPAUSE): New.
13509 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13510 * config/i386/i386.opt: Add -mwaitpkg.
13511 * config/i386/waitpkgintrin.h: New file.
13512 * config/i386/x86intrin.h: New header.
13513 * doc/invoke.texi: Add -mwaitpkg.
13514
13515 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13516
13517 PR target/85606
13518 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13519 equivalent.
13520 (cortex-m0): Use armv6s-m isa.
13521 (cortex-m0plus): Likewise.
13522 (cortex-m1): Likewise.
13523 (cortex-m0.small-multiply): Likewise.
13524 (cortex-m0plus.small-multiply): Likewise.
13525 (cortex-m1.small-multiply): Likewise.
13526
13527 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
13528 Jakub Jelinek <jakub@redhat.com>
13529
13530 PR tree-optimization/85692
13531 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13532 source permute as well.
13533
13534 2018-05-11 Martin Liska <mliska@suse.cz>
13535
13536 PR sanitizer/85556
13537 * doc/extend.texi: Document LLVM style format for no_sanitize
13538 attribute.
13539
13540 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13541
13542 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13543 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13544 (mode_supports_vsx_dform_quad): Likewise.
13545 (mode_supports_vmx_dform): Move these functions to be next to the
13546 other mode_supports functions.
13547 (mode_supports_dq_form): Likewise.
13548 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13549 mode_supports_dq_form.
13550 (reg_offset_addressing_ok_p): Likewise.
13551 (offsettable_ok_by_alignment): Likewise.
13552 (rs6000_legitimate_offset_address_p): Likewise.
13553 (legitimate_lo_sum_address_p): Likewise.
13554 (rs6000_legitimize_address): Likewise.
13555 (rs6000_legitimize_reload_address): Likewise.
13556 (rs6000_secondary_reload_inner): Likewise.
13557 (rs6000_preferred_reload_class): Likewise.
13558 (rs6000_output_move_128bit): Likewise.
13559
13560 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13561
13562 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13563 Generate SImode target register for null target.
13564 <case IX86_BUILTIN_XGETBV>: Ditto.
13565 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13566 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13567
13568 2018-05-10 Carl Love <cel@us.ibm.com>
13569
13570 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13571 dcbtt and dcbtstt if operands[2] is 0.
13572
13573 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13574
13575 PR target/85693
13576 * config/i386/sse.md (usadv64qi): New expander.
13577
13578 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13579
13580 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13581 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13582 -maltivec=be support.
13583 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13584 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13585 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13586 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13587 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13588 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13589 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13590 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13591 altivec_vsumsws): Adjust.
13592 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13593 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13594 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13595 support.
13596 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13597 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13598 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13599 (altivec_lve<VI_char>x): Delete expand.
13600 (*altivec_lve<VI_char>x_internal): Rename to...
13601 (altivec_lve<VI_char>x): ... this.
13602 (altivec_lvxl_<mode>): Delete expand.
13603 (*altivec_lvxl_<mode>_internal): Rename to ...
13604 (altivec_lvxl_<mode>): ... this.
13605 (altivec_stvxl_<mode>): Delete expand.
13606 (*altivec_stvxl_<mode>_internal): Rename to ...
13607 (altivec_stvxl_<mode>): ... this.
13608 (altivec_stve<VI_char>x): Delete expand.
13609 (*altivec_stve<VI_char>x_internal): Rename to ...
13610 (altivec_stve<VI_char>x): ... this.
13611 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13612 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13613 reduc_plus_scal_<mode>): Adjust.
13614 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13615 comment.
13616 (rs6000_cpu_cpp_builtins): Adjust.
13617 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13618 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13619 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13620 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13621 -maltivec=be support.
13622 (rs6000_split_vec_extract_var): Adjust.
13623 (rs6000_split_v4si_init): Adjust.
13624 (swap_selector_for_mode): Delete.
13625 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13626 altivec_expand_stvex_be): Delete.
13627 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13628 -maltivec=be support.
13629 (rs6000_gimple_fold_builtin): Ditto.
13630 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13631 Adjust.
13632 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13633 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13634 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13635 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13636 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13637 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13638 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13639 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13640 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13641 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13642 anonymous split): Adjust.
13643 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13644 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13645
13646 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13647
13648 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13649 when --with-gxx-include-dir is also specified.
13650 * configure: Regenerate.
13651
13652 2018-05-09 Jim Wilson <jimw@sifive.com>
13653
13654 PR target/84797
13655 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13656 * config/riscv/t-withmultilib: New.
13657 * config/riscv/withmultilib.h: New.
13658 * doc/install.texi: Document RISC-V --with-multilib-list support.
13659
13660 2018-05-09 Richard Biener <rguenther@suse.de>
13661
13662 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13663 vector.
13664 (vect_bb_vectorization_profitable_p): Adjust. Compute
13665 actual scalar cost using the cost vector and the add_stmt_cost
13666 machinery.
13667
13668 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13669
13670 PR rtl-optimization/85645
13671 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13672 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13673
13674 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13675
13676 PR rtl-optimization/85645
13677 * shrink-wrap.c (spread_components): Return a boolean saying if
13678 anything was changed.
13679 (try_shrink_wrapping_separate): Iterate spread_components until
13680 nothing changes anymore.
13681
13682 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13683
13684 PR rtl-optimization/85645
13685 * regrename.c (build_def_use): Also kill the chains that include the
13686 destination of a REG_CFA_REGISTER note.
13687
13688 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13689
13690 PR rtl-optimization/85645
13691 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13692 insn that has a REG_CFA_REGISTER note.
13693
13694 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13695
13696 * cfgexpand.c (expand_clobber): New function.
13697 (expand_gimple_stmt_1): Use it.
13698 * tree-vect-stmts.c (vect_clobber_variable): New function,
13699 split out from...
13700 (vectorizable_simd_clone_call): ...here.
13701 (vectorizable_store): Emit a clobber either side of an
13702 IFN_STORE_LANES sequence.
13703 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13704
13705 2018-05-09 Tom de Vries <tom@codesourcery.com>
13706
13707 PR target/85626
13708 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13709 (define_insn "trap_if_false"): Add exit after trap.
13710
13711 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13712
13713 PR rtl-optimization/85638
13714 * bb-reorder.c: Include common/common-target.h.
13715 (create_forwarder_block): New function extracted from...
13716 (fix_up_crossing_landing_pad): ...here. Rename into...
13717 (dw2_fix_up_crossing_landing_pad): ...this.
13718 (sjlj_fix_up_crossing_landing_pad): New function.
13719 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13720 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13721 from both partitions and exit the loop after one iteration.
13722
13723 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13724
13725 Revert:
13726 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13727 subsection.
13728 (Basic PowerPC Built-in Functions): The new name of the
13729 subsection previously known as "PowerPC Built-in Functions".
13730 (Basic PowerPC Built-in Functions Available on all Configurations):
13731 New subsubsection.
13732 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13733 subsubsection.
13734 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13735 subsubsection.
13736 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13737 subsubsection.
13738 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13739 subsubsection.
13740
13741 2018-05-08 Jim Wilson <jimw@sifive.com>
13742
13743 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13744 (LD_EMUL_SUFFIX): New.
13745 (LINK_SPEC): Use it.
13746
13747 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13748
13749 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13750 subsection.
13751 (Basic PowerPC Built-in Functions): The new name of the
13752 subsection previously known as "PowerPC Built-in Functions".
13753 (Basic PowerPC Built-in Functions Available on all Configurations):
13754 New subsubsection.
13755 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13756 subsubsection.
13757 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13758 subsubsection.
13759 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13760 subsubsection.
13761 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13762 subsubsection.
13763
13764 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13765
13766 PR target/85683
13767 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13768 after cmpelim optimization.
13769
13770 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13771
13772 * config.gcc: Support "goldmont".
13773 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13774 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13775 PROCESSOR_GOLDMONT.
13776 * config/i386/i386.c (m_GOLDMONT): Define.
13777 (processor_target_table): Add "goldmont".
13778 (PTA_GOLDMONT): Define.
13779 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13780 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13781 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13782 (fold_builtin_cpu): Add "goldmont".
13783 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13784 (ix86_option_override_internal): Add "goldmont".
13785 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13786 (processor_type): Add PROCESSOR_GOLDMONT.
13787 * config/i386/i386.md: Add CPU "glm".
13788 * config/i386/glm.md: New file.
13789 * config/i386/x86-tune.def: Add m_GOLDMONT.
13790 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13791
13792 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13793
13794 PR target/85572
13795 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13796 E_V4DImode.
13797 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13798 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13799 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13800
13801 PR target/85317
13802 * config/i386/i386.c (ix86_fold_builtin): Handle
13803 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13804
13805 PR target/85480
13806 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13807 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13808
13809 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13810
13811 PR target/85658
13812 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13813 (check_arch): Likewise.
13814 (check_fpu): Return the result rather than printing it.
13815 (end arch): Fix operator precedence.
13816 (end cpu): Likewise.
13817 (END): Print the result from check_fpu.
13818
13819 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13820 Alan Hayward <alan.hayward@arm.com>
13821 David Sherwood <david.sherwood@arm.com>
13822
13823 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13824 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13825 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13826 (*fcmuo<mode>_and): New patterns.
13827
13828 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13829
13830 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13831 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13832 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13833 (cmp_op, sve_imm_con): New code attributes.
13834 (SVE_COND_INT_CMP, imm_con): Delete.
13835 (cmp_op): Remove above unspecs from int attribute.
13836 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13837 to...
13838 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13839 comparison-specific unspecs.
13840 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13841 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13842 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13843 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13844 (*vec_fcm<cmp_op><mode>): Rename to...
13845 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13846 (*vec_fcmuo<mode>): Rename to...
13847 (*fcmuo<mode>): ...this and adjust likewise.
13848 (*pred_fcm<cmp_op><mode>): New pattern.
13849 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13850 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13851 functions.
13852 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13853 and UNORDERED.
13854 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13855 (aarch64_emit_sve_predicated_cond): New function.
13856 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13857 (aarch64_emit_unspec_cond_or): Replace with...
13858 (aarch64_emit_sve_or_conds): ...this new function. Use
13859 aarch64_emit_sve_ptrue_op for the individual comparisons and
13860 aarch64_emit_binop to OR them together.
13861 (aarch64_emit_inverted_unspec_cond): Replace with...
13862 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13863 aarch64_emit_sve_ptrue_op for the comparison and
13864 aarch64_emit_unop to invert the result.
13865 (aarch64_expand_sve_vec_cmp_float): Update after the above
13866 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13867
13868 2018-05-07 Nathan Sidwell <nathan@acm.org>
13869
13870 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13871 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13872 (Backwards Compatibility): Likewise.
13873
13874 2018-05-07 Luis Machado <luis.machado@linaro.org>
13875
13876 PR bootstrap/85681
13877 Revert:
13878 2018-05-07 Luis Machado <luis.machado@linaro.org>
13879
13880 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13881 <prefetch_dynamic_strides>: New const bool field.
13882 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13883 prefetch_dynamic_strides.
13884 (exynosm1_prefetch_tune): Likewise.
13885 (thunderxt88_prefetch_tune): Likewise.
13886 (thunderx_prefetch_tune): Likewise.
13887 (thunderx2t99_prefetch_tune): Likewise.
13888 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13889 to false.
13890 (aarch64_override_options_internal): Update to set
13891 PARAM_PREFETCH_DYNAMIC_STRIDES.
13892 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13893 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13894 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13895 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13896 prefetch-dynamic-strides setting.
13897
13898 2018-05-07 Luis Machado <luis.machado@linaro.org>
13899
13900 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13901 <minimum_stride>: New const int field.
13902 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13903 minimum_stride field.
13904 (exynosm1_prefetch_tune): Likewise.
13905 (thunderxt88_prefetch_tune): Likewise.
13906 (thunderx_prefetch_tune): Likewise.
13907 (thunderx2t99_prefetch_tune): Likewise.
13908 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13909 (aarch64_override_options_internal): Update to set
13910 PARAM_PREFETCH_MINIMUM_STRIDE.
13911 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13912 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13913 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13914 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13915 stride is constant and is below the minimum stride threshold.
13916
13917 2018-05-07 Luis Machado <luis.machado@linaro.org>
13918
13919 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13920 to 512.
13921
13922 2018-05-07 Luis Machado <luis.machado@linaro.org>
13923
13924 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13925 <prefetch_dynamic_strides>: New const bool field.
13926 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13927 prefetch_dynamic_strides.
13928 (exynosm1_prefetch_tune): Likewise.
13929 (thunderxt88_prefetch_tune): Likewise.
13930 (thunderx_prefetch_tune): Likewise.
13931 (thunderx2t99_prefetch_tune): Likewise.
13932 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13933 to false.
13934 (aarch64_override_options_internal): Update to set
13935 PARAM_PREFETCH_DYNAMIC_STRIDES.
13936 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13937 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13938 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13939 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13940 prefetch-dynamic-strides setting.
13941
13942 2018-05-07 Luis Machado <luis.machado@linaro.org>
13943
13944 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13945 <minimum_stride>: New const int field.
13946 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13947 minimum_stride field.
13948 (exynosm1_prefetch_tune): Likewise.
13949 (thunderxt88_prefetch_tune): Likewise.
13950 (thunderx_prefetch_tune): Likewise.
13951 (thunderx2t99_prefetch_tune): Likewise.
13952 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13953 (aarch64_override_options_internal): Update to set
13954 PARAM_PREFETCH_MINIMUM_STRIDE.
13955 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13956 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13957 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13958 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13959 stride is constant and is below the minimum stride threshold.
13960
13961 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13962
13963 PR c++/85659
13964 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13965 the type is addressable. Don't force op into register if it has
13966 BLKmode.
13967
13968 2018-05-05 Roland McGrath <mcgrathr@google.com>
13969
13970 PR other/77609
13971 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13972 any section for which we don't know a specific type it should have,
13973 regardless of name. Previously this was done only for the exact
13974 names ".init_array", ".fini_array", and ".preinit_array".
13975 (default_elf_asm_named_section): Add comment about
13976 relationship with default_section_type_flags and SECTION_NOTYPE.
13977 (get_section): Don't consider it a type conflict if one side has
13978 SECTION_NOTYPE and the other doesn't, as long as neither has the
13979 SECTION_BSS et al used in the default_section_type_flags logic.
13980
13981 2018-05-05 Tom de Vries <tom@codesourcery.com>
13982
13983 PR target/85653
13984 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13985 (workaround_barsyncs): New function.
13986 (nvptx_reorg): Use workaround_barsyncs.
13987 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13988 (define_expand "nvptx_membar_cta"): New define_expand.
13989 (define_insn "*nvptx_membar_cta"): New insn.
13990
13991 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13992
13993 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13994 To improve optimization opportunities.
13995 * builtin-types.def: The new needed builtin types for the above.
13996
13997 2018-05-04 Richard Biener <rguenther@suse.de>
13998
13999 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
14000 * gimple-ssa-store-merging.c
14001 (imm_store_chain_info::output_merged_store): Remove redundant create,
14002 release split_store vector contents on failure.
14003 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
14004 scalar stmt vector on cache hit.
14005
14006 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
14007
14008 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
14009 Xilinx FP support.
14010 * config.gcc (powerpc-xilinx-eabi*): Remove.
14011 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
14012 support.
14013 (fusion_addis_mem_combo_load): Ditto.
14014 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
14015 FP support.
14016 (rs6000_cpu_cpp_builtins): Ditto.
14017 * config/rs6000/rs6000-linux.c
14018 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
14019 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
14020 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
14021 support.
14022 (rs6000_setup_reg_addr_masks): Ditto.
14023 (rs6000_init_hard_regno_mode_ok): Ditto.
14024 (rs6000_option_override_internal): Ditto.
14025 (legitimate_lo_sum_address_p): Ditto.
14026 (rs6000_legitimize_address): Ditto.
14027 (rs6000_legitimize_reload_address): Ditto.
14028 (rs6000_legitimate_address_p): Ditto.
14029 (abi_v4_pass_in_fpr): Ditto.
14030 (setup_incoming_varargs): Ditto.
14031 (rs6000_gimplify_va_arg): Ditto.
14032 (rs6000_split_multireg_move): Ditto.
14033 (rs6000_savres_strategy): Ditto.
14034 (rs6000_emit_prologue_components): Ditto.
14035 (rs6000_emit_epilogue_components): Ditto.
14036 (rs6000_emit_prologue): Ditto.
14037 (rs6000_emit_epilogue): Ditto.
14038 (rs6000_elf_file_end): Ditto.
14039 (rs6000_function_value): Ditto.
14040 (rs6000_libcall_value): Ditto.
14041 * config/rs6000/rs6000.h: Ditto.
14042 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
14043 (TARGET_MINMAX): ... this. New.
14044 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
14045 * config/rs6000/rs6000.md: Remove Xilinx FP support.
14046 (*movsi_internal1_single): Delete.
14047 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
14048 mfpu=, mxilinx-fpu): Delete.
14049 * config/rs6000/singlefp.h: Delete.
14050 * config/rs6000/sysv4.h: Remove Xilinx FP support.
14051 * config/rs6000/t-rs6000: Ditto.
14052 * config/rs6000/t-xilinx: Delete.
14053 * config/rs6000/titan.md: Adjust for fp_type removal.
14054 * config/rs6000/vsx.md: Remove Xilinx FP support.
14055 (VStype_simple): Delete.
14056 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
14057 * config/rs6000/xfpu.h: Delete.
14058 * config/rs6000/xfpu.md: Delete.
14059 * config/rs6000/xilinx.h: Delete.
14060 * config/rs6000/xilinx.opt: Delete.
14061 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
14062 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
14063
14064 2018-05-04 Tom de Vries <tom@codesourcery.com>
14065
14066 PR libgomp/85639
14067 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
14068 if ignore == 0.
14069
14070 2018-05-04 Richard Biener <rguenther@suse.de>
14071
14072 PR middle-end/85627
14073 * tree-complex.c (update_complex_assignment): We are always in SSA form.
14074 (expand_complex_div_wide): Likewise.
14075 (expand_complex_operations_1): Likewise.
14076 (expand_complex_libcall): Preserve EH info of the original stmt.
14077 (tree_lower_complex): Handle removed blocks.
14078 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
14079 on complex multiplication and division libcall builtins.
14080
14081 2018-05-04 Richard Biener <rguenther@suse.de>
14082
14083 PR middle-end/85574
14084 * fold-const.c (negate_expr_p): Restrict negation of operand
14085 zero of a division to when we know that can happen without
14086 overflow.
14087 (fold_negate_expr_1): Likewise.
14088
14089 2018-05-04 Jakub Jelinek <jakub@redhat.com>
14090
14091 PR libstdc++/85466
14092 * real.h (real_nextafter): Declare.
14093 * real.c (real_nextafter): New function.
14094 * fold-const-call.c (fold_const_nextafter): New function.
14095 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
14096 CASE_CFN_NEXTTOWARD.
14097 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
14098 even when arg1_mode is different from arg0_mode.
14099
14100 2018-05-03 Nathan Sidwell <nathan@acm.org>
14101
14102 * doc/extend.texi (Deprecated Features): Remove
14103 -ffriend-injection.
14104 (Backwards Compatibility): Likewise.
14105 * doc/invoke.texi (C++ Language Options): Likewise.
14106 (C++ Dialect Options): Likewise.
14107
14108 2018-05-03 Jakub Jelinek <jakub@redhat.com>
14109
14110 PR target/85530
14111 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
14112 _mm512_mask_mullox_epi64): New intrinsics.
14113
14114 2018-05-03 Tom de Vries <tom@codesourcery.com>
14115
14116 PR testsuite/85106
14117 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14118 dump files): Add offload-tree.
14119
14120 2018-05-03 Richard Biener <rguenther@suse.de>
14121
14122 PR tree-optimization/85615
14123 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
14124 to loops not nested in BBs loop father to avoid creating multi-entry
14125 loops.
14126
14127 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14128
14129 PR tree-optimization/70291
14130 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
14131 arguments. Change return type to tree. Emit libcall as a new
14132 statement rather than replacing existing one when inplace_p is true.
14133 (expand_complex_multiplication_components): New function.
14134 (expand_complex_multiplication): Expand floating-point complex
14135 multiplication using the above.
14136 (expand_complex_division): Rename inner_type parameter to type.
14137 Update expand_complex_libcall call-site.
14138 (expand_complex_operations_1): Update expand_complex_multiplication
14139 and expand_complex_division call-sites.
14140
14141 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14142
14143 PR target/85582
14144 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14145 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14146 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
14147 the highest significant bit of the shift count mask is clear. In
14148 check whether and[sq]i3 is needed verify that all significant bits
14149 of the shift count other than the highest are set.
14150
14151 2018-05-02 Tom de Vries <tom@codesourcery.com>
14152
14153 PR libgomp/82428
14154 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
14155 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
14156 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
14157 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
14158 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
14159 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
14160 __builtin_goacc_parlevel_size.
14161
14162 2018-05-02 Richard Biener <rguenther@suse.de>
14163
14164 PR tree-optimization/85597
14165 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
14166 do not use split vect_get_vec_defs call but call vect_get_slp_defs
14167 directly.
14168
14169 2018-05-02 Tom de Vries <tom@codesourcery.com>
14170
14171 PR testsuite/85106
14172 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14173 dump files): Add ltrans-tree.
14174
14175 2018-05-02 Tom de Vries <tom@codesourcery.com>
14176
14177 PR testsuite/85106
14178 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14179 dump files): Add wpa-ipa.
14180
14181 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
14182
14183 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
14184 powerpc*-*-linux*paired* target.
14185 * config/rs6000/750cl.h: Delete.
14186 * config/rs6000/paired.h: Delete.
14187 * config/rs6000/paired.md: Delete.
14188 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
14189 float support.
14190 * config/rs6000/rs6000-builtin.def: Remove paired float support.
14191 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
14192 comment. Remove paired float support.
14193 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
14194 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
14195 VECTOR_PAIRED.
14196 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
14197 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
14198 declarations.
14199 * config/rs6000/rs6000.c: Remove paired float support.
14200 (paired_expand_vector_init, paired_expand_vector_move,
14201 paired_emit_vector_compare, paired_emit_vector_cond_expr,
14202 (paired_expand_lv_builtin, paired_expand_stv_builtin,
14203 paired_expand_builtin, paired_expand_predicate_builtin,
14204 paired_init_builtins): Delete.
14205 * config/rs6000/rs6000.h: Remove paired float support.
14206 * config/rs6000/rs6000.md: Remove paired float support.
14207 (move_from_CR_ov_bit): Delete.
14208 * config/rs6000/rs6000.opt (mpaired): Delete.
14209 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
14210 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
14211
14212 2018-05-02 Richard Biener <rguenther@suse.de>
14213
14214 PR middle-end/85567
14215 * gimplify.c (gimplify_save_expr): When in SSA form allow
14216 SAVE_EXPRs to compute to SSA vars.
14217
14218 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14219
14220 PR target/85582
14221 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14222 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14223 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
14224 clobber operands[2], instead use a new pseudo. Formatting fixes.
14225
14226 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
14227
14228 PR tree-optimization/85586
14229 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
14230 exit early for statements in the same group if the accesses are
14231 not strided.
14232
14233 2018-05-02 Tom de Vries <tom@codesourcery.com>
14234
14235 PR lto/85451
14236 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
14237 error message.
14238
14239 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
14240
14241 PR tree-optimization/85143
14242 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
14243
14244 2018-05-01 Tom de Vries <tom@codesourcery.com>
14245
14246 PR lto/85451
14247 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
14248 not found" error message.
14249
14250 2018-05-01 Tom de Vries <tom@codesourcery.com>
14251
14252 PR other/83786
14253 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
14254 * vec.c (test_ordered_remove_if): New function.
14255 (vec_c_tests): Call test_ordered_remove_if.
14256 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
14257 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
14258 * tree-vect-patterns.c (vect_pattern_recog_1): Use
14259 VEC_ORDERED_REMOVE_IF.
14260
14261 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14262
14263 PR tree-optimization/82665
14264 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
14265 pointer subtraction where arguments come from a memchr call.
14266
14267 2018-05-01 Jakub Jelinek <jakub@redhat.com>
14268
14269 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
14270 --push-state --as-needed and --pop-state instead of --as-needed and
14271 --no-as-needed if ld supports it.
14272 * configure: Regenerated.
14273
14274 PR web/85578
14275 * doc/install.texi2html: Replace _002d with - and _002a with * in
14276 generated html files using sed.
14277
14278 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14279
14280 PR c++/85523
14281 * gcc-rich-location.c (blank_line_before_p): New function.
14282 (use_new_line): New function.
14283 (gcc_rich_location::add_fixit_insert_formatted): New function.
14284 * gcc-rich-location.h
14285 (gcc_rich_location::add_fixit_insert_formatted): New function.
14286
14287 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14288
14289 * selftest.c (assert_streq): Rename "expected" and "actual" to
14290 "val1" and "val2". Extend NULL-handling to cover both inputs
14291 symmetrically, while still requiring both to be non-NULL for a pass.
14292 * selftest.h (assert_streq): Rename "expected" and "actual" to
14293 "val1" and "val2".
14294 (ASSERT_EQ): Likewise.
14295 (ASSERT_EQ_AT): Likewise.
14296 (ASSERT_KNOWN_EQ): Likewise.
14297 (ASSERT_KNOWN_EQ_AT): Likewise.
14298 (ASSERT_NE): Likewise.
14299 (ASSERT_MAYBE_NE): Likewise.
14300 (ASSERT_MAYBE_NE_AT): Likewise.
14301 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
14302 the assertion to pass.
14303 (ASSERT_STREQ_AT): Likewise.
14304
14305 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14306
14307 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
14308 interaction with -pie.
14309
14310 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14311
14312 * selftest.h: Fix alphabetization of per-source-file selftest
14313 declarations.
14314
14315 2018-04-30 Jason Merrill <jason@redhat.com>
14316
14317 PR c++/61982 - dead stores to destroyed objects.
14318 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
14319 of clobber.
14320
14321 2018-04-30 Jason Merrill <jason@redhat.com>
14322
14323 * tree.c (build_clobber): New.
14324 * tree.h: Declare it.
14325 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
14326
14327 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14328
14329 * diagnostic-show-locus.c (layout::layout): Update for
14330 location_get_source_line returning a char_span.
14331 (struct char_span): Move to input.h.
14332 (struct correction): Update for fields in char_span becoming
14333 private.
14334 (struct source_line): Update for location_get_source_line
14335 returning a char_span.
14336 (layout::print_line): Likewise.
14337 * edit-context.c (edited_file::print_content): Likewise.
14338 (edited_file::print_diff_hunk): Likewise.
14339 (edited_file::print_run_of_changed_lines): Likewise.
14340 (edited_file::get_num_lines): Likewise.
14341 (edited_line::edited_line): Likewise.
14342 * final.c (asm_show_source): Likewise.
14343 * input.c (location_get_source_line): Convert return type
14344 from const char * to char_span, losing the final "line_len"
14345 param.
14346 (dump_location_info): Update for the above.
14347 (get_substring_ranges_for_loc): Likewise. Use a char_span
14348 when handling the literal within the line.
14349 (test_reading_source_line): Update for location_get_source_line
14350 returning a char_span.
14351 * input.h (class char_span): Move here from
14352 diagnostic-show-locus.c, converting from a struct to a class.
14353 Make data members private.
14354 (char_span::operator bool): New.
14355 (char_span::length): New.
14356 (char_span::get_buffer): New.
14357 (char_span::operator[]): New.
14358 (char_span::subspan): Make const.
14359 (char_span::xstrdup): New.
14360 (location_get_source_line): Convert return type from const char *
14361 to char_span, losing the final "line_size" param.
14362
14363 2018-04-30 Jan Hubicka <jh@suse.cz>
14364
14365 * lto-wrapper.c (ltrans_priorities): New static var.
14366 (cmp_priority): New.
14367 (run_gcc): Read priorities and if doing parallel build order
14368 the Makefile by them.
14369
14370 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14371
14372 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14373
14374 2018-04-30 Richard Biener <rguenther@suse.de>
14375
14376 * tree-cfg.c (verify_address): Remove base argument, add
14377 flag whether to check TREE_ADDRESSABLE and do that.
14378 (verify_expr): Remove.
14379 (verify_types_in_gimple_reference): Add pieces from verify_expr.
14380 (verify_gimple_assign_single): Likewise.
14381 (verify_gimple_switch): Likewise.
14382 (verify_expr_location_1): Dereference tp once. Add (disabled)
14383 piece from verify_expr.
14384 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14385
14386 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14387
14388 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14389
14390 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14391
14392 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14393 (small_data_pattern): Likewise.
14394 (arc_rewrite_small_data): Likewise.
14395 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14396 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14397 (get_symbol_alignment): New function.
14398 (legitimate_small_data_address_p): Likewise.
14399 (legitimate_scaled_address): Update, call
14400 legitimate_small_data_address_p.
14401 (output_sdata): New static variable.
14402 (arc_print_operand): Update how we handle small data operands.
14403 (arc_print_operand_address): Likewise.
14404 (arc_legitimate_address_p): Update, use
14405 legitimate_small_data_address_p.
14406 (arc_rewrite_small_data_p): Remove.
14407 (arc_rewrite_small_data_1): Likewise.
14408 (arc_rewrite_small_data): Likewise.
14409 (small_data_pattern): Likewise.
14410 (compact_sda_memory_operand): Update to use
14411 legitimate_small_data_address_p and get_symbol_alignment.
14412 (prepare_move_operands): Don't rewite sdata pattern.
14413 (prepare_extend_operands): Remove.
14414 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14415 pattern.
14416 (zero_extendqisi2): Likewise.
14417 (zero_extendhisi2): Likewise.
14418 (extendqihi2): Likewise.
14419 (extendqisi2): Likewise.
14420 (extendhisi2): Likewise.
14421 (addsi3): Likewise.
14422 (subsi3): Likewise.
14423 (andsi3): Likewise.
14424 * config/arc/constraints.md (Usd): Change it to memory constraint.
14425
14426 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14427
14428 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14429 as source of std instructions.
14430 * config/arc/arc.md (movsi_insn): Update pattern predicate to
14431 allow 6-bit constants as source for store instructions.
14432 (movdi_insn): Update instruction pattern to allow 6-bit constants
14433 as source for store instructions.
14434
14435 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14436
14437 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14438
14439 2018-04-30 Nathan Sidwell <nathan@acm.org>
14440 Sandra Loosemore <sandra@codesourcery.com>
14441
14442 * dumpfile.c (dump_open): Allow '-' for stdout.
14443 * doc/invoke.texi (Developer Options): Document dump filename
14444 determination early. Document stdin/stdout selection.
14445
14446 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
14447
14448 Microblaze Target: PIC data text relative
14449
14450 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14451 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14452 Add declaration.
14453 * config/microblaze/microblaze.h (microblaze_constant_address_p):
14454 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14455 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14456 New addressing mode for data-text relative position indepenedent code.
14457 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14458 'ADDRESS_SYMBOLIC_TXT_REL'.
14459 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14460 (microblaze_legitimate_pic_operand): Exclude function calls from
14461 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14462 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14463 addresses cases.
14464 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14465 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14466 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14467 for 'address + offset'.
14468 (microblaze_expand_prologue): Add new function prologue call for
14469 'r20' assignation.
14470 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14471 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14472 table in case of TARGET_PIC_DATA_TEXT_REL.
14473 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14474 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14475 Add new macros 'UNSPEC_TEXT',
14476 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14477 + exclude function calls from 'UNSPEC_PLT' in case of data text
14478 relative mode.
14479 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14480 new target hook for generating address diff vector tables in case of
14481 flag_pic.
14482 * doc/tm.texi : Regenerate.
14483 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14484 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14485 of addr diff vector generation.
14486 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14487 target hook definition.
14488 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14489 Add default function for generate_pic_addr_diff_vec -> flag_pic.
14490 * doc/invoke.texi (Add new pic option): Add new microblaze pic
14491 option for data text relative.
14492
14493 2018-04-30 Richard Biener <rguenther@suse.de>
14494
14495 * tree-chrec.h (evolution_function_is_constant_p): Remove
14496 redundant check.
14497 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14498
14499 2018-04-30 Richard Biener <rguenther@suse.de>
14500
14501 PR bootstrap/85571
14502 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14503
14504 2018-04-30 Richard Biener <rguenther@suse.de>
14505
14506 PR tree-optimization/28364
14507 PR tree-optimization/85275
14508 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14509 copying first exit test.
14510
14511 2018-04-28 Mark Wielaard <mark@klomp.org>
14512
14513 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14514 dwarf_version >= 5.
14515 (dwarf_AT): Handle DW_AT_addr_base.
14516 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14517
14518 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
14519
14520 PR target/84431
14521 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14522 (*ashl<dwi>3_doubleword_mask_1): Ditto.
14523 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14524 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14525
14526 2018-04-28 Richard Biener <rguenther@suse.de>
14527
14528 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14529 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14530 to reflect use. Only add interesting stmts.
14531
14532 2018-04-27 Martin Jambor <mjambor@suse.cz>
14533
14534 PR ipa/85549
14535 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14536 the jump function allows for passing through aggregate values.
14537
14538 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14539
14540 * input.h (in_system_header_at): Convert from macro to inline
14541 function.
14542 (from_macro_expansion_at): Likewise.
14543 (from_macro_definition_at): Likewise.
14544
14545 2018-04-27 Jeff Law <law@redhat.com>
14546
14547 * config.gcc: Mark tile* targets as deprecated/obsolete.
14548
14549 2018-04-27 Richard Biener <rguenther@suse.de>
14550
14551 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14552 fix for ILP32.
14553
14554 2018-04-27 Richard Biener <rguenther@suse.de>
14555
14556 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14557
14558 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14559
14560 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14561 with Yd constraint. Set "preferred_for_speed" attribute from
14562 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14563 with Yd constraint.
14564 (*movdi_internal): Ditto.
14565 (movti_interunit splitters): Remove
14566 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14567 (movdi_interunit splitters): Ditto.
14568 * config/i386/constraints.md (Ye): Remove.
14569 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14570
14571 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14572
14573 PR target/85512
14574 * config/aarch64/constraints.md (Usg): Limit to 31.
14575 (Usj): Limit to 63.
14576
14577 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14578
14579 PR tree-optimization/85529
14580 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14581 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14582 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14583 zero extension or masking of the MSB bit.
14584 (optimize_range_tests): Add FIRST_BB argument, pass it through
14585 to optimize_range_tests_var_bound.
14586 (maybe_optimize_range_tests, reassociate_bb): Adjust
14587 optimize_range_tests callers.
14588
14589 2018-04-26 Richard Biener <rguenther@suse.de>
14590 Jakub Jelinek <jakub@redhat.com>
14591
14592 * cgraph.h (symbol_table): Just declare debug method here.
14593 * symtab.c (symbol_table::debug): Define.
14594
14595 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14596
14597 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14598
14599 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14600
14601 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14602 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14603 (*movdi_internal): Substitute Yi and Yj constraint with x
14604 and Ym and Yn constraint with y constraint. Update "isa"
14605 attribute and set "preferred_for_speed" attribute from
14606 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14607 (*movsi_internal): Ditto.
14608 (*movdf_internal): Ditto.
14609 (*movsf_internal): Ditto.
14610 (*zero_extendsidi2): Ditto.
14611 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14612 (sse2_loadld): Ditto.
14613 (*vec_extract<ssevecmodelower>_0): Ditto.
14614 (*vec_extractv4si_0_zext_sse4): Ditto.
14615 (vec_concatv2di): Ditto.
14616 (*vec_dup<mode>): Ditto.
14617 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14618 * config/i386/constraints.md (Yi): Remove.
14619 (Yj): Remove.
14620 (Ym): Remove.
14621 (Yn): Remove.
14622
14623 2018-04-26 Nathan Sidwell <nathan@acm.org>
14624
14625 * dumpfile.c (dump_open): New.
14626 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14627 (dump_finish): Detect stdio/stderr by value not name.
14628
14629 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14630
14631 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14632
14633 2018-04-26 Tom de Vries <tom@codesourcery.com>
14634
14635 PR target/84952
14636 * config/nvptx/nvptx.c (verify_neutering_jumps)
14637 (verify_neutering_labels): New function
14638 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14639
14640 2018-04-26 Tom de Vries <tom@codesourcery.com>
14641
14642 PR target/84025
14643 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14644 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14645 need neutering.
14646
14647 2018-04-26 Richard Biener <rguenther@suse.de>
14648 Tom de Vries <tom@codesourcery.com>
14649
14650 PR lto/85422
14651 * lto-streamer-out.c (output_function): Fixup loops if required to match
14652 discovery done in the reader.
14653
14654 2018-04-26 Richard Biener <rguenther@suse.de>
14655
14656 PR tree-optimization/85116
14657 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14658 have a loop exit from the single latch predecessor. Remove
14659 case of header with just condition.
14660 (ch_base::copy_headers): Exclude infinite loops from any
14661 processing.
14662 (pass_ch::execute): Record exits.
14663
14664 2018-04-26 Richard Biener <rguenther@suse.de>
14665
14666 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14667 prologue cost vector and pass it to vect_get_load_cost.
14668 (vect_get_peeling_costs_all_drs): Likewise.
14669 (vect_peeling_hash_get_lowest_cost): Likewise.
14670 (vect_enhance_data_refs_alignment): Likewise.
14671
14672 2018-04-26 Richard Biener <rguenther@suse.de>
14673
14674 PR middle-end/85450
14675 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14676 checking of integer<->pointer conversions.
14677 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14678 sign-/zero-extending pointer types.
14679 (expand_omp_for_static_chunk): Likewise.
14680
14681 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14682 Jean Lee <xiaoyur347@gmail.com>
14683
14684 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14685 (TARGET_ASAN_SHADOW_OFFSET): Define.
14686 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14687 true for -fsanitize=address.
14688
14689 2018-04-25 Mark Wielaard <mark@klomp.org>
14690
14691 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14692 shorter ones.
14693
14694 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14695
14696 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14697 than "alu", remove explicit "memory" and "imm_disp" attributes.
14698 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14699
14700 PR middle-end/85414
14701 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14702 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14703 gen_lowpart_no_emit.
14704
14705 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14706
14707 PR target/85473
14708 * config/i386/i386.c (ix86_expand_builtin): Change memory
14709 operand to XI, extend p0 to Pmode.
14710 * config/i386/i386.md: Change unspec volatile and operand
14711 1 mode to XI, change operand 0 mode to P.
14712
14713 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14714
14715 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14716 GET_MODE_MASK before any checking.
14717 (nds32_can_use_bset_p): Likewise.
14718 (nds32_can_use_btgl_p): Likewise.
14719
14720 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14721
14722 * config/nds32/nds32-doubleword.md: New define_split pattern for
14723 illegal register number.
14724
14725 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14726
14727 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14728
14729 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14730
14731 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14732
14733 2018-04-25 Richard Biener <rguenther@suse.de>
14734
14735 * lto-streamer.h (LTO_major_version): Bump to 8.
14736
14737 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14738
14739 * BASE-VER: Set to 9.0.0.
14740
14741 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14742
14743 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14744 in __abskf2 and __powikf2.
14745
14746 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14747
14748 PR target/85512
14749 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14750 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14751 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14752 Use the above on operand 2. Reindent.
14753 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14754
14755 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14756
14757 PR target/85485
14758 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14759 handle OPT_mcet.
14760 * config/i386/i386.opt (mcet): Removed.
14761 * doc/install.texi: Remove -mcet documentation.
14762 * doc/invoke.texi: Likewise.
14763
14764 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14765
14766 PR target/85485
14767 * doc/install.texi: Remove -mcet from bootstrap-cet.
14768
14769 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14770
14771 PR target/85511
14772 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14773 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14774 if TARGET_64BIT.
14775
14776 PR target/85503
14777 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14778 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14779 containing a CONST_VECTOR.
14780
14781 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14782
14783 * doc/install.texi: Update newlib dependency for nvptx.
14784
14785 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14786
14787 PR target/85508
14788 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14789 instead of INTVAL when shifting x left.
14790
14791 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14792
14793 PR tree-optimization/85478
14794 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14795 vect_grouped_store_supported for single element vectors.
14796
14797 2018-04-24 Richard Biener <rguenther@suse.de>
14798
14799 PR target/85491
14800 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14801 load cost increase to the case of non-constant step.
14802
14803 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14804
14805 PR target/84828
14806 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14807 destination if any_malformed_asm.
14808
14809 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14810
14811 PR middle-end/85496
14812 * expr.c (store_field): In the bitfield case, if the value comes from
14813 a function call and is returned in registers by means of a PARALLEL,
14814 do not change the mode of the temporary unless BLKmode and VOIDmode.
14815
14816 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14817
14818 PR rtl-optimization/85423
14819 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14820 dependencies to debug insns when the previous insn is non-debug.
14821
14822 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14823
14824 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14825 enums into a single definition.
14826 (fls): Fix predicates and printing.
14827 (seti): Likewise.
14828
14829 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14830
14831 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14832 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14833 and short u6 immediate.
14834 (check_if_valid_sleep_operand): Remove.
14835 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14836
14837 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14838
14839 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14840 flag_always_save_lp condition.
14841 * config/nds32/nds32.opt (malways-save-lp): New option.
14842
14843 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14844
14845 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14846 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14847 * config/nds32/nds32.h
14848 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14849 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14850
14851 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14852
14853 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14854 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14855
14856 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14857 Chung-Ju Wu <jasonwucj@gmail.com>
14858
14859 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14860 Declare.
14861 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14862 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14863
14864 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14865
14866 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14867
14868 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14869
14870 * config/nds32/nds32-protos.h (nds32_data_alignment,
14871 nds32_local_alignment): Declare.
14872 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14873 nds32_local_alignment): New functions.
14874 (TARGET_CONSTANT_ALIGNMENT): Define.
14875 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14876
14877 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14878
14879 * config/nds32/nds32.c
14880 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14881 (TARGET_MODES_TIEABLE_P): Likewise.
14882
14883 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14884
14885 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14886 level Ofast and Og.
14887
14888 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14889 Chung-Ju Wu <jasonwucj@gmail.com>
14890
14891 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14892 for unaligned access.
14893 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14894 unaligned access.
14895 * config/nds32/nds32-intrinsic.md: Likewise.
14896 * config/nds32/nds32_intrinsic.h: Likewise.
14897 * config/nds32/nds32.h (nds32_builtins): Likewise.
14898 * config/nds32/nds32.opt (munaligned-access): New option.
14899 * config/nds32/nds32.c (nds32_asm_file_start): Display
14900 flag_unaligned_access status.
14901
14902 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14903
14904 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14905 -mno-relax is present.
14906 * config/riscv/linux.h (LINK_SPEC): Ditto.
14907
14908 2018-04-20 Martin Sebor <msebor@redhat.com>
14909
14910 PR c/85365
14911 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14912 for null pointers.
14913 (gimple_fold_builtin_stxcpy_chk): Same.
14914 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14915
14916 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14917
14918 PR target/85456
14919 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14920 __powikf2 when long double is IEEE 128-bit.
14921
14922 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14923
14924 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14925 step to make sure stack always aligned.
14926
14927 2018-04-20 Carl Love <cel@us.ibm.com>
14928
14929 PR target/83402
14930 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14931 size check for arg0.
14932
14933 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14934 Tom de Vries <tom@codesourcery.com>
14935
14936 PR target/85445
14937 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14938 Emit insns for calls too.
14939 (nvptx_find_par): Always look for worker-level predecessor insn.
14940 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14941 calls.
14942 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14943 (nvptx_process_pars): Propagate frames for calls.
14944
14945 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14946
14947 PR target/85469
14948 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14949 Removed.
14950 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14951 (ix86_handle_option): Don't handle OPT_mibt.
14952 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14953 __SHSTK__.
14954 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14955 has_ibt and ibt.
14956 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14957 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14958 (ix86_target_macros): Define __CET__ with flag_cf_protection
14959 for -fcf-protection.
14960 * config/i386/i386.c (isa2_opts): Remove -mibt.
14961 * config/i386/i386.h (TARGET_IBT): Removed.
14962 (TARGET_IBT_P): Likewise.
14963 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14964 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14965 * config/i386/i386.opt (mcet): Update help message.
14966 (mshstk): Likewise.
14967 (mibt): Removed.
14968 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14969 -mcet as an alias for -mshstk.
14970
14971 2018-04-20 Richard Biener <rguenther@suse.de>
14972
14973 PR middle-end/85475
14974 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14975 complexity by forcing a single use of the multiply operand.
14976
14977 2018-04-20 Martin Jambor <mjambor@suse.cz>
14978
14979 ipa/85449
14980 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14981 recursion dependency to only apply to non-clones.
14982
14983 2018-04-20 Martin Jambor <mjambor@suse.cz>
14984
14985 ipa/85447
14986 * ipa-cp.c (create_specialized_node): Check that clones of
14987 self-recursive edges exist during IPA-CP.
14988
14989 2018-04-19 Toon Moene <toon@moene.org>
14990
14991 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14992 by -O3.
14993
14994 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14995
14996 PR tree-optimization/85467
14997 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14998 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14999 VECTOR_CST element to type.
15000
15001 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15002
15003 PR target/85397
15004 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
15005 * config/i386/i386.md (builtin_setjmp_setup): Removed.
15006 (builtin_longjmp): Likewise.
15007 (save_stack_nonlocal): New pattern.
15008 (restore_stack_nonlocal): Likewise.
15009
15010 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15011
15012 PR target/85404
15013 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15014 Replace ASM_OUTPUT_LABEL with fprintf.
15015
15016 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15017
15018 PR target/85417
15019 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15020 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
15021 * config/i386/i386-c.c (ix86_target_macros_internal): Also
15022 define __IBT__ and __SHSTK__ for -fcf-protection.
15023 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
15024 TARGET_IBT.
15025 (ix86_trampoline_init): Likewise.
15026 (x86_output_mi_thunk): Likewise.
15027 (ix86_notrack_prefixed_insn_p): Likewise.
15028 (ix86_option_override_internal): Don't disallow -fcf-protection.
15029 * config/i386/i386.md (rdssp<mode>): Also enable for
15030 -fcf-protection.
15031 (incssp<mode>): Likewise.
15032 (nop_endbr): Likewise.
15033 * config/i386/i386.opt (mcet): Change help message to built-in
15034 functions only.
15035 (mibt): Likewise.
15036 (mshstk): Likewise.
15037 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
15038 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
15039 enable CET built-in functions.
15040
15041 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
15042
15043 * common/config/i386/i386-common.c
15044 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
15045 OPTION_MASK_ISA_MOVDIRI_UNSET,
15046 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
15047 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
15048 * config.gcc (movdirintrin.h): New header.
15049 * config/i386/cpuid.h (bit_MOVDIRI,
15050 bit_MOVDIR64B): New bits.
15051 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
15052 and -mmvodir64b.
15053 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
15054 (VOID, PVOID, PCVOID)): New function types.
15055 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
15056 __builtin_ia32_directstoreu_u64,
15057 __builtin_ia32_movdir64b): New builtins.
15058 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
15059 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
15060 and -mmovdiri.
15061 (ix86_valid_target_attribute_inner_p): Ditto.
15062 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
15063 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
15064 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
15065 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
15066 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
15067 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
15068 (movdiri<mode>, movdir64b_<mode>): New.
15069 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
15070 * config/i386/immintrin.h: Include movdirintrin.h.
15071 * config/i386/movdirintrin.h: New file.
15072 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
15073
15074 2018-04-19 Richard Biener <rguenther@suse.de>
15075
15076 PR middle-end/85455
15077 * cfg.c (clear_bb_flags): When loop state says we have
15078 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
15079
15080 2018-04-19 Richard Biener <rguenther@suse.de>
15081
15082 PR tree-optimization/84737
15083 * tree-vect-data-refs.c (vect_copy_ref_info): New function
15084 copying restrict info.
15085 (vect_setup_realignment): Use it.
15086 * tree-vectorizer.h (vect_copy_ref_info): Declare.
15087 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
15088 the first DR to all generated stores.
15089 (vectorizable_load): Likewise for loads.
15090
15091 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15092
15093 PR tree-optimization/85446
15094 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
15095 the integral and pointer types to have the same precision.
15096
15097 * doc/install.texi: Document --disable-cet being the default and
15098 --enable-cet=auto.
15099
15100 2018-04-18 Martin Liska <mliska@suse.cz>
15101
15102 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
15103 style.
15104
15105 2018-04-18 Martin Liska <mliska@suse.cz>
15106
15107 Revert
15108 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15109
15110 PR ipa/83983
15111 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15112 arguments if they are comparable.
15113
15114 2018-04-18 Martin Liska <mliska@suse.cz>
15115
15116 Revert
15117 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15118
15119 PR lto/84805
15120 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15121 incomplete types.
15122
15123 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
15124
15125 PR target/85388
15126 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
15127 ENDBR after calling __morestack.
15128
15129 2018-04-18 David Malcolm <dmalcolm@redhat.com>
15130
15131 PR jit/85384
15132 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
15133 by using gcc_base_ver to generate a gcc_driver_version, and use
15134 it when generating GCC_DRIVER_NAME.
15135 * configure: Regenerate.
15136
15137 2018-04-18 Jakub Jelinek <jakub@redhat.com>
15138
15139 PR target/81084
15140 * config.gcc: Obsolete powerpc*-*-*spe*.
15141
15142 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15143
15144 PR debug/84637
15145 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
15146 (stabstr_D): Change type of unum from unsigned int to
15147 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
15148 type.
15149
15150 2018-04-17 Jim Wilson <jimw@sifive.com>
15151
15152 PR 84856
15153 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
15154 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
15155 Set arg_pointer_offset after using pretend_args_size.
15156
15157 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15158
15159 PR rtl-optimization/85431
15160 * dse.c (record_store): Ignore zero width stores.
15161
15162 PR sanitizer/85230
15163 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
15164 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
15165 __builtin_stack_restore rather than after it.
15166 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
15167 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
15168 argument instead of virtual_dynamic_stack_rtx.
15169
15170 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
15171
15172 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
15173 New prototype.
15174 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15175 Add note to error message to explain internal mapping of overloaded
15176 built-in function name to non-overloaded built-in function name.
15177 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
15178 function.
15179
15180 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15181
15182 PR target/85424
15183 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
15184 where the inputs overlap with the output.
15185
15186 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15187
15188 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
15189 (=v, v) alternative and explicit "memory" attribute.
15190 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
15191 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15192 attributes.
15193 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
15194 "sselog1" type instead of "sselog".
15195 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
15196 "sselog". Remove explicit "memory" attribute.
15197 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
15198 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15199 attributes.
15200 (vec_extract_hi_v32hi): Merge all alternatives into one, use
15201 "sselog1" type instead of "sselog". Remove explicit "memory"
15202 attribute.
15203 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
15204 use "sselog1" type instead of "sselog". Remove explicit "memory"
15205 attribute.
15206 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
15207 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15208 attributes.
15209 (vec_extract_hi_v64qi): Merge all alternatives into one, use
15210 "sselog1" type instead of "sselog". Remove explicit "memory"
15211 attribute.
15212 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
15213 use "sselog1" type instead of "sselog". Remove explicit "memory"
15214 attribute.
15215
15216 PR target/85430
15217 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
15218
15219 PR middle-end/85414
15220 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
15221 on a SUBREG.
15222
15223 2018-04-17 Martin Jambor <mjambor@suse.cz>
15224
15225 PR ipa/85421
15226 * ipa-cp.c (create_specialized_node): Call
15227 expand_all_artificial_thunks if necessary.
15228
15229 2018-04-17 Martin Liska <mliska@suse.cz>
15230
15231 PR lto/85405
15232 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
15233 in message, remote space in between '_G' and '('.
15234
15235 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15236
15237 PR target/85281
15238 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
15239 avx512f_vmcmp<mode>3<round_saeonly_name>,
15240 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
15241 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
15242 avx512f_rndscale<mode><round_saeonly_name>,
15243 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
15244 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
15245 Use %<iptr>2 instead of %2 for -masm=intel.
15246 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
15247 avx512f_vcvttss2usi<round_saeonly_name>,
15248 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
15249 -masm=intel.
15250 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
15251 avx512f_vcvttsd2usi<round_saeonly_name>,
15252 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
15253 Use %q1 instead of %1 for -masm=intel.
15254 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
15255 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
15256 of %3 for -masm=intel.
15257 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
15258 -masm=intel.
15259 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
15260 -masm=intel.
15261 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
15262 -masm=intel.
15263 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
15264 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
15265 %g1.
15266 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
15267 -masm=intel.
15268 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
15269 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
15270 %g1 and one with %0 and %1.
15271 (avx512er_vmrcp28<mode><round_saeonly_name>,
15272 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
15273 %1 for -masm=intel.
15274 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
15275 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
15276 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
15277 of %0 and %{%4%} for -masm=intel.
15278 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
15279 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
15280 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
15281 order of %0 and %{%5%}%{z%} for -masm=intel.
15282
15283 2018-04-17 Jan Hubicka <jh@suse.cz>
15284
15285 PR lto/85405
15286 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
15287
15288 2018-04-17 Martin Liska <mliska@suse.cz>
15289
15290 PR ipa/85329
15291 * multiple_target.c (create_dispatcher_calls): Set apostrophes
15292 for target_clone error message. Make default implementation
15293 clone to be a local declaration.
15294 (separate_attrs): Add new argument and check for an empty
15295 string.
15296 (expand_target_clones): Handle it.
15297 (ipa_target_clone): Make redirection just for target_clones
15298 functions.
15299
15300 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
15301 Tom de Vries <tom@codesourcery.com>
15302
15303 PR middle-end/84955
15304 * omp-expand.c (expand_oacc_for): Add dummy false branch for
15305 tiled basic blocks without omp continue statements.
15306
15307 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
15308
15309 PR target/83660
15310 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
15311 vec_extract expression as having side effects to make sure it gets
15312 a cleanup point.
15313
15314 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
15315
15316 PR target/85403
15317 * config/i386/i386.c (get_builtin_code_for_version): Check
15318 error_mark_node.
15319
15320 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
15321
15322 PR target/84331
15323 * config.gcc: Support "skylake".
15324 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15325 PROCESSOR_SKYLAKE.
15326 * config/i386/i386.c (m_SKYLAKE): Define.
15327 (processor_target_table): Add "skylake".
15328 (ix86_option_override_internal): Add "skylake".
15329 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
15330 PROCESSOR_CANNONLAKE.
15331 (get_builtin_code_for_version): Fix priority for
15332 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15333 PROCESSOR_SKYLAKE-AVX512.
15334 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15335 (processor_type): Add PROCESSOR_SKYLAKE.
15336
15337 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
15338 Jason Merrill <jason@redhat.com>
15339
15340 PR c++/85112
15341 * convert.c (convert_to_integer_1): Use direct recursion for
15342 enumeral types and types with a precision less than the number
15343 of bits in their mode.
15344
15345 2018-04-16 Julia Koval <julia.koval@intel.com>
15346
15347 PR target/84413
15348 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15349 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15350
15351 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
15352
15353 PR target/85293
15354 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15355 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15356 and -mno-direct-move.
15357
15358 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
15359
15360 PR target/83402
15361 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15362 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15363 Ensure negative shifts result in {0}.
15364
15365 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
15366
15367 PR rtl-optimization/79916
15368 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15369 regs (if any) to define how to gnerate SD moves when LRA is in
15370 progress.
15371
15372 2018-04-13 Jakub Jelinek <jakub@redhat.com>
15373
15374 PR rtl-optimization/85393
15375 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15376 * except.c (expand_dw2_landing_pad_for_region): Make static.
15377 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15378 a label and unconditional jump to old_bb, rather than
15379 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15380 basic block.
15381
15382 PR rtl-optimization/85376
15383 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15384 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15385 instead of a specific value.
15386
15387 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15388 Bin Cheng <bin.cheng@arm.com>
15389
15390 PR tree-optimization/82965
15391 PR tree-optimization/83991
15392 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15393 by_profile_only parameter.
15394 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15395 information if the loop was predicted to iterate too many times.
15396 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15397
15398 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15399
15400 PR lto/71991
15401 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15402 always inline.
15403
15404 2018-04-13 Martin Liska <mliska@suse.cz>
15405 Jakub Jelinek <jakub@redhat.com>
15406
15407 PR middle-end/81657
15408 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15409 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15410 * builtins.c (expand_builtin_memory_copy_args): Use
15411 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15412 handle dest_addr == pc_rtx.
15413
15414 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
15415
15416 PR target/85291
15417 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15418 asked to not generate direct moves.
15419 (fix_trunc<mode>si2_stfiwx): Similar.
15420 (fix_trunc<mode>si2_internal): Similar.
15421
15422 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15423
15424 PR debug/83157
15425 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15426 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15427 lookup if dest in some wider mode is known to be const0_rtx and
15428 if so, record permanent equivalence for it to be ZERO_EXTEND of
15429 the narrower mode destination.
15430
15431 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15432
15433 * lto-streamer-out.c (output_function): Revert 259346.
15434 * omp-expand.c (expand_oacc_for): Likewise.
15435
15436 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
15437
15438 PR rtl-optimization/85354
15439 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15440 * sel-sched.c (sel_global_init): ... here.
15441
15442 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
15443
15444 PR target/85238
15445 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15446 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15447 mode for PE-COFF targets.
15448 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15449 (i386_pe_asm_lto_end): Likewise.
15450 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15451 (TARGET_ASM_LTO_END): Likewise.
15452 * config/i386/winnt.c (saved_debug_info_level): New static variable.
15453 (i386_pe_asm_lto_start): New function.
15454 (i386_pe_asm_lto_end): Likewise.
15455
15456 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15457 Richard Biener <rguenther@suse.de>
15458
15459 PR middle-end/84955
15460 * lto-streamer-out.c (output_function): Fix CFG loop state before
15461 streaming out.
15462 * omp-expand.c (expand_oacc_for): Handle calls to internal
15463 functions like regular functions.
15464
15465 2018-04-12 Richard Biener <rguenther@suse.de>
15466
15467 PR lto/85371
15468 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15469 for the early LTO debug to properly generate references to it
15470 during DIE emission. Do not re-use that for the skeleton for
15471 split-dwarf.
15472 (dwarf2out_early_finish): Likewise.
15473
15474 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15475
15476 PR target/85328
15477 * config/i386/sse.md
15478 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15479 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15480 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15481 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15482 and output is a reg, avoid creating invalid lowpart subreg, but
15483 instead split into a 512-bit move. Don't split if not AVX512VL,
15484 input is xmm16+ reg and output is a mem.
15485 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15486 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15487 xmm16+ reg and output is a mem.
15488
15489 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15490
15491 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15492 also for flag_dwarf2_cfi_asm.
15493
15494 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15495
15496 PR rtl-optimization/85342
15497 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15498 a bool scalar var inside of the loop instead. Don't try to update
15499 recog_data.operand after failed apply_change_group.
15500
15501 2018-04-12 Tom de Vries <tom@codesourcery.com>
15502
15503 PR target/85296
15504 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15505 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
15506 array with flexible array member as array without given dimension.
15507 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15508 argument for undefined param to true.
15509
15510 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
15511
15512 PR target/85321
15513 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15514 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15515 from PowerPC section.
15516 * config/rs6000/sysv4.opt (mcall-): Improve help text.
15517 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15518 help text that is too long.
15519 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15520 help text that is too long.
15521 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15522 help text that is too long.
15523
15524 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
15525
15526 * config/alpha/alpha.md (stack_probe_internal): Rename
15527 from "probe_stack". Update all callers.
15528
15529 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15530
15531 PR rtl-optimization/84566
15532 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15533 sched_macro_fuse_insns.
15534
15535 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15536
15537 PR target/84301
15538 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15539 (compute_block_dependences): ... from here.
15540
15541 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15542
15543 PR tree-optimization/85331
15544 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15545 from int to HOST_WIDE_INT.
15546
15547 2018-04-11 Martin Jambor <mjambor@suse.cz>
15548
15549 PR ipa/84149
15550 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15551 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15552 not the same as the source val.
15553 (cgraph_edge_brings_value_p): New parameter.
15554 (gather_edges_for_value): Pass destination value to
15555 cgraph_edge_brings_value_p.
15556 (perhaps_add_new_callers): Likewise.
15557 (get_info_about_necessary_edges): Likewise and exclude values brought
15558 only by self-recursive edges.
15559 (create_specialized_node): Redirect only clones of self-calling edges.
15560 (+self_recursive_pass_through_p): New function.
15561 (find_more_scalar_values_for_callers_subset): Use it.
15562 (find_aggregate_values_for_callers_subset): Likewise.
15563 (known_aggs_to_agg_replacement_list): Removed.
15564 (decide_whether_version_node): Re-calculate known constants for all
15565 remaining context clones.
15566
15567 2018-04-11 Richard Biener <rguenther@suse.de>
15568
15569 PR lto/85339
15570 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15571 from early DWARF output.
15572 (dwarf2out_early_finish): Output line info unconditionally into
15573 early DWARF and add reference to it.
15574
15575 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15576
15577 PR target/85281
15578 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15579 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15580 other than V2DFmode using iptr mode attribute.
15581 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15582
15583 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15584
15585 PR rtl-optimization/84659
15586 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15587
15588 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15589
15590 PR debug/85302
15591 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15592 SIZEP is NULL.
15593 (output_loc_list): Pass address of a dummy size variable even in the
15594 locview handling loop.
15595 (index_location_lists): Add comment on why skip_loc_list_entry can't
15596 call size_of_locs.
15597
15598 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15599
15600 PR target/85261
15601 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15602 into register.
15603
15604 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15605
15606 PR target/85321
15607 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15608 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15609 and -mstring-compare-inline-limit.
15610
15611 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15612
15613 PR target/85287
15614 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15615 for stack clash protection in a register whenever we need it to be in
15616 a register.
15617
15618 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15619
15620 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15621 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15622
15623 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15624
15625 PR target/85321
15626 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15627 the help text.
15628 (mlong-double-): Ditto.
15629 * config/rs6000/sysv4.opt (msdata=): Ditto.
15630 (mtls-size=): Ditto.
15631
15632 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15633
15634 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15635 erroneous entries for
15636 "vector int vec_ldl (int, long int *)", and
15637 "vector unsigned int vec_ldl (int, unsigned long int *)".
15638 Add comments and entries for
15639 "vector bool char vec_ldl (int, bool char *)",
15640 "vector bool short vec_ldl (int, bool short *)",
15641 "vector bool int vec_ldl (int, bool int *)",
15642 "vector bool long long vec_ldl (int, bool long long *)",
15643 "vector pixel vec_ldl (int, pixel *)",
15644 "vector long long vec_ldl (int, long long *)",
15645 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15646 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15647 type tree bool_long_long_type_node and correct definition of
15648 bool_V2DI_type_node to make reference to this new type tree.
15649 (rs6000_mangle_type): Replace erroneous reference to
15650 bool_long_type_node with bool_long_long_type_node.
15651 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15652 comments to emphasize sign distinctions for char and int types and
15653 replace RS6000_BTI_bool_long constant with
15654 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15655 use of RS6000_BTI_pixel.
15656 (bool_long_type_node): Remove this macro definition.
15657 (bool_long_long_type_node): New macro definition
15658
15659 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15660
15661 PR rtl-optimization/85300
15662 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15663 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15664 simplify_unary_operation fails.
15665
15666 2018-04-10 Martin Liska <mliska@suse.cz>
15667
15668 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15669 cgraph_edge and ipa_ref.
15670
15671 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15672
15673 PR target/85177
15674 PR target/85255
15675 * config/i386/sse.md
15676 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15677 computation of the VEC_MERGE selector from mask.
15678 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15679 Fix decoding of the VEC_MERGE selector into mask.
15680
15681 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15682
15683 PR tree-optimization/85286
15684 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15685
15686 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15687
15688 * final.c (final_1): Set insn_last_address as well as
15689 insn_current_address.
15690
15691 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15692
15693 PR target/85173
15694 * explow.c (emit_stack_probe): Call validize_mem on memory location
15695 before passing it to gen_probe_stack. Create address operand and
15696 legitimize it for the probe_stack_address case.
15697
15698 2018-04-09 Jan Hubicka <jh@suse.cz>
15699
15700 PR lto/85078
15701 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15702 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15703 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15704 walk basetypes.
15705 (free_lang_data): Rebuild type inheritance graph.
15706
15707 2018-04-09 Martin Sebor <msebor@redhat.com>
15708
15709 * invoke.texi (-finline-small-functions): Mention other optimization
15710 options.
15711 (-findirect-inlining, -fpartial-inlining): Same.
15712 (-finline-functions-called-once): Same.
15713 (-freorder-blocks-and-partition): Same.
15714
15715 2018-04-09 Jan Hubicka <jh@suse.cz>
15716
15717 PR rtl/84058
15718 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15719 jumps; choose last target that matches the criteria (i.e.
15720 no partition changes for non-crossing jumps).
15721 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15722 support for redirecting crossing jumps to non-crossing.
15723
15724 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15725
15726 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15727 also for naked functions.
15728
15729 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15730
15731 * config/arc/arc.md (add_shift): New pattern.
15732 (add_shift2): Likewise.
15733 (sub_shift): Likewise.
15734 (sub_shift_cmp0_noout): Likewise.
15735 (compare_si_ashiftsi): Likewise.
15736 (xbfu_cmp0_noout): New combine pattern.
15737 (xbfu_cmp0"): Likewise.
15738 (movsi_set_cc_insn): Place the predicable variant first.
15739 (commutative_binary_cmp0_noout): Remove clobber.
15740 (commutative_binary_cmp0): New pattern.
15741 (noncommutative_binary_cmp0): Likewise.
15742 (noncommutative_binary_cmp0_noout): Likewise.
15743 (noncommutative_binary_comparison_result_used): Removed.
15744 (rsub_cmp0): New pattern.
15745 (rsub_cmp0_noout): Likewise.
15746 (extzvsi): Changed, keep only meaningful variants.
15747 (SQH, SEZ): New iterators.
15748 (SQH_postfix): New mode attribute.
15749 (SEZ_prefix): New code attribute.
15750 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15751 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15752 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15753 of numerical value.
15754 (noncommutative_operator): Check the availability of barrel
15755 shifter option.
15756
15757 2018-04-09 Richard Biener <rguenther@suse.de>
15758
15759 PR tree-optimization/85284
15760 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15761 Only use the niter constraining form of simple_iv when the exit
15762 is always executed.
15763
15764 2018-04-09 Tom de Vries <tom@codesourcery.com>
15765
15766 PR target/84041
15767 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15768 (define_expand "*memory_barrier"): New define_expand.
15769 (define_insn "memory_barrier"): New insn.
15770
15771 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15772
15773 PR rtl-optimization/80463
15774 PR rtl-optimization/83972
15775 PR rtl-optimization/83480
15776
15777 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15778 correct producer for the insn.
15779 (tidy_control_flow): Fixup seqnos in case of debug insns.
15780
15781 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15782
15783 PR rtl-optimization/83913
15784
15785 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15786 different sched-times when merging exprs.
15787
15788 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15789
15790 PR rtl-optimization/83962
15791
15792 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15793 tidy_fallthru_edge and tidy_control_flow.
15794
15795 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15796
15797 PR rtl-optimization/83530
15798
15799 * sel-sched.c (force_next_insn): New global variable.
15800 (remove_insn_for_debug): When force_next_insn is true, also leave only
15801 next insn in the ready list.
15802 (sel_sched_region): When the region wasn't scheduled, make another pass
15803 over it with force_next_insn set to 1.
15804
15805 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15806
15807 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15808 into tm_file.
15809 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15810 for interrupt control.
15811 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15812 functions for interrupt control.
15813 * config/nds32/nds32-intrinsic.md: Likewise.
15814 * config/nds32/nds32_intrinsic.h: Likewise.
15815 * config/nds32/nds32.h (nds32_builtins): Likewise.
15816
15817 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15818
15819 * config/nds32/nds32.c (nds32_init_machine_status,
15820 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15821 strict_aligned_p field.
15822 (nds32_expand_to_rtl_hook): New function.
15823 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15824 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15825
15826 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15827 Chung-Ju Wu <jasonwucj@gmail.com>
15828
15829 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15830 * config/nds32/nds32-n7.md: New file.
15831 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15832 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15833 pipeline.
15834 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15835 * config/nds32/nds32.md (pipeline_model): Add n7.
15836 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15837 * config/nds32/pipelines.md: Include n7 settings.
15838
15839 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15840 Chung-Ju Wu <jasonwucj@gmail.com>
15841
15842 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15843 * config/nds32/nds32-e8.md: New file.
15844 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15845 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15846 pipeline.
15847 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15848 * config/nds32/nds32.md (pipeline_model): Add e8.
15849 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15850 * config/nds32/pipelines.md: Include e8 settings.
15851
15852 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15853 Chung-Ju Wu <jasonwucj@gmail.com>
15854
15855 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15856 * config/nds32/nds32-n8.md: New file.
15857 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15858 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15859 pipeline.
15860 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15861 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15862 * config/nds32/nds32.md (pipeline_model): Add n8.
15863 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15864 * config/nds32/pipelines.md: Include n8 settings.
15865
15866 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15867 Chung-Ju Wu <jasonwucj@gmail.com>
15868
15869 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15870 * config/nds32/nds32-n9-2r1w.md: New file.
15871 * config/nds32/nds32-n9-3r2w.md: New file.
15872 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15873 nds32_register_ports): New or modify for cpu n9.
15874 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15875 pipeline.
15876 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15877 * config/nds32/nds32-utils.c: New file.
15878 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15879 TARGET_MUL_SLOW): Define.
15880 * config/nds32/nds32.md (pipeline_model): New attribute.
15881 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15882 New options that support cpu n9.
15883 * config/nds32/pipelines.md: Include n9 settings.
15884 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15885
15886 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15887
15888 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15889 information if necessary.
15890 (output_cond_branch_compare_zero): Likewise.
15891 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15892 (nds32_target_alignment): Refine for alignment.
15893 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15894 (FUNCTION_BOUNDARY): Modify.
15895 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15896 align case.
15897 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15898
15899 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15900
15901 * config/nds32/constants.md (unspec_volatile_element): Add values for
15902 TLB operation and data prefetch.
15903 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15904 functions for TLB operation and data prefetch.
15905 * config/nds32/nds32-intrinsic.md: Likewise.
15906 * config/nds32/nds32_intrinsic.h: Likewise.
15907 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15908 (nds32_print_operand): Likewise.
15909 * config/nds32/nds32.h (nds32_builtins): Likewise.
15910
15911 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15912 Andrew Pinski <pinsika@gcc.gnu.org>
15913
15914 PR middle-end/82976
15915 * match.pd: Use constant_boolean_node of correct type instead of
15916 boolean_true_node or boolean_false_node for simplifying
15917 pointer comparisons to zero.
15918
15919 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15920
15921 PR tree-optimization/80021
15922 * tree.c (verify_type_variant): Make error call in verify_variant_match
15923 translatable and remove final full stop.
15924
15925 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15926
15927 * config/nds32/constants.md (unspec_volatile_element): Add
15928 UNSPEC_VOLATILE_EH_RETURN.
15929 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15930 nds32_output_stack_pop): Support dwarf exception handling process.
15931 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15932 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15933 exception handling process.
15934 (nds32_compute_stack_frame): Likewise.
15935 (nds32_return_addr_rtx): Likewise.
15936 (nds32_initial_elimination_offset): Likewise.
15937 (nds32_expand_prologue): Likewise.
15938 (nds32_expand_epilogue): Likewise.
15939 (nds32_dynamic_chain_address): New function.
15940 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15941 exception handling.
15942 (DYNAMIC_CHAIN_ADDRESS): Define.
15943 (EH_RETURN_DATA_REGNO): Define.
15944 (EH_RETURN_STACKADJ_RTX): Define.
15945 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15946 patterns for dwarf exception handling.
15947
15948 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15949
15950 * config/nds32/nds32.h: Clean up obsolete macros.
15951
15952 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15953
15954 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15955 Add enum values for particular instructions.
15956 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15957 particular intrinsic functions.
15958 * config/nds32/nds32-intrinsic.md: Likewise.
15959 * config/nds32/nds32_intrinsic.h: Likewise.
15960 * config/nds32/nds32.h (nds32_builtins): Likewise.
15961 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15962 (btst, ave): New patterns for particular instructions.
15963
15964 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15965
15966 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15967 Add enum values for atomic load/store and memory sync.
15968 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15969 and memory sync.
15970 * config/nds32/nds32-intrinsic.md: Likewise.
15971 * config/nds32/nds32_intrinsic.h: Likewise.
15972 * config/nds32/nds32.h (nds32_builtins): Likewise.
15973
15974 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15975
15976 PR tree-optimization/85257
15977 * fold-const.c (native_encode_vector): If not all elts could fit
15978 and off is -1, return 0 rather than offset.
15979 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15980 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15981 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15982 adjust buffer in native_interpret_expr call.
15983
15984 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15985
15986 * config/nds32/constants.md (unspec_volatile_element): Add cache
15987 control enum values.
15988 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15989 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15990 * config/nds32/nds32.c (nds32_cctl_names): New.
15991 (nds32_print_operand): Handle cache control register names.
15992 * config/nds32/nds32.h (nds32_builtins): New enum values.
15993 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15994 macros.
15995 * config/nds32/nds32.md (type): Add mmu.
15996 * config/nds32/pipelines.md (simple_insn): Add mmu.
15997
15998 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15999
16000 * config/nds32/nds32.md (type): Remove call.
16001 * config/nds32/pipelines.md (simple_insn): Likewise.
16002
16003 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16004
16005 * config/nds32/constants.md (unspec_volatile_element): Add
16006 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
16007 UNSPEC_VOLATILE_FMFCFG.
16008 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
16009 description for fmfcfg and fmfcsr.
16010 (bdesc_1arg): Add fmtcsr.
16011 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
16012 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
16013 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
16014 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
16015 unspec_fmfcfg): New patterns.
16016 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
16017 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
16018 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
16019 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
16020 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
16021 __nds32__fmfcfg): Define.
16022
16023 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16024
16025 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
16026 intrinsic register names.
16027 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
16028 intrinsic register enum values and macros.
16029
16030 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16031
16032 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
16033 for load/store addressing form.
16034 (nds32_print_operand_address): Likewise.
16035
16036 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
16037
16038 PR target/85196
16039 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
16040 based on LABEL_REF. Remove useless assertion.
16041 (pic_address_needs_scratch): Fix formatting.
16042 (sparc_legitimize_pic_address): Minor tweaks.
16043 (sparc_delegitimize_address): Adjust assertion accordingly.
16044 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
16045 into symbolic_operand.
16046 (movsi_high_pic_label_ref): Likewise.
16047 (movsi_lo_sum_pic_label_ref): Likewise.
16048 (movdi_pic_label_ref): Likewise.
16049 (movdi_high_pic_label_ref): Likewise.
16050 (movdi_lo_sum_pic_label_ref): Likewise.
16051
16052 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
16053
16054 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
16055 custom LIB_SPEC setup.
16056
16057 2018-04-06 Ruslan Bukin <br@bsdpad.com>
16058 Kito Cheng <kito.cheng@gmail.com>
16059
16060 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
16061 * config/riscv/freebsd.h: New.
16062
16063 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16064
16065 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
16066 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
16067 file.
16068
16069 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16070 Kito Cheng <kito.cheng@gmail.com>
16071
16072 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
16073 nds32_output_call, nds32_symbol_binds_local_p): New functions.
16074 * config/nds32/nds32-protos.h (nds32_output_call,
16075 nds32_output_return): Declare.
16076 * config/nds32/nds32.md: Refine all the call and return patterns.
16077
16078 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16079
16080 PR debug/85252
16081 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
16082 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
16083
16084 PR rtl-optimization/84872
16085 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
16086 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
16087 EDGE_CROSSING edge.
16088
16089 2018-04-06 Tamar Christina <tamar.christina@arm.com>
16090
16091 * expr.c (copy_blkmode_to_reg): Revert 254862.
16092 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
16093
16094 2018-04-06 Richard Biener <rguenther@suse.de>
16095
16096 PR middle-end/85244
16097 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
16098 after seeing a component reference with an adjacent field. Treat
16099 refs to arrays at struct end of external decls similar to
16100 refs to unconstrained commons.
16101
16102 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16103
16104 PR sanitizer/85213
16105 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
16106 look through SAVE_EXPRs with non-side-effects argument. Adjust
16107 recursive calls.
16108 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
16109 save_p here.
16110
16111 2018-04-06 Richard Biener <rguenther@suse.de>
16112
16113 PR middle-end/85180
16114 * alias.c (find_base_term): New wrapper around find_base_term
16115 unwinding CSELIB_VAL_PTR changes.
16116 (find_base_term): Do not restore CSELIB_VAL_PTR during the
16117 recursion.
16118
16119 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16120
16121 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
16122 instructions.
16123 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
16124 constant definitions.
16125 ("nop"): lr 0,0 -> nopr r0
16126 ("nop_lr0", "nop_lr1"): New insn definitions.
16127
16128 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16129
16130 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
16131 NDS32_V3PUSH_AVAILABLE_P macro.
16132
16133 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
16134 Chung-Ju Wu <jasonwucj@gmail.com>
16135
16136 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
16137 (nds32*-*-*): Add float and fpu_config into supported_defaults.
16138 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
16139 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
16140 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
16141 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
16142 * config/nds32/constraints.md: New constraints and checking for hard
16143 float configuration.
16144 * config/nds32/iterators.md: New mode iterator and attribute for hard
16145 float configuration.
16146 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
16147 patterns.
16148 * config/nds32/nds32-fpu.md: New file.
16149 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
16150 deal with hard float code generation.
16151 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
16152 ARCH_V3S.
16153 (abi_type, float_reg_number): New enum type.
16154 * config/nds32/nds32-predicates.c: New predicates for hard float.
16155 * config/nds32/nds32-protos.h: Declare functions for hard float.
16156 * config/nds32/nds32.c: Implementation for hard float configuration.
16157 * config/nds32/nds32.h: Definitions for hard float configuration.
16158 * config/nds32/nds32.md: Include hard float machine description and
16159 modify patterns for hard float configuration.
16160 * config/nds32/nds32.opt: New options for hard float configuration.
16161 * config/nds32/predicates.md: New predicates for hard float
16162 configuration.
16163
16164 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16165
16166 * common/config/nds32/nds32-common.c
16167 (nds32_option_optimization_table): Enable -mreleax-hint by default.
16168
16169 2018-04-05 Jakub Jelinek <jakub@redhat.com>
16170
16171 PR middle-end/85195
16172 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
16173 CONSTRUCTOR_ELT (ctor, ...)->value.
16174
16175 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
16176
16177 PR target/85193
16178 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
16179
16180 2018-04-05 Tom de Vries <tom@codesourcery.com>
16181
16182 PR target/85204
16183 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
16184 cond jump.
16185
16186 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16187 Kito Cheng <kito.cheng@gmail.com>
16188
16189 * config/nds32/constraints.md (U33): Fine-tune checking condition.
16190 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
16191 * config/nds32/nds32.h (nds32_16bit_address_type): Add
16192 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
16193
16194 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16195 Kito Cheng <kito.cheng@gmail.com>
16196
16197 * config/nds32/constraints.md (Ufe): New memory constraint.
16198 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
16199 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
16200 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
16201 operands.
16202 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
16203 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
16204
16205 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16206
16207 * config/nds32/nds32.md: Use optimize_size in the condition for
16208 alu-shift instructions.
16209
16210 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16211
16212 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
16213
16214 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16215
16216 * config/nds32/nds32.md (negsi2): Refine pattern.
16217
16218 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16219 Chung-Ju Wu <jasonwucj@gmail.com>
16220
16221 * config/nds32/iterators.md (shift_rotate): New code iterator.
16222 (shift): New code attribute.
16223 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
16224 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
16225 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
16226 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
16227 bit-wise operations.
16228 (andsi3, *andsi3): Ditto.
16229 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
16230 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
16231 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
16232 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
16233 nds32_ior_operand, nds32_xor_operand): New predicates.
16234
16235 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16236
16237 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
16238 (addsi3, subsi3): ... this.
16239
16240 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16241
16242 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
16243
16244 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16245
16246 * config/nds32/nds32.md: Adjust indention.
16247
16248 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16249
16250 * config/nds32/nds32.md (feature): New attribute.
16251
16252 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16253
16254 * config/nds32/nds32.md (subtype): New attribute.
16255
16256 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
16257
16258 PR target/85203
16259 * config/arm/arm-builtins.c (arm_expand_builtin): Change
16260 expansion to perform a bitwise AND of the argument followed by a
16261 boolean negation of the result.
16262
16263 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
16264
16265 PR rtl-optimization/84878
16266 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
16267 the basic block. Assert the use reference is not artificial and that
16268 it has an associated insn.
16269
16270 2018-04-04 Michael Matz <matz@suse.de>
16271
16272 * builtins.c (compute_objsize): Pass correct operand
16273 to array_at_struct_end_p.
16274
16275 2018-04-04 Richard Biener <rguenther@suse.de>
16276
16277 PR lto/85176
16278 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
16279 from contexts for DINFO_LEVEL_TERSE and below.
16280
16281 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16282
16283 * config/nds32/nds32-doubleword.md (move_<mode>): Require
16284 resiter_operand condition.
16285 * config/nds32/nds32.md (*move<mode>): Ditto.
16286
16287 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16288 Monk Chiang <sh.chiang04@gmail.com>
16289
16290 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
16291
16292 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16293
16294 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
16295
16296 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16297 Kito Cheng <kito.cheng@gmail.com>
16298
16299 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
16300 nds32_cond_code_str, output_cond_branch,
16301 output_cond_branch_compare_zero, nds32_expand_cbranch,
16302 nds32_expand_cstore, nds32_expand_movcc,
16303 nds32_output_cbranchsi4_equality_zero,
16304 nds32_output_cbranchsi4_equality_reg,
16305 nds32_output_cbranchsi4_equality_reg_or_const_int,
16306 nds32_output_cbranchsi4_greater_less_zero: New functions.
16307 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
16308 nds32_expand_cstore, nds32_expand_movcc,
16309 nds32_output_cbranchsi4_equality_zero,
16310 nds32_output_cbranchsi4_equality_reg,
16311 nds32_output_cbranchsi4_equality_reg_or_const_int,
16312 nds32_output_cbranchsi4_greater_less_zero): Declare.
16313 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
16314 nds32_rimm11s_operand): New predicates.
16315 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
16316 * config/nds32/nds32.md: Rewrite all the branch and conditional move
16317 patterns.
16318
16319 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16320
16321 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
16322 * config/nds32/nds32.md: Ditto.
16323 * config/nds32/pipelines.md: Ditto.
16324
16325 2018-04-04 Richard Biener <rguenther@suse.de>
16326
16327 PR tree-optimization/85168
16328 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
16329 propagating abnormals.
16330
16331 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16332
16333 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16334
16335 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16336 Kito Cheng <kito.cheng@gmail.com>
16337
16338 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16339 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16340 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16341 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16342 * config/nds32/nds32.md (sibcall_internal): New.
16343 (sibcall_register): Remove.
16344 (sibcall_immediate): Remove.
16345 (sibcall_value_internal): New.
16346 (sibcall_value_register): Remove.
16347 (sibcall_value_immediate): Remove.
16348 * config/nds32/predicates.md (nds32_general_register_operand): New.
16349 (nds32_call_address_operand): New.
16350
16351 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16352
16353 PR rtl-optimization/85167
16354 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16355 bb_defs if *split_p, instead preinitialize it to NULL.
16356
16357 PR tree-optimization/85156
16358 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16359 evaluating the argument multiple times.
16360
16361 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
16362
16363 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16364 than vector.
16365 (_mm_cvtpd_ps): Likewise.
16366 (_mm_cvttpd_epi32): Likewise.
16367 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16368 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16369 vector, pixel, and bool following altivec.h include.
16370
16371 2018-04-03 Martin Sebor <msebor@redhat.com>
16372
16373 * doc/extend.texi (Common Function Attributes): Clarify.
16374 (const attribute): Likewise.
16375 (pure attribute): Likewise.
16376
16377 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16378
16379 PR target/85169
16380 * config/i386/i386.c (ix86_expand_vector_set): Use
16381 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
16382
16383 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
16384
16385 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16386 instructions when changing rounding bits to preserve precision bits
16387 in the x87 control word.
16388
16389 2018-04-03 Martin Liska <mliska@suse.cz>
16390
16391 PR tree-optimization/82491
16392 * rtl.h (strip_offset_and_add): Replace += suboffset with
16393 poly_uint64 () + suboffset.
16394
16395 2018-03-29 Martin Liska <mliska@suse.cz>
16396 Martin Jambor <mjambor@suse.cz>
16397
16398 PR ipa/84947
16399 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16400 param_type is not an integral or pointer type.
16401
16402 2018-04-03 Richard Biener <rguenther@suse.de>
16403
16404 * sese.h (recompute_all_dominators): Remove.
16405
16406 2018-04-02 Martin Sebor <msebor@redhat.com>
16407
16408 * doc/invoke.texi (-Wrestrict): Fix typos.
16409
16410 2018-04-02 Jim Wilson <jimw@sifive.com>
16411
16412 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16413 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16414 (<optab>di3, <optab>si3_extend): Likewise.
16415 (<optab>si3_mask, <optab>si3_mask_1): New.
16416 (<optab>di3_mask, <optab>di3_mask_1): New.
16417 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16418 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16419 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16420
16421 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
16422
16423 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16424 example.
16425
16426 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
16427
16428 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16429 (nds32_canonicalize_comparison): New function.
16430
16431 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16432 Kito Cheng <kito.cheng@gmail.com>
16433 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16434
16435 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16436 * config/nds32/constants.md (unspec_volatile_element): Add
16437 UNSPEC_VOLATILE_RELAX_GROUP.
16438 * config/nds32/nds32-relax-opt.c: New file.
16439 * config/nds32/nds32-predicates.c
16440 (nds32_symbol_load_store_p): New function.
16441 * config/nds32/nds32-protos.h
16442 (nds32_symbol_load_store_p): Declare function.
16443 (make_pass_nds32_relax_opt): Declare new rtl pass function.
16444 * config/nds32/nds32.c
16445 (nds32_register_pass): New function to register pass.
16446 (nds32_register_passes): New function to register passes.
16447 * config/nds32/nds32.md (relax_group): New pattern.
16448 * config/nds32/nds32.opt (mrelax-hint): New option.
16449 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16450
16451 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
16452
16453 * config/nds32/t-nds32: Modify files dependency.
16454
16455 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16456
16457 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16458 (PROFILE_HOOK): Define its implementation.
16459
16460 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16461
16462 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16463 type and 32-bit size.
16464
16465 2018-04-01 Jakub Jelinek <jakub@redhat.com>
16466
16467 PR middle-end/85090
16468 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16469 (V_128_256): New mode iterator.
16470 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16471 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16472 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16473 of V.
16474 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16475 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16476
16477 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
16478
16479 PR target/83315
16480 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16481 NaN inputs correctly.
16482
16483 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
16484
16485 PR target/80546
16486 * config/rs6000/vsx.md (??r): New mode attribute.
16487 (*vsx_mov<mode>_64bit): Use it.
16488 (*vsx_mov<mode>_32bit): Likewise.
16489
16490 2018-03-30 Martin Sebor <msebor@redhat.com>
16491
16492 PR tree-optimization/84818
16493 * builtins.c (check_access): Use warning_n.
16494
16495 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16496
16497 PR target/83822
16498 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16499 condition.
16500 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16501 condition.
16502
16503 2018-03-30 Julia Koval <julia.koval@intel.com>
16504
16505 PR target/84413
16506 * x86-tune.def (movx, partial_reg_dependency): Enable for
16507 m_SKYLAKE_AVX512.
16508
16509 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
16510
16511 PR inline-asm/84985
16512 * lra-constraints.c (process_alt_operands): Move setting
16513 this_alternative_matches below.
16514
16515 2018-03-29 Martin Liska <mliska@suse.cz>
16516
16517 PR lto/84995.
16518 * doc/invoke.texi: Document how LTO works with debug info.
16519 Describe auto-load support of binutils. Mention 'x86-64'
16520 as valid option value of -march option.
16521
16522 2018-03-29 Jakub Jelinek <jakub@redhat.com>
16523
16524 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16525
16526 PR c/85094
16527 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16528 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16529 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16530 checking.
16531
16532 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16533
16534 PR target/84912
16535 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16536 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16537 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16538 for RS6000_BTM_POWERPC64.
16539 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16540 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16541 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16542 definition.
16543 (DIVDE): Use it.
16544 (DIVDEU): Likewise.
16545
16546 2018-03-28 Carl Love <cel@us.ibm.com>
16547
16548 Revert
16549 2017-09-27 Carl Love <cel@us.ibm.com>
16550
16551 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16552 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16553 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16554 fctiw instruction.
16555
16556 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16557
16558 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16559 instead of __vector bool.
16560 (_mm_max_pu8): Likewise.
16561 (_mm_min_pi16): Likewise.
16562
16563 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16564
16565 PR target/84912
16566 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16567 (DIVWEUO): Likewise.
16568 (DIVDEO): Likewise.
16569 (DIVDEUO): Likewise.
16570 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16571 DIVWEUO and DIVDEUO.
16572 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16573 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16574 (div_extend): Likewise.
16575 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16576 builtin function.
16577 (__builtin_divweuo): Likewise.
16578 (__builtin_divdeo): Likewise.
16579 (__builtin_divdeuo): Likewise.
16580
16581 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16582
16583 PR target/85095
16584 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16585 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16586
16587 PR tree-optimization/82004
16588 * gimple-match-head.c (optimize_pow_to_exp): New function.
16589 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16590 Don't fold to exp if optimize_pow_to_exp is false.
16591
16592 2018-03-28 Martin Liska <mliska@suse.cz>
16593
16594 PR other/84819
16595 * calls.c (initialize_argument_information): Fix trailing space.
16596 * common.opt: Fix typo and provide better explanation for
16597 -fsanitize-coverage option.
16598 * config/i386/i386.opt: Fix typo.
16599
16600 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16601 Martin Liska <mliska@suse.cz>
16602
16603 PR sanitizer/85081
16604 * gimplify.c (asan_poison_variable): Don't do the check for
16605 gimplify_omp_ctxp here.
16606 (gimplify_decl_expr): Do it here.
16607 (gimplify_target_expr): Likewise.
16608
16609 2018-03-28 Martin Liska <mliska@suse.cz>
16610
16611 PR target/84988
16612 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16613 chkp_type_bounds_count if MPX is not enabled.
16614
16615 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16616
16617 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16618
16619 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16620
16621 PR target/84914
16622 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16623 function to create the function decl for complex long double
16624 multiply and divide for -mabi=ieeelongdouble.
16625 (init_float128_ieee): Call it.
16626
16627 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16628
16629 PR target/85044
16630 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16631 -fcf-protection=branch -mibt.
16632 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16633
16634 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16635
16636 PR target/81863
16637 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16638 arm_word_relocations.
16639
16640 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16641
16642 PR target/85056
16643 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16644 extern array declarations.
16645
16646 2018-03-27 Richard Biener <rguenther@suse.de>
16647
16648 PR middle-end/84067
16649 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16650 explicit single_use checks.
16651
16652 2018-03-27 Richard Biener <rguenther@suse.de>
16653
16654 PR tree-optimization/85082
16655 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16656 Valueize the VUSE.
16657
16658 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16659
16660 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16661 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16662 Turn on fasynchronous-unwind-tables and funwind-tables.
16663
16664 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16665
16666 PR target/85073
16667 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16668 (*bmi_blsr_<mode>_ccz): Ditto.
16669
16670 2018-03-26 Tom de Vries <tom@codesourcery.com>
16671
16672 PR tree-optimization/85063
16673 * omp-general.c (offloading_function_p): New function. Factor out
16674 of ...
16675 * omp-offload.c (pass_omp_target_link::gate): ... here.
16676 * omp-general.h (offloading_function_p): Declare.
16677 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16678 with attribute omp declare target for offloading functions.
16679
16680 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16681
16682 PR tree-optimization/84005
16683 * tree-data-ref.h (get_base_for_alignment): Declare.
16684 * tree-data-ref.c (get_base_for_alignment_1): New function.
16685 (get_base_for_alignment): Likewise.
16686 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16687 get_base_for_alignment to find a suitable base object, instead
16688 of always using drb->base_address.
16689
16690 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16691
16692 PR inline-asm/85022
16693 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16694 known size by default.
16695
16696 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16697
16698 PR inline-asm/85030
16699 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16700 and non BLKmode operands.
16701
16702 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16703
16704 PR target/85026
16705 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16706 Clean up attributes.
16707
16708 2018-03-23 Richard Biener <rguenther@suse.de>
16709
16710 PR debug/85020
16711 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16712 we are going to emit early debug for LTO.
16713
16714 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16715
16716 PR inline-asm/85034
16717 * function.c (match_asm_constraints_1): Don't optimize if input
16718 doesn't satisfy general_operand predicate for output's mode.
16719
16720 PR inline-asm/85022
16721 * alias.c (write_dependence_p): Don't require for x_canonicalized
16722 non-VOIDmode if x has VOIDmode.
16723
16724 PR sanitizer/85029
16725 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16726 just don't try to optimize it rather than assert it never happens.
16727
16728 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16729
16730 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16731 macro expansions for definition of ST_INTERNAL_<mode> and
16732 LD_INTERNAL_<mode> builtins.
16733 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16734 Remove prototype.
16735 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16736 function.
16737 (altivec_expand_st_builtin): Likewise.
16738 (altivec_expand_builtin): Remove calls to deleted functions.
16739 (rs6000_address_for_altivec): Delete this function.
16740 * config/rs6000/vector.md: Remove expands for
16741 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16742
16743 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16744
16745 PR target/84826
16746 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16747 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16748 re-computing once computed.
16749 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16750 (arm_init_machine_status): Initialize
16751 machine->static_chain_stack_bytes.
16752
16753 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16754
16755 PR target/84760
16756 * doc/extend.texi: Add four new prototypes for vec_ld.
16757 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16758 definitions for more logical presentation.
16759 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16760 entries for V1TI variants of __builtin_altivec_ld builtin.
16761 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16762 handling of V1TI variant of LVX icode pattern.
16763 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16764 (rs6000_gimple_fold_builtin): Likewise.
16765 (altivec_init_builtins): Add code to define
16766 __builtin_altivec_lvx_v1ti function.
16767
16768 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16769
16770 PR inline-asm/84941
16771 * function.c (match_asm_constraints_1): Don't do the optimization
16772 if input isn't a REG, SUBREG, MEM or constant.
16773
16774 2018-03-22 Tom de Vries <tom@codesourcery.com>
16775
16776 PR tree-optimization/84956
16777 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16778 bb_has_abnormal_pred.
16779
16780 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16781
16782 PR sanitizer/85018
16783 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16784 DECL_INITIAL (decl) to decl at the end.
16785 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16786 adjust the comment.
16787
16788 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16789
16790 * doc/extend.texi (__builtin_tgmath): Document when complex
16791 integer types are treated as _Complex _Float64.
16792
16793 2018-03-21 Tom de Vries <tom@codesourcery.com>
16794
16795 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16796
16797 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16798
16799 PR tree-optimization/84960
16800 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16801 if it is ENTRY block, move them into single succ of ENTRY in that case.
16802
16803 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16804
16805 PR tree-optimization/84811
16806 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16807 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16808 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16809 (known_subrange_p): Update accordingly. Cast each value involved
16810 in the size comparison, rather than casting the result of the
16811 subtraction.
16812
16813 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16814
16815 PR tree-optimization/84982
16816 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16817 by flipping the least significant bit rather than all bits from
16818 bitpos to bitpos + bitsize - 1.
16819
16820 2018-03-21 Nathan Sidwell <nathan@acm.org>
16821
16822 * doc/extend.texi (Deprecated Features): Remove mention of
16823 long-deleted deprecations.
16824
16825 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16826
16827 PR jit/84288
16828 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16829 * configure: Regenerate.
16830
16831 2018-03-21 Tom de Vries <tom@codesourcery.com>
16832
16833 PR tree-optimization/83126
16834 * tree-parloops.c (num_phis): New function.
16835 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16836
16837 2018-03-21 Nathan Sidwell <nathan@acm.org>
16838
16839 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16840 mention anon-struct/union members and trailing attributes.
16841
16842 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16843
16844 PR tree-optimization/84969
16845 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16846 builtin memset partitions if they set different rhs values.
16847
16848 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16849
16850 PR rtl-optimization/84989
16851 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16852 VEC_DUPLICATE with scalar result mode.
16853
16854 2018-03-21 Martin Liska <mliska@suse.cz>
16855
16856 PR ipa/84963
16857 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16858 not intended return statement.
16859
16860 2018-03-21 Martin Liska <mliska@suse.cz>
16861
16862 PR target/84988
16863 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16864 (chkp_find_bound_slots_1): Limit number of iterations.
16865
16866 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16867
16868 PR target/84838
16869 * Minor grammar fixes for x86 options.
16870
16871 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16872
16873 PR debug/84875
16874 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16875 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16876
16877 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16878
16879 PR target/83789
16880 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16881 (altivec_lvx_<mode>_1op): Likewise.
16882 (altivec_stvx_<mode>_2op): Likewise.
16883 (altivec_stvx_<mode>_1op): Likewise.
16884 (altivec_lvx_<VM2:mode>): New define_expand.
16885 (altivec_stvx_<VM2:mode>): Likewise.
16886 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16887 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16888 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16889 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16890 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16891 (rs6000_gen_lvx): Likewise.
16892 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16893 (altivec_expand_stv_builtin): Likewise.
16894 (altivec_expand_builtin): Likewise.
16895 * config/rs6000/vector.md: Likewise.
16896
16897 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16898
16899 PR target/82518
16900 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16901 BYTES_BIG_ENDIAN.
16902
16903 2018-03-20 Richard Biener <rguenther@suse.de>
16904
16905 PR target/84986
16906 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16907 sign-conversions as zero, fall back to standard scalar_stmt
16908 cost for the rest.
16909
16910 2018-03-20 Martin Liska <mliska@suse.cz>
16911
16912 PR ipa/84825
16913 * predict.c (rebuild_frequencies): Handle case when we have
16914 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16915
16916 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16917
16918 PR target/84990
16919 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16920 flag_section_anchors.
16921 * varasm.c (use_blocks_for_decl_p): Remove hack for
16922 dw2_force_const_mem.
16923
16924 PR target/84845
16925 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16926 to ...
16927 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16928 be created, use lowpart_subreg of operands[0] rather than operands[0]
16929 itself.
16930 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16931 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16932 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16933 and n constraint instead of aarch64_shift_imm_di and Usd.
16934 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16935 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16936
16937 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16938
16939 PR target/82989
16940 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16941 to favor GPR over NEON registers.
16942 (<shift>di3_neon): Likewise.
16943
16944 2018-03-20 Tom de Vries <tom@codesourcery.com>
16945
16946 PR target/84952
16947 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16948 (nvptx_process_pars): Emit bar.sync asap and alap.
16949
16950 2018-03-20 Tom de Vries <tom@codesourcery.com>
16951
16952 PR target/84954
16953 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16954 seen_label if seen_label is already set.
16955
16956 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16957
16958 PR target/84945
16959 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16960 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16961 Use 1U instead of 1. Formatting fixes.
16962
16963 PR c/84953
16964 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16965 instead of TREE_TYPE (s1) for the return value.
16966
16967 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16968
16969 PR tree-optimization/84946
16970 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16971 bitsize + bitsize in poly_uint64 rather than poly_int64.
16972
16973 PR sanitizer/78651
16974 * dwarf2asm.c: Include fold-const.c.
16975 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16976 of decl rather than decl itself.
16977
16978 PR rtl-optimization/84643
16979 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16980
16981 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16982
16983 PR sanitizer/78651
16984 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16985 calling assemble_variable.
16986
16987 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16988
16989 PR target/81647
16990 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16991 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16992
16993 2018-03-19 Jim Wilson <jimw@sifive.com>
16994
16995 PR bootstrap/84856
16996 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16997 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16998 (riscv_first_stack_step): Likewise.
16999 (riscv_option_override): Use STACK_BOUNDARY instead of
17000 MIN_STACK_BOUNDARY.
17001 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
17002 MIN_STACK_BOUNDARY.
17003 (BIGGEST_ALIGNMENT): Set to 128.
17004 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
17005 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
17006 STACK_BOUNDARY.
17007
17008 2018-03-19 Richard Biener <rguenther@suse.de>
17009
17010 PR tree-optimization/84933
17011 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
17012 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
17013
17014 2018-03-19 Richard Biener <rguenther@suse.de>
17015
17016 PR tree-optimization/84859
17017 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
17018 (cond_if_else_store_replacement): Perform sinking operation on
17019 single-store BBs regardless of MAX_STORES_TO_SINK setting.
17020 Generalize what a BB with a single eligible store is.
17021
17022 2018-03-19 Richard Biener <rguenther@suse.de>
17023
17024 PR tree-optimization/84929
17025 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
17026 chrec_is_positive against non-chrec arg.
17027
17028 2018-03-19 Tamar Christina <tamar.christina@arm.com>
17029
17030 PR target/84711
17031 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
17032
17033 2018-03-18 Martin Liska <mliska@suse.cz>
17034
17035 PR rtl-optimization/84635
17036 * regrename.c (build_def_use): Use matches_mode only when
17037 matches >= 0.
17038
17039 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
17040
17041 PR tree-optimization/84913
17042 * tree-vect-loop.c (vectorizable_reduction): Don't try to
17043 vectorize chains of COND_EXPRs.
17044
17045 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17046
17047 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
17048
17049 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17050
17051 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
17052
17053 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17054
17055 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
17056
17057 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17058 Kito Cheng <kito.cheng@gmail.com>
17059
17060 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
17061 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
17062 (nds32_adjust_reg_alloc_order): New function.
17063 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
17064
17065 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
17066
17067 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
17068 nds32_print_operand, nds32_print_operand_address): Use
17069 HOST_WIDE_INT_PRINT_DEC instead.
17070
17071 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17072
17073 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
17074
17075 2018-03-17 Jakub Jelinek <jakub@redhat.com>
17076
17077 PR target/84902
17078 * config/i386/i386.c (initial_ix86_tune_features,
17079 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
17080 unsigned long long.
17081 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
17082 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
17083 rather than 1u << ix86_tune. Formatting fix.
17084 (ix86_option_override_internal): Change ix86_arch_mask from
17085 unsigned int to unsigned HOST_WIDE_INT, initialize to
17086 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
17087 (ix86_function_specific_restore): Likewise.
17088
17089 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17090
17091 PR target/84899
17092 * postreload.c (reload_combine_recognize_pattern): Perform
17093 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
17094 truncate_int_for_mode the result for the destination's mode.
17095
17096 PR c/84909
17097 * hsa-gen.c (mem_type_for_type): Fix comment typo.
17098 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
17099 Likewise.
17100 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17101 Likewise.
17102
17103 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
17104
17105 PR target/84876
17106 * lra-assigns.c (lra_split_hard_reg_for): Don't use
17107 regno_allocno_class_array and sorted_pseudos.
17108 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
17109 insns where regno is used.
17110
17111 2018-03-16 Martin Liska <mliska@suse.cz>
17112
17113 PR ipa/84833
17114 * multiple_target.c (create_dispatcher_calls): Redirect
17115 reference in the symbol table.
17116
17117 2018-03-16 Martin Liska <mliska@suse.cz>
17118
17119 PR ipa/84722
17120 * multiple_target.c (create_dispatcher_calls): Redirect also
17121 an alias.
17122
17123 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17124
17125 PR c++/79937
17126 PR c++/82410
17127 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
17128 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
17129 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
17130
17131 2018-03-16 Julia Koval <julia.koval@intel.com>
17132
17133 * doc/invoke.texi (Skylake Server): Add CLWB.
17134 Cannonlake): Remove CLWB.
17135
17136 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17137
17138 PR tree-optimization/84841
17139 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
17140 1 << 3.
17141 (FLOAT_ONE_CONST_TYPE): Define.
17142 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
17143 (sort_by_operand_rank): Put entries with higher constant_type last
17144 rather than first to match comments.
17145
17146 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
17147
17148 * config/nios2/nios2.md (movsi_internal): Fix thinko in
17149 split predicate.
17150
17151 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17152
17153 PR c++/79085
17154 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
17155 check and use address of target always.
17156
17157 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
17158
17159 PR target/84574
17160 * config/i386/i386.c (indirect_thunk_needed): Update comments.
17161 (indirect_thunk_bnd_needed): Likewise.
17162 (indirect_thunks_used): Likewise.
17163 (indirect_thunks_bnd_used): Likewise.
17164 (indirect_return_needed): New.
17165 (indirect_return_bnd_needed): Likewise.
17166 (output_indirect_thunk_function): Add a bool argument for
17167 function return.
17168 (output_indirect_thunk_function): Don't generate alias for
17169 function return thunk.
17170 (ix86_code_end): Call output_indirect_thunk_function to generate
17171 function return thunks.
17172 (ix86_output_function_return): Set indirect_return_bnd_needed
17173 and indirect_return_needed instead of indirect_thunk_bnd_needed
17174 and indirect_thunk_needed.
17175
17176 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
17177
17178 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
17179 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
17180 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
17181
17182 2018-03-15 David Malcolm <dmalcolm@redhat.com>
17183 Paul Hua <paul.hua.gm@gmail.com>
17184
17185 PR c/84852
17186 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
17187
17188 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
17189
17190 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
17191 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
17192 resp. SFmode cases.
17193
17194 2018-03-15 Tamar Christina <tamar.christina@arm.com>
17195
17196 PR target/84711
17197 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17198 instead of GET_MODE_SIZE when comparing Units.
17199
17200 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
17201
17202 PR target/68256
17203 * varasm.c (hash_section): Return an unchangeble hash value
17204 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
17205 Return !aarch64_can_use_per_function_literal_pools_p ().
17206
17207 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17208
17209 PR target/84860
17210 * optabs.c (emit_conditional_move): Pass address of cmode's copy
17211 rather than address of cmode as last argument to prepare_cmp_insn.
17212
17213 2018-03-15 Julia Koval <julia.koval@intel.com>
17214
17215 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
17216 F_AVX512VNNI, F_AVX512BITALG): New.
17217
17218 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
17219
17220 PR target/83451
17221 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
17222 insn for floating-point loads and stores.
17223
17224 2018-03-14 Carl Love <cel@us.ibm.com>
17225
17226 * config/rs6000/rs6000-c.c: Add macro definitions for
17227 ALTIVEC_BUILTIN_VEC_PERMXOR.
17228 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
17229 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
17230 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
17231 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
17232 UNSPEC_VPERMXOR.
17233 * config/doc/extend.texi: Add prototypes for vec_permxor.
17234
17235 2018-03-14 David Malcolm <dmalcolm@redhat.com>
17236
17237 PR c/84852
17238 * diagnostic-show-locus.c (class layout_point): Convert m_line
17239 from int to linenum_type.
17240 (line_span::comparator): Use linenum "compare" function when
17241 comparing line numbers.
17242 (test_line_span): New function.
17243 (layout_range::contains_point): Convert param "row" from int to
17244 linenum_type.
17245 (layout_range::intersects_line_p): Likewise.
17246 (layout::will_show_line_p): Likewise.
17247 (layout::print_source_line): Likewise.
17248 (layout::should_print_annotation_line_p): Likewise.
17249 (layout::print_annotation_line): Likewise.
17250 (layout::print_leading_fixits): Likewise.
17251 (layout::annotation_line_showed_range_p): Likewise.
17252 (struct line_corrections): Likewise for field m_row.
17253 (line_corrections::line_corrections): Likewise for param "row".
17254 (layout::print_trailing_fixits): Likewise.
17255 (layout::get_state_at_point): Likewise.
17256 (layout::get_x_bound_for_row): Likewise.
17257 (layout::print_line): Likewise.
17258 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
17259 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
17260 * input.c (selftest::test_linenum_comparisons): New function.
17261 (selftest::input_c_tests): Call it.
17262 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
17263 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
17264 * selftest.h (ASSERT_GT): New macro.
17265 (ASSERT_GT_AT): New macro.
17266 (ASSERT_LT): New macro.
17267 (ASSERT_LT_AT): New macro.
17268
17269 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
17270
17271 PR rtl-optimization/84780
17272 * combine.c (distribute_links): Don't make a link based on pc_rtx.
17273
17274 2018-03-14 Martin Liska <mliska@suse.cz>
17275
17276 * tree.c (record_node_allocation_statistics): Use
17277 get_stats_node_kind.
17278 (get_stats_node_kind): New function extracted from
17279 record_node_allocation_statistics.
17280 (free_node): Use get_stats_node_kind.
17281
17282 2018-03-14 Richard Biener <rguenther@suse.de>
17283
17284 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
17285 that the value-set of ANTIC_IN doesn't grow.
17286
17287 Revert
17288 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17289 member.
17290 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17291 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17292
17293 2018-03-14 Julia Koval <julia.koval@intel.com>
17294
17295 * config.gcc (icelake-client, icelake-server): New.
17296 (icelake): Remove.
17297 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
17298 (initial_ix86_arch_features): Ditto.
17299 (PTA_SKYLAKE): Add SGX.
17300 (PTA_ICELAKE): Remove.
17301 (PTA_ICELAKE_CLIENT): New.
17302 (PTA_ICELAKE_SERVER): New.
17303 (ix86_option_override_internal): Split up icelake on icelake client and
17304 icelake server.
17305 (get_builtin_code_for_version): Ditto.
17306 (fold_builtin_cpu): Ditto.
17307 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
17308 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
17309 * config/i386/i386.h (processor_type): Ditto.
17310 * doc/invoke.texi: Ditto.
17311
17312 2018-03-14 Jakub Jelinek <jakub@redhat.com>
17313
17314 PR sanitizer/83392
17315 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
17316 INTEGER_CST offset, add it together with bitpos / 8 and
17317 sign extend based on POINTER_SIZE.
17318
17319 PR target/84844
17320 Revert
17321 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
17322
17323 PR target/78090
17324 * config/i386/constraints.md (Yc): New register constraint.
17325 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
17326 Use Yc constraint for alternative 2 of operand 0. Remove
17327 preferred_for_speed attribute.
17328
17329 2018-03-14 Richard Biener <rguenther@suse.de>
17330
17331 PR tree-optimization/84830
17332 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17333 with the old one to avoid oscillations.
17334
17335 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
17336
17337 PR target/83712
17338 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17339 pseudos.
17340 (assign_by_spills): Return a flag of reload assignment failure.
17341 Do not process the reload assignment failures. Do not spill other
17342 reload pseudos if they has the same reg class. Update n if
17343 necessary.
17344 (lra_assign): Add a return arg. Set up from the result of
17345 assign_by_spills call.
17346 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17347 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17348 usage_insns if it is not NULL.
17349 (spill_hard_reg_in_range): New function.
17350 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17351 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17352 function prototypes.
17353 (lra_assign): Change prototype.
17354 * lra.c (lra): Add code to deal with fails by splitting hard reg
17355 live ranges.
17356
17357 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
17358
17359 * config/riscv/riscv.opt (mrelax): New option.
17360 * config/riscv/riscv.c (riscv_file_start): Emit ".option
17361 "norelax" when riscv_mrelax is disabled.
17362 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17363
17364 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17365
17366 PR target/84743
17367 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17368 reassociation for int modes.
17369
17370 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17371
17372 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17373 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17374 for big-endian.
17375 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17376 * config/aarch64/aarch64-sve.md
17377 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17378 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17379 (*extend<mode><Vwide>2): Rename to...
17380 (aarch64_sve_extend<mode><Vwide>2): ...this.
17381 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17382 renaming the old pattern to...
17383 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
17384 unsigned packs.
17385 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17386 define_expand, renaming the old pattern to...
17387 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17388 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17389 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17390 account when deciding which SVE instruction the optab should use.
17391 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17392
17393 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17394
17395 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17396 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17397 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17398 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17399 (tlsdesc_small_<mode>): Turn a define_expand and use
17400 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
17401 (tlsdesc_small_advsimd_<mode>): ...this.
17402 (tlsdesc_small_sve_<mode>): New pattern.
17403
17404 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17405
17406 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17407 (UNSPEC_UMUL_HIGHPART): New constants.
17408 (MUL_HIGHPART): New int iteraor.
17409 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17410 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17411 define_expand.
17412 (*<su>mul<mode>3_highpart): New define_insn.
17413
17414 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17415
17416 PR lto/84805
17417 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17418 incomplete types.
17419
17420 2018-03-13 Martin Liska <mliska@suse.cz>
17421
17422 PR ipa/84658.
17423 * (sem_item_optimizer::sem_item_optimizer): Initialize new
17424 vector.
17425 (sem_item_optimizer::~sem_item_optimizer): Release it.
17426 (sem_item_optimizer::merge_classes): Register variable aliases.
17427 (sem_item_optimizer::fixup_pt_set): New function.
17428 (sem_item_optimizer::fixup_points_to_sets): Likewise.
17429 * ipa-icf.h: Declare new variables and functions.
17430
17431 2018-03-13 Jakub Jelinek <jakub@redhat.com>
17432
17433 PR middle-end/84834
17434 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17435 integer_pow2p@2 and test integer_pow2p in condition.
17436 (A < 0 ? C : 0): Similarly for @1.
17437
17438 PR middle-end/84831
17439 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17440 characters starting at p contain '\0' character, don't look beyond
17441 that.
17442
17443 PR target/84827
17444 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17445 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17446
17447 PR target/84828
17448 * reg-stack.c (change_stack): Change update_end var from int to
17449 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17450 also call set_block_for_insn on the newly added insns and rescan.
17451
17452 PR target/84786
17453 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17454 on the last operand.
17455
17456 PR c++/84704
17457 * tree.c (stabilize_reference_1): Return save_expr (e) for
17458 STATEMENT_LIST even if it doesn't have side-effects.
17459
17460 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
17461
17462 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17463
17464 2018-03-12 Renlin Li <renlin.li@arm.com>
17465
17466 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17467 aarch64_output_scalar_simd_mov_immediate.
17468
17469 2018-03-12 Martin Sebor <msebor@redhat.com>
17470
17471 PR tree-optimization/83456
17472 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17473 for perfectly overlapping calls to memcpy.
17474 (gimple_fold_builtin_memory_chk): Same.
17475 (gimple_fold_builtin_strcpy): Handle no-warning.
17476 (gimple_fold_builtin_stxcpy_chk): Same.
17477 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17478
17479 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17480
17481 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17482 parameter. Use it for SFmode.
17483 (rs6000_function_arg_advance_1): Adjust.
17484 (rs6000_function_arg): Adjust.
17485 (rs6000_gimplify_va_arg): Pass false for that new parameter.
17486
17487 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17488
17489 PR rtl-optimization/84169
17490 PR rtl-optimization/84780
17491 * combine.c (can_combine_p): Check for a 2-insn combination whether
17492 the destination register is used between the two insns, too.
17493
17494 2018-03-12 Richard Biener <rguenther@suse.de>
17495
17496 PR tree-optimization/84803
17497 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17498 for refs DR analysis didn't process.
17499
17500 2018-03-12 Richard Biener <rguenther@suse.de>
17501
17502 PR tree-optimization/84777
17503 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17504 force-vectorize loops ignore whether we are optimizing for size.
17505
17506 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
17507
17508 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17509 (TARGET_MD_ASM_ADJUST): Define.
17510
17511 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
17512 Kito Cheng <kito.cheng@gmail.com>
17513 Chung-Ju Wu <jasonwucj@gmail.com>
17514
17515 * config/nds32/nds32.c (nds32_compute_stack_frame,
17516 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17517 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17518 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17519 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17520 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17521 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17522 * config/nds32/nds32.md (prologue, epilogue): Use macro
17523 NDS32_V3PUSH_AVAILABLE_P to do checking.
17524
17525 2018-03-11 Jakub Jelinek <jakub@redhat.com>
17526
17527 PR debug/58150
17528 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17529 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17530 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
17531 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
17532 addition of most attributes on !orig_type_die or the attribute not
17533 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17534
17535 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17536 Chung-Ju Wu <jasonwucj@gmail.com>
17537
17538 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17539 __NDS32_VH__ macro.
17540 * config/nds32/nds32.opt (mvh): New option.
17541
17542 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17543 Chung-Ju Wu <jasonwucj@gmail.com>
17544
17545 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17546 function.
17547 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17548 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17549 definition.
17550
17551 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17552 Chung-Ju Wu <jasonwucj@gmail.com>
17553
17554 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17555 function.
17556 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17557 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17558
17559 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17560 Kito Cheng <kito.cheng@gmail.com>
17561 Chung-Ju Wu <jasonwucj@gmail.com>
17562
17563 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17564 UNSPEC_FFMISM and UNSPEC_FLMISM.
17565 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17566 for ffb, ffmism and flmism.
17567 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17568 (unspec_ffmism): Ditto.
17569 (unspec_flmism): Ditto.
17570 (nds32_expand_builtin_impl): Check if string extension is available.
17571 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17572 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17573
17574 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17575
17576 Reverting patch:
17577 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17578
17579 PR target/83712
17580 * lra-assigns.c (assign_by_spills): Return a flag of reload
17581 assignment failure. Do not process the reload assignment
17582 failures. Do not spill other reload pseudos if they has the same
17583 reg class.
17584 (lra_assign): Add a return arg. Set up from the result of
17585 assign_by_spills call.
17586 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17587 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17588 usage_insns if it is not NULL.
17589 (spill_hard_reg_in_range): New function.
17590 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17591 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17592 function prototypes.
17593 (lra_assign): Change prototype.
17594 * lra.c (lra): Add code to deal with fails by splitting hard reg
17595 live ranges.
17596
17597 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17598
17599 PR target/84807
17600 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17601
17602 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17603
17604 PR debug/84620
17605 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17606 (dw_val_node): Add val_symbolic_view.
17607 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17608 (symview_upper_bound): New.
17609 (new_line_info_table): Initialize symviews_since_reset.
17610 (dwarf2out_source_line): Count symviews_since_reset and set
17611 symview_upper_bound.
17612 (dw_val_equal_p): Handle symview.
17613 (add_AT_symview): New.
17614 (print_dw_val): Handle symview.
17615 (attr_checksum, attr_checksum_ordered): Likewise.
17616 (same_dw_val_p, size_of_die): Likewise.
17617 (value_format, output_die): Likewise.
17618 (add_high_low_attributes): Use add_AT_symview for entry_view.
17619 (dwarf2out_finish): Reset symview_upper_bound, clear
17620 zero_view_p.
17621
17622 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17623
17624 PR target/83969
17625 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17626 Add strict argument and use it.
17627 (rs6000_split_multireg_move): Update for new strict argument.
17628 (mem_operand_gpr): Disallow all non-offsettable addresses.
17629 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17630
17631 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17632
17633 PR target/84772
17634 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17635 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17636 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17637
17638 PR c++/84767
17639 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17640 decl, use remap_type if we want to use the type.
17641
17642 2018-03-09 Martin Sebor <msebor@redhat.com>
17643
17644 PR tree-optimization/84526
17645 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17646 Remove dead code.
17647 (builtin_access::generic_overlap): Be prepared to handle non-array
17648 base objects.
17649
17650 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17651
17652 PR rtl-optimization/84682
17653 * lra-constraints.c (process_address_1): Check is_address flag
17654 for address constraints.
17655 (process_alt_operands): Likewise.
17656 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17657 preprocess_constraints.
17658 * recog.h (preprocess_constraints): Add oploc parameter.
17659 Adjust callers.
17660 * recog.c (preprocess_constraints): Test address_operand for
17661 CT_ADDRESS constraints.
17662
17663 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17664
17665 PR target/83712
17666 * lra-assigns.c (assign_by_spills): Return a flag of reload
17667 assignment failure. Do not process the reload assignment
17668 failures. Do not spill other reload pseudos if they has the same
17669 reg class.
17670 (lra_assign): Add a return arg. Set up from the result of
17671 assign_by_spills call.
17672 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17673 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17674 usage_insns if it is not NULL.
17675 (spill_hard_reg_in_range): New function.
17676 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17677 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17678 function prototypes.
17679 (lra_assign): Change prototype.
17680 * lra.c (lra): Add code to deal with fails by splitting hard reg
17681 live ranges.
17682
17683 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17684
17685 PR target/83193
17686 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17687 Accept complain bool parameter. Only emit errors if it is true.
17688 (arm_parse_cpu_option_name): Likewise.
17689 (arm_target_thumb_only): Adjust callers of the above.
17690 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17691 prototype to take a default true bool parameter.
17692 (arm_parse_arch_option_name): Likewise.
17693
17694 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17695 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17696
17697 PR jit/64089
17698 PR jit/84288
17699 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17700 * configure: Regenerate.
17701 * configure.ac ("linker --version-script option"): New.
17702 ("linker soname option"): New.
17703
17704 2018-03-09 Richard Biener <rguenther@suse.de>
17705
17706 PR tree-optimization/84775
17707 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17708 immediate uses of predicate stmts and mark them modified.
17709
17710 Revert
17711 PR tree-optimization/84178
17712 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17713 to caller.
17714 (version_loop_for_if_conversion): Delay update_ssa call.
17715 (tree_if_conversion): Delay update_ssa until after predicate
17716 insertion.
17717
17718 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17719
17720 PR target/84763
17721 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17722 when the function accesses prior frames.
17723
17724 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17725
17726 PR debug/84456
17727 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17728 gen_llsym, otherwise call maybe_gen_llsym.
17729
17730 PR inline-asm/84742
17731 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17732 has ',' character inside of it.
17733
17734 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17735
17736 PR target/84748
17737 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17738 as clobbering CC_REGNUM.
17739
17740 2018-03-08 Richard Biener <rguenther@suse.de>
17741
17742 PR middle-end/84552
17743 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17744 (follow_copies_to_constant): Do not follow SSA names registered
17745 for update.
17746
17747 2018-03-08 Richard Biener <rguenther@suse.de>
17748
17749 PR tree-optimization/84178
17750 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17751 to caller.
17752 (version_loop_for_if_conversion): Delay update_ssa call.
17753 (tree_if_conversion): Delay update_ssa until after predicate
17754 insertion.
17755
17756 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17757
17758 PR tree-optimization/84178
17759 * tree-if-conv.c (release_bb_predicate): Remove the
17760 the assertion that the stmts have NULL use_ops.
17761 Discard the statements, asserting that they haven't
17762 yet been added to a BB.
17763
17764 2018-03-08 Richard Biener <rguenther@suse.de>
17765
17766 PR tree-optimization/84746
17767 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17768 (phi_translate): Pass in destination ANTIC_OUT set.
17769 (phi_translate_1): Likewise. For a simplified result lookup
17770 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17771 (phi_translate_set): Adjust.
17772 (do_pre_regular_insertion): Likewise.
17773 (do_pre_partial_partial_insertion): Likewise.
17774
17775 2018-03-08 Martin Liska <mliska@suse.cz>
17776
17777 PR gcov-profile/84735
17778 * doc/gcov.texi: Document usage of profile files.
17779 * gcov-io.h: Document changes in the format.
17780
17781 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17782
17783 PR debug/84404
17784 PR debug/84408
17785 * dwarf2out.c (struct dw_line_info_table): Update comments for
17786 view == -1.
17787 (FORCE_RESET_NEXT_VIEW): New.
17788 (FORCE_RESETTING_VIEW_P): New.
17789 (RESETTING_VIEW_P): Check for -1 too.
17790 (ZERO_VIEW_P): Likewise.
17791 (new_line_info_table): Force-reset next view.
17792 (dwarf2out_begin_function): Likewise.
17793 (dwarf2out_source_line): Simplify zero_view_p initialization.
17794 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17795 view directly. Omit view when omitting .loc at line 0.
17796
17797 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17798
17799 PR tree-optimization/84740
17800 * tree-switch-conversion.c (process_switch): Call build_constructors
17801 only if info.phi_count is non-zero.
17802
17803 PR tree-optimization/84739
17804 * tree-tailcall.c (find_tail_calls): Check call arguments against
17805 DECL_ARGUMENTS (current_function_decl) rather than
17806 DECL_ARGUMENTS (func) when checking for tail recursion.
17807
17808 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17809
17810 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17811 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17812 Volker Reichelt's entry and add entries for people that perform
17813 GCC fuzzy testing and report numerous bugs.
17814
17815 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17816
17817 PR target/82411
17818 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17819 readonly data in sdata, if that is disabled.
17820 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17821 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17822 -mreadonly-in-sdata option.
17823
17824 2018-03-07 Martin Sebor <msebor@redhat.com>
17825
17826 PR tree-optimization/84468
17827 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17828 basic block when looking for nul assignment.
17829
17830 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17831
17832 PR target/84277
17833 * except.h (output_function_exception_table): Adjust prototype.
17834 * except.c (output_function_exception_table): Remove FNNAME parameter
17835 and add SECTION parameter. Ouput one part of the table at a time.
17836 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17837 the first part of the exception table and emit unwind directives.
17838 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17839 (i386_pe_seh_cold_init): Likewise.
17840 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17841 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17842 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17843 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17844 * config/i386/winnt.c: Include except.h.
17845 (struct seh_frame_state): Add reg_offset, after_prologue and
17846 in_cold_section fields.
17847 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17848 (i386_pe_seh_cold_init): New function.
17849 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17850 to seh->in_cold_section.
17851 (seh_emit_push): Record the offset of the push.
17852 (seh_emit_save): Record the offet of the save.
17853 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17854 Test seh->after_prologue to disregard the epilogue.
17855 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17856 (i386_pe_end_cold_function): New function.
17857
17858 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17859
17860 PR fortran/84565
17861 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17862 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17863
17864 PR c++/84704
17865 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17866 on tmp_var.
17867 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17868 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17869
17870 PR middle-end/84723
17871 * multiple_target.c: Include tree-inline.h and intl.h.
17872 (expand_target_clones): Diagnose and fail if node->definition and
17873 !tree_versionable_function_p (node->decl).
17874
17875 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17876
17877 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17878 sprint_ul.
17879 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17880 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17881 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17882
17883 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17884
17885 PR target/84710
17886 * combine.c (try_combine): Use reg_or_subregno instead of handling
17887 just paradoxical SUBREGs and REGs.
17888
17889 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17890
17891 * config/arc/arc.c (arc_finalize_pic): Remove function.
17892 (arc_must_save_register): We use single base PIC register, remove
17893 checks to save/restore the PIC register.
17894 (arc_expand_prologue): Likewise.
17895 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17896 Remove.
17897 (arc_verify_short): Likewise.
17898 (arc_attr_type): Likewise.
17899 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17900 (walk_stores): Likewise.
17901 (arc_address_cost): Make it static.
17902 (arc_verify_short): Likewise.
17903 (branch_dest): Likewise.
17904 (arc_attr_type): Likewise.
17905 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17906 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17907 (arc_final_prescan_insn): Remove inserting the nops due to
17908 hardware hazards. It is done in reorg step.
17909 (insn_length_variant_t): Remove.
17910 (insn_length_parameters_t): Likewise.
17911 (arc_insn_length_parameters): Likewise.
17912 (arc_get_insn_variants): Likewise.
17913 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17914
17915 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17916
17917 PR inline-asm/84683
17918 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17919 assertion failure.
17920
17921 PR tree-optimization/84687
17922 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17923 on new_node->decl.
17924 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17925
17926 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17927
17928 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17929 Rename to ppc_speculation_barrier.
17930 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17931 __builtin_ppc_speculation_barrier.
17932
17933 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17934
17935 PR target/84700
17936 * combine.c (combine_simplify_rtx): Don't try to simplify if
17937 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17938 are equal to x.
17939
17940 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17941
17942 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17943 to 32 bytes when compiling for POWER9.
17944
17945 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17946
17947 PR target/84564
17948 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17949 regparm >= 3 with no arg reg available also for calls with
17950 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17951
17952 PR target/84524
17953 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17954 orig,vex.
17955 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17956
17957 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17958
17959 PR target/84264
17960 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17961
17962 2018-03-05 Richard Biener <rguenther@suse.de>
17963
17964 PR tree-optimization/84486
17965 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17966 When inserting a __builtin_assume_aligned call set the LHS
17967 SSA name alignment info accordingly.
17968
17969 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17970
17971 PR tree-optimization/84114
17972 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17973 Avoid reassociation of FLOAT_MODE addition.
17974
17975 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17976
17977 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17978 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17979 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17980 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17981 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17982 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17983 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17984 and -mwbnoinvd.
17985 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17986 __builtin_ia32_wbinvd): New builtins.
17987 (SPECIAL_ARGS2): New.
17988 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17989 (SPECIAL_ARGS2): New.
17990 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17991 (ix86_valid_target_attribute_inner_p): Ditto.
17992 (ix86_init_mmx_sse_builtins): Add special_args2.
17993 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17994 TARGET_WBNOINVD_P): New.
17995 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17996 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17997 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17998 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17999 * config/i386/pconfigintrin.h: New file.
18000 * config/i386/wbnoinvdintrin.h: Ditto.
18001 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
18002 wbnoinvdintrin.h.
18003 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
18004
18005 2018-03-05 Richard Biener <rguenther@suse.de>
18006
18007 PR tree-optimization/84670
18008 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18009 member.
18010 (BB_VISITED_WITH_VISITED_SUCCS): New define.
18011 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18012 (compute_antic_aux): Only assert the number of values in ANTIC_IN
18013 doesn't grow if all successors (recursively) were visited at least
18014 once.
18015
18016 2018-03-05 Richard Biener <rguenther@suse.de>
18017
18018 PR tree-optimization/84650
18019 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
18020 if executed in the loop pipeline.
18021
18022 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
18023
18024 * doc/configfiles.texi (Configuration Files): Move info about
18025 conditionalizing $target-protos.h to...
18026 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
18027 differs from $target-protos.h.
18028
18029 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
18030 Chung-Ju Wu <jasonwucj@gmail.com>
18031
18032 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
18033 * config/nds32/nds32-multiple.md (setmemsi): Define.
18034 * config/nds32/nds32-memory-manipulation.c
18035 (nds32_gen_dup_4_byte_to_word_value): New.
18036 (emit_setmem_word_loop): New.
18037 (emit_setmem_byte_loop): New.
18038 (nds32_expand_setmem_loop): New.
18039 (nds32_expand_setmem_loop_v3m): New.
18040 (nds32_expand_setmem_unroll): New.
18041 (nds32_expand_setmem): New.
18042
18043 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18044 Chung-Ju Wu <jasonwucj@gmail.com>
18045
18046 * config/nds32/nds32-memory-manipulation.c
18047 (nds32_emit_load_store): New.
18048 (nds32_emit_post_inc_load_store): New.
18049 (nds32_emit_mem_move): New.
18050 (nds32_emit_mem_move_block): New.
18051 (nds32_expand_movmemsi_loop_unknown_size): New.
18052 (nds32_expand_movmemsi_loop_known_size): New.
18053 (nds32_expand_movmemsi_loop): New.
18054 (nds32_expand_movmemsi_unroll): New.
18055 (nds32_expand_movmemqi): Rename ...
18056 (nds32_expand_movmemsi): ... to this.
18057 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
18058 (movmemsi): ... to this.
18059 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
18060 (nds32_expand_movmemsi): ... to this.
18061
18062 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18063 Monk Chiang <sh.chiang04@gmail.com>
18064 Chung-Ju Wu <jasonwucj@gmail.com>
18065
18066 * config/nds32/nds32-protos.h
18067 (nds32_expand_load_multiple): New arguments.
18068 (nds32_expand_store_multiple): Ditto.
18069 (nds32_valid_multiple_load_store): Rename ...
18070 (nds32_valid_multiple_load_store_p): ... to this.
18071 * config/nds32/nds32-memory-manipulation.c
18072 (nds32_expand_load_multiple): Refine implementation.
18073 (nds32_expand_store_multiple): Ditto.
18074 * config/nds32/nds32-multiple.md
18075 (load_multiple): Update nds32_expand_load_multiple interface.
18076 (store_multiple): Update nds32_expand_store_multiple interface.
18077 * config/nds32/nds32-predicates.c
18078 (nds32_valid_multiple_load_store): Rename ...
18079 (nds32_valid_multiple_load_store_p): ... to this and refine
18080 implementation.
18081 * config/nds32/predicates.md
18082 (nds32_load_multiple_and_update_address_operation): New predicate.
18083 (nds32_store_multiple_and_update_address_operation): New predicate.
18084
18085 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18086 Chung-Ju Wu <jasonwucj@gmail.com>
18087
18088 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
18089 (combo): New attribute.
18090 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
18091
18092 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
18093
18094 * config/nds32/nds32.opt: Change -mcmodel= default value.
18095
18096 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
18097 Monk Chiang <sh.chiang04@gmail.com>
18098 Chung-Ju Wu <jasonwucj@gmail.com>
18099
18100 * config/nds32/constants.md (unspec_element): New enum.
18101 * config/nds32/constraints.md (Umw): New constraint.
18102 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
18103 * config/nds32/nds32-intrinsic.md: Likewise.
18104 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
18105 (nds32_valid_smw_lwm_base_p): New.
18106 (nds32_output_smw_single_word): New.
18107 (nds32_output_lmw_single_word): New.
18108 (nds32_expand_unaligned_load): New.
18109 (nds32_expand_unaligned_store): New.
18110 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
18111 (nds32_output_smw_single_word): Declare.
18112 (nds32_output_lmw_single_word): Declare.
18113 (nds32_expand_unaligned_load): Declare.
18114 (nds32_expand_unaligned_store): Declare.
18115 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
18116 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
18117 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
18118 NDS32_BUILTIN_UASTORE_DW.
18119 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
18120 predicate.
18121
18122 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
18123 Kito Cheng <kito.cheng@gmail.com>
18124 Chung-Ju Wu <jasonwucj@gmail.com>
18125
18126 * config/nds32/nds32-intrinsic.c
18127 (nds32_expand_builtin_null_ftype_reg): Delete.
18128 (nds32_expand_builtin_reg_ftype_imm): Ditto.
18129 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
18130 (nds32_read_argument): New.
18131 (nds32_legitimize_target): Ditto.
18132 (nds32_legitimize_argument): Ditto.
18133 (nds32_check_constant_argument): Ditto.
18134 (nds32_expand_unop_builtin): Ditto.
18135 (nds32_expand_unopimm_builtin): Ditto.
18136 (nds32_expand_binop_builtin): Ditto.
18137 (nds32_builtin_decl_impl): Ditto.
18138 (builtin_description): Ditto.
18139 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
18140 (nds32_init_builtins_impl): Ditto.
18141 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
18142 (nds32_builtin_decl): New.
18143 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
18144 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
18145
18146 2018-03-02 Jeff Law <law@redhat.com>
18147
18148 * reorg.c (stop_search_p): Handle DEBUG_INSN.
18149 (redundant_insn, fill_simple_delay_slots): Likewise.
18150 (fill_slots_from_thread): Likewise.
18151 * resource.c (mark_referenced_resources): Likewise.
18152 (mark_set_resources, find_dead_or_set_registers): Likewise.
18153
18154 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18155
18156 * substring-locations.h (format_warning_va): Formatting fix for
18157 ATTRIBUTE_GCC_DIAG.
18158 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
18159 argument.
18160 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
18161 * substring-locations.c: Include intl.h.
18162 (format_warning_va): Turned into small wrapper around
18163 format_warning_n_va, renamed to ...
18164 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
18165 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
18166 use ngettext.
18167 (format_warning_at_substring_n): New function.
18168 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
18169 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
18170 format_warning_at_substring with just a shorter name instead of
18171 const function pointer.
18172 (fmtwarn_n): New function.
18173 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
18174 appropriate, get rid of all the fmtstr temporaries, move conditionals
18175 with G_() wrapped string literals directly into fmtwarn arguments,
18176 cast dir.len to (int), formatting fixes.
18177
18178 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
18179
18180 * doc/invoke.texi: Remove "Cilk Plus" references.
18181
18182 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18183 Richard Biener <rguenther@suse.de>
18184
18185 PR ipa/84628
18186 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
18187 for error or warning attributes if CALL_FROM_THUNK_P is set.
18188 Formatting fixes.
18189
18190 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18191
18192 PR target/56540
18193 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
18194 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
18195
18196 PR target/56540
18197 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
18198 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
18199
18200 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
18201 instead of -1U in last predictors element's probability member.
18202
18203 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18204
18205 PR ipa/83983
18206 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18207 arguments if they are comparable.
18208
18209 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18210
18211 PR tree-optimization/84634
18212 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
18213 masks and masked_loop_p with a single loop_masks, making sure it's
18214 null for bb vectorization.
18215
18216 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18217
18218 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
18219 (vect_analyze_data_ref_access): Use loop->safe_len rather than
18220 loop->force_vectorize to check whether there is no alias.
18221
18222 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18223
18224 PR target/84614
18225 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
18226 prototypes.
18227 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
18228 comments.
18229 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
18230 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
18231 instead of a loop around prev_real_insn.
18232 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
18233 prev_real_insn.
18234
18235 PR inline-asm/84625
18236 * config/i386/i386.c (ix86_print_operand): Use conditional
18237 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
18238 zero vector.
18239
18240 2018-03-02 Richard Biener <rguenther@suse.de>
18241
18242 PR tree-optimization/84427
18243 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
18244 (bitmap_set_subtract_values): Rewrite to handle multiple
18245 exprs per value.
18246 (clean): Likewise.
18247 (prune_clobbered_mems): Likewise.
18248 (phi_translate): Take edge instead of pred/phiblock.
18249 (phi_translate_1): Likewise.
18250 (phi_translate_set): Likewise. Insert all translated
18251 exprs for a value into the set, keeping possibly multiple
18252 expressions per value.
18253 (compute_antic_aux): Adjust for phi_translate changes.
18254 When intersecting union the expressions and prune those
18255 not in the final value set, keeping possibly multiple
18256 expressions per value. Do not use value-insertion
18257 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
18258 all expressions. Add verification that the value-sets
18259 only shrink during iteration.
18260 (compute_partial_antic_aux): Adjust for the phi_translate changes.
18261 (do_pre_regular_insertion): Likewise.
18262 (do_pre_partial_partial_insertion): Likewise.
18263
18264 2018-03-02 Richard Biener <rguenther@suse.de>
18265
18266 PR target/82005
18267 * config/darwin.c (saved_debug_info_level): New static global.
18268 (darwin_asm_lto_start): Disable debug info generation for LTO out.
18269 (darwin_asm_lto_end): Restore debug info generation settings.
18270
18271 2018-03-01 Martin Liska <mliska@suse.cz>
18272
18273 PR sanitizer/82484
18274 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
18275 volatile arguments.
18276
18277 2018-03-01 Richard Biener <rguenther@suse.de>
18278
18279 PR debug/84645
18280 * dwarf2out.c (gen_variable_die): Properly handle late VLA
18281 type annotation with LTO when debug was disabled at compile-time.
18282
18283 2018-03-01 Matthew Fortune <mfortune@gmail.com>
18284
18285 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
18286 XINT with INTVAL.
18287 (mips_final_postscan_insn): Likewise.
18288
18289 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
18290
18291 PR rtl-optimization/84528
18292 * alias.c (init_alias_target): Add commentary.
18293 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
18294 a unique base value if the frame pointer is not eliminated
18295 to the stack pointer.
18296
18297 2018-03-01 Tom de Vries <tom@codesourcery.com>
18298
18299 PR rtl-optimization/83327
18300 * lra-int.h (hard_regs_spilled_into): Declare.
18301 * lra.c (hard_regs_spilled_into): Define.
18302 (init_reg_info): Init hard_regs_spilled_into.
18303 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
18304 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
18305 (process_bb_lives): Handle hard_regs_spilled_into.
18306 (lra_create_live_ranges_1): Before doing liveness propagation, clear
18307 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
18308
18309 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
18310
18311 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
18312 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
18313 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
18314 * config/rs6000/aix72.h: New file.
18315
18316 2018-02-28 Jakub Jelinek <jakub@redhat.com>
18317
18318 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
18319 instead of warning_at with conditional singular and plural messages
18320 where possible.
18321
18322 PR target/52991
18323 * stor-layout.c (update_alignment_for_field): For
18324 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
18325 && !DECL_PACKED (field), do the alignment update, just use
18326 only desired_align instead of MAX (type_align, desired_align)
18327 as the alignment.
18328 (place_field): Don't do known_align < desired_align handling
18329 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
18330 is non-NULL, instead do it after rli->prev_field handling and
18331 only if not within a bitfield word. For DECL_PACKED (field)
18332 use type_align of BITS_PER_UNIT.
18333
18334 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
18335
18336 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18337 superfluous parentheses and trailing spaces.
18338
18339 2018-02-28 Richard Biener <rguenther@suse.de>
18340
18341 PR tree-optimization/84584
18342 * graphite-scop-detection.c (scop_detection::add_scop): Discard
18343 SCoPs with fake exit edge.
18344
18345 2018-02-28 Martin Liska <mliska@suse.cz>
18346
18347 PR testsuite/84597
18348 * timevar.c (timer::print): Fix format to properly print 100%
18349 values.
18350
18351 2018-02-28 Richard Biener <rguenther@suse.de>
18352
18353 PR middle-end/84607
18354 * genmatch.c (capture_info::walk_match): Do not mark
18355 captured expressions without operands as expr_p given
18356 they act more like predicates and should be subject to
18357 "lost tail" side-effect preserving.
18358
18359 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
18360
18361 PR rtl-optimization/81611
18362 * auto-inc-dec.c (attempt_change): Move dead note from
18363 mem_insn if it's the next use of regno
18364 (find_address): Take address use of reg holding
18365 non-incremented value. Add parm to limit search to the named
18366 reg only.
18367 (merge_in_block): Attempt to use a mem insn that is the next
18368 use of the original regno.
18369
18370 2018-02-27 Martin Sebor <msebor@redhat.com>
18371
18372 PR c++/83871
18373 * doc/invoke.texi (-Wmissing-attributes): New option.
18374 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18375
18376 2018-02-27 Martin Sebor <msebor@redhat.com>
18377
18378 PR translation/84207
18379 * diagnostic-core.h (warning_n, error_n, inform_n): Change
18380 n argument to unsigned HOST_WIDE_INT.
18381 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18382 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
18383 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18384 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18385
18386 2018-02-27 Richard Biener <rguenther@suse.de>
18387
18388 PR tree-optimization/84512
18389 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18390 Do not use the estimate returned from record_stmt_cost for
18391 the scalar iteration cost but sum properly using add_stmt_cost.
18392
18393 2018-02-27 Richard Biener <rguenther@suse.de>
18394
18395 PR tree-optimization/84466
18396 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18397 Adjust last change to less strictly validate use operands.
18398
18399 2018-02-27 Martin Liska <mliska@suse.cz>
18400
18401 PR gcov-profile/84548
18402 * gcov.c (process_file): Allow partial overlap and consider it
18403 also as group functions.
18404 (output_lines): Properly calculate range of lines for a group.
18405
18406 2018-02-27 Martin Liska <mliska@suse.cz>
18407
18408 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18409 'ggc' suffixes. Change first column width.
18410 (timer::print): Fix formatting of the column.
18411
18412 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
18413
18414 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18415 preserve inline entry blocks for the sake of debug inline
18416 entry point markers alone.
18417 (remove_unused_locals): Suggest in comments a better place to
18418 force the preservation of inline entry blocks that are
18419 otherwise unused, but do not preserve them.
18420
18421 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18422
18423 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18424
18425 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18426
18427 PR target/84039
18428 * config/i386/constraints.md (Bs): Replace
18429 ix86_indirect_branch_register with
18430 TARGET_INDIRECT_BRANCH_REGISTER.
18431 (Bw): Likewise.
18432 * config/i386/i386.md (indirect_jump): Likewise.
18433 (tablejump): Likewise.
18434 (*sibcall_memory): Likewise.
18435 (*sibcall_value_memory): Likewise.
18436 Peepholes of indirect call and jump via memory: Likewise.
18437 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18438 (*sibcall_value_GOT_32): Likewise.
18439 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18440 (GOT_memory_operand): Likewise.
18441 (call_insn_operand): Likewise.
18442 (sibcall_insn_operand): Likewise.
18443 (GOT32_symbol_operand): Likewise.
18444 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18445
18446 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18447
18448 PR rtl-optimization/83496
18449 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18450 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
18451 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18452 redundant insn, if any.
18453 (relax_delay_slots): Likewise.
18454 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18455
18456 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
18457
18458 PR tree-optimization/83965
18459 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18460 that grouped statements are part of a reduction chain. Return
18461 true if the statement is not marked as a reduction itself but
18462 is part of a group.
18463 (vect_recog_dot_prod_pattern): Don't check whether the statement
18464 is part of a group here.
18465 (vect_recog_sad_pattern): Likewise.
18466 (vect_recog_widen_sum_pattern): Likewise.
18467
18468 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18469
18470 PR debug/84545
18471 * final.c (rest_of_clean_state): Also look for calls inside sequences.
18472
18473 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18474
18475 PR target/84530
18476 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18477 the bool argument.
18478 (ix86_output_indirect_function_return): New prototype.
18479 (ix86_split_simple_return_pop_internal): Likewise.
18480 * config/i386/i386.c (indirect_return_via_cx): New.
18481 (indirect_return_via_cx_bnd): Likewise.
18482 (indirect_thunk_name): Handle return va CX_REG.
18483 (output_indirect_thunk_function): Create alias for
18484 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18485 (ix86_output_indirect_jmp): Remove the bool argument.
18486 (ix86_output_indirect_function_return): New function.
18487 (ix86_split_simple_return_pop_internal): Likewise.
18488 * config/i386/i386.md (*indirect_jump): Don't pass false
18489 to ix86_output_indirect_jmp.
18490 (*tablejump_1): Likewise.
18491 (simple_return_pop_internal): Change it to define_insn_and_split.
18492 Call ix86_split_simple_return_pop_internal to split it for
18493 -mfunction-return=.
18494 (simple_return_indirect_internal): Call
18495 ix86_output_indirect_function_return instead of
18496 ix86_output_indirect_jmp.
18497
18498 2018-02-26 Jakub Jelinek <jakub@redhat.com>
18499
18500 PR bootstrap/84405
18501 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18502 memset and value initialization afterwards.
18503
18504 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
18505
18506 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18507
18508 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18509
18510 PR target/84521
18511 * common/config/aarch64/aarch64-common.c
18512 (aarch_option_optimization_table[]): Switch
18513 off fomit-frame-pointer
18514
18515 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18516 Chung-Ju Wu <jasonwucj@gmail.com>
18517
18518 * config/nds32/nds32-multiple.md (load_multiple): Disallow
18519 volatile memory.
18520 (store_multiple): Ditto.
18521
18522 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18523
18524 * config.gcc: Add --with-cpu support for nds32 target.
18525 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18526 * config/nds32/nds32.opt: Add -mcpu= option.
18527
18528 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
18529
18530 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18531 isel=yes): Warn for these deprecated options.
18532
18533 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
18534
18535 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18536 ISA_2_5_MASKS_EMBEDDED.
18537
18538 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18539
18540 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18541 p->max as pointers rather than using iterative_hash_expr.
18542
18543 2018-02-23 Carl Love <cel@us.ibm.com>
18544
18545 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18546 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18547 BU_P8V_OVERLOAD_2.
18548 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18549 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18550 P8V_BUILTIN_VEC_VUNSIGNED2.
18551
18552 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18553
18554 PR target/81572
18555 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18556 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18557 LRA_UNKNOWN_ALT.
18558 * lra-constraints.c (curr_insn_transform): Set up
18559 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18560 LRA_UNKNOWN_ALT.
18561 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18562 * lra-eliminations.c (spill_pseudos): Ditto.
18563 (process_insn_for_elimination): Ditto.
18564 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18565 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18566 LRA_NON_CLOBBERED_ALT.
18567
18568 2018-02-22 Martin Sebor <msebor@redhat.com>
18569
18570 PR tree-optimization/84480
18571 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18572 to maybe_diag_stxncpy_trunc. Call it.
18573 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18574 from gimple_fold_builtin_strcpy. Print inlining stack.
18575 (handle_builtin_stxncpy): Print inlining stack.
18576 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18577
18578 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18579
18580 PR target/84176
18581 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18582 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18583 and -fcheck-pointer-bounds are used together.
18584 (indirect_thunk_prefix): New enum.
18585 (indirect_thunk_need_prefix): New function.
18586 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18587 "_nt" instead of "_bnd" for NOTRACK prefix.
18588 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18589 (output_indirect_thunk_function): Likewise.
18590 (): Likewise.
18591 (ix86_code_end): Update output_indirect_thunk_function calls.
18592 (ix86_output_indirect_branch_via_reg): Replace
18593 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18594 (ix86_output_indirect_branch_via_push): Likewise.
18595 (ix86_output_function_return): Likewise.
18596 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18597 incompatible with -fcf-protection=branch and
18598 -fcheck-pointer-bounds.
18599
18600 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18601
18602 PR target/83335
18603 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18604 Change gcc_assert call to output_operand_lossage.
18605
18606 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18607
18608 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18609
18610 2018-02-22 DJ Delorie <dj@redhat.com>
18611 Sebastian Perta <sebastian.perta@renesas.com>
18612 Oleg Endo <olegendo@gcc.gnu.org>
18613
18614 * config/rx/rx.c (rx_rtx_costs): New function.
18615 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18616
18617 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18618
18619 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18620
18621 2018-02-22 Martin Liska <mliska@suse.cz>
18622
18623 PR driver/83193
18624 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18625 Add "native" as a possible value.
18626
18627 2018-02-22 Martin Liska <mliska@suse.cz>
18628
18629 PR driver/83193
18630 * config/i386/i386.c (ix86_option_override_internal):
18631 Add "native" as a possible value for -march and -mtune.
18632
18633 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18634
18635 PR target/84502
18636 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18637 to all type variants.
18638
18639 PR tree-optimization/84503
18640 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18641 width as info->bitpos + info->bitsize - start.
18642 (merged_store_group::merge_overlapping): Simplify width computation.
18643 (check_no_overlap): New function.
18644 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18645 start + width and last_order of the group, fail if check_no_overlap
18646 fails.
18647 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18648 to group if check_no_overlap fails.
18649
18650 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18651
18652 * config/rs6000/altivec.md: Delete contraint arguments to
18653 define_expand, define_split, and define_peephole2, and in
18654 define_insn_and_split if always unused.
18655 * config/rs6000/darwin.md: Ditto.
18656 * config/rs6000/dfp.md: Ditto.
18657 * config/rs6000/rs6000.md: Ditto.
18658 * config/rs6000/sync.md: Ditto.
18659 * config/rs6000/vector.md: Ditto.
18660 * config/rs6000/vsx.md: Ditto.
18661
18662 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18663
18664 * config/rs6000/altivec.md: Write output control strings as braced
18665 blocks instead of double-quoted strings.
18666 * config/rs6000/darwin.md: Ditto.
18667 * config/rs6000/rs6000.md: Ditto.
18668 * config/rs6000/vector.md: Ditto.
18669 * config/rs6000/vsx.md: Ditto.
18670
18671 2018-02-21 Jason Merrill <jason@redhat.com>
18672
18673 PR c++/84314 - ICE with templates and fastcall attribute.
18674 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18675
18676 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18677
18678 * ipa-cp.c (determine_versionability): Fix comment typos.
18679
18680 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18681
18682 PR c/84229
18683 * ipa-cp.c (determine_versionability): Do not version functions caling
18684 va_arg_pack.
18685
18686 2018-02-21 Martin Liska <mliska@suse.cz>
18687
18688 PR driver/83193
18689 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18690 Add "native" as a possible value.
18691 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18692 the macro when native cpu detection is available.
18693
18694 2018-02-21 Martin Liska <mliska@suse.cz>
18695
18696 PR driver/83193
18697 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18698 Add "native" as a possible value.
18699 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18700 when native cpu detection is available.
18701
18702 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18703 Martin Sebor <msebor@redhat.com>
18704
18705 PR tree-optimization/84478
18706 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18707 false.
18708 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18709 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18710 support which is conservatively correct, for 2 only stay conservative
18711 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18712 argument to the 2 argument get_range_strlen, adjust 6 arg
18713 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18714 false.
18715 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18716 (gimple_fold_builtin_strlen): Pass true as last argument to
18717 get_range_strlen.
18718
18719 2018-02-20 Martin Sebor <msebor@redhat.com>
18720
18721 PR middle-end/84095
18722 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18723 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18724 (builtin_memref::builtin_memref): Factor out parts into
18725 set_base_and_offset and call it.
18726
18727 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18728
18729 PR middle-end/84406
18730 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18731 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18732 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18733 search at the associated MODE_INT.
18734
18735 2018-02-20 Jeff Law <law@redhat.com>
18736
18737 PR middle-end/82123
18738 PR tree-optimization/81592
18739 PR middle-end/79257
18740 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18741 for range data rather than using global data.
18742 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18743 range data rather than using global data.
18744 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18745 pass it to children as needed.
18746 (struct directive::fmtresult): Similarly.
18747 (struct directive::set_width): Similarly.
18748 (struct directive::set_precision): Similarly.
18749 (format_integer, format_directive, parse_directive): Similarly.
18750 (format_none): Accept unnamed vr_values parameter.
18751 (format_percent, format_floating, format_character): Similarly.
18752 (format_string, format_plain): Similarly.
18753 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18754 the EVRP range analyzer for range data rather than using global data.
18755 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18756 gimple-ssa-evrp-analyze.h
18757 (class sprintf_dom_walker): Add after_dom_children member function.
18758 Add evrp_range_analyzer member.
18759 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18760 range analyzer as needed.
18761 (sprintf_dom_walker::after_dom_children): New member function.
18762 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18763 if not optimizing.
18764 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18765 (evrp_range_analyzer::pop_to_marker): Likewise.
18766
18767 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18768
18769 PR tree-optimization/84419
18770 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18771 with the required type if its current type is compatible but
18772 different.
18773
18774 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18775
18776 PR middle-end/82004
18777 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18778 after vectorization.
18779
18780 2018-02-20 Martin Liska <mliska@suse.cz>
18781
18782 PR driver/83193
18783 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18784 possible values if we don't have a hint.
18785
18786 2018-02-20 Martin Liska <mliska@suse.cz>
18787
18788 PR c/84310
18789 PR target/79747
18790 * final.c (shorten_branches): Build align_tab array with one
18791 more element.
18792 * opts.c (finish_options): Add alignment option limit check.
18793 (MAX_CODE_ALIGN): Likewise.
18794 (MAX_CODE_ALIGN_VALUE): Likewise.
18795 * doc/invoke.texi: Document maximum allowed option value for
18796 all -falign-* options.
18797
18798 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18799
18800 PR target/84146
18801 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18802 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18803 * var-tracking.c (emit_note_insn_var_location): Remove all references
18804 to NOTE_INSN_CALL_ARG_LOCATION.
18805 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18806 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18807 Use copy_rtx_if_shared.
18808 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18809 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18810 (dwarf2out_var_location): Remove handling of
18811 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18812 on call_insn.
18813 * final.c (final_scan_insn): Remove all references to
18814 NOTE_INSN_CALL_ARG_LOCATION.
18815 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18816 before dumping final insns.
18817 * except.c (emit_note_eh_region_end): Remove all references to
18818 NOTE_INSN_CALL_ARG_LOCATION.
18819 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18820 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18821 * config/arc/arc.c (hwloop_optimize): Likewise.
18822 * config/arm/arm.c (create_fix_barrier): Likewise.
18823 * config/s390/s390.c (s390_chunkify_start): Likewise.
18824 * config/sh/sh.c (find_barrier): Likewise.
18825 * config/i386/i386.c (rest_of_insert_endbranch,
18826 ix86_seh_fixup_eh_fallthru): Likewise.
18827 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18828 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18829 * config/frv/frv.c (frv_function_prologue): Likewise.
18830 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18831 reg note.
18832 (note_outside_basic_block_p): Remove all references to
18833 NOTE_INSN_CALL_ARG_LOCATION.
18834 * gengtype.c (adjust_field_rtx_def): Likewise.
18835 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18836 Likewise.
18837 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18838 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18839
18840 PR c++/84444
18841 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18842 is ADDR_EXPR.
18843
18844 PR tree-optimization/84452
18845 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18846 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18847 is NULL.
18848
18849 2018-02-19 Martin Liska <mliska@suse.cz>
18850
18851 PR sanitizer/82183
18852 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18853
18854 2018-02-19 Martin Liska <mliska@suse.cz>
18855 Richard Sandiford <richard.sandiford@linaro.org>
18856
18857 PR tree-optimization/82491
18858 * gimple-fold.c (get_base_constructor): Make earlier bail out
18859 to prevent ubsan.
18860
18861 2018-02-19 Carl Love <cel@us.ibm.com>
18862
18863 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18864 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18865 BU_P8V_OVERLOAD_1.
18866 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18867 P8V_BUILTIN_VEC_NEG.
18868
18869 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18870
18871 * config/rl78/rl78.md (movdf): New define expand.
18872
18873 2018-02-19 Martin Liska <mliska@suse.cz>
18874
18875 PR other/80589
18876 * doc/invoke.texi: Fix typo.
18877 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18878
18879 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18880
18881 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18882 handle rs6000_single_float and rs6000_double_float specially for
18883 e500 family CPUs.
18884
18885 2018-02-16 Jeff Law <law@redhat.com>
18886
18887 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18888 (pop_regs): Use it.
18889
18890 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18891
18892 PR ipa/84425
18893 * ipa-inline.c (inline_small_functions): Fix a typo.
18894
18895 2018-02-16 Nathan Sidwell <nathan@acm.org>
18896
18897 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18898
18899 2018-02-16 Carl Love <cel@us.ibm.com>
18900
18901 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18902 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18903 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18904 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18905 expansion to P8V_BUILTIN_VEC_FLOAT2.
18906
18907 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18908
18909 PR rtl-optimization/70023
18910 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18911 src_regno into account.
18912
18913 2018-02-16 Carl Love <cel@us.ibm.com>
18914
18915 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18916 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18917 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18918 * config/rs6000/rs6000.c: Remove case statements for
18919 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18920 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18921 and P9V_BUILTIN_VEC_VINSERT4B.
18922 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18923 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18924 * config/rs6000/vsx.md:
18925 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18926 vec_insert4b.
18927
18928 2018-02-16 Carl Love <cel@us.ibm.com>
18929
18930 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18931 vec_insert4b.
18932 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18933 definitions.
18934 * config/rs6000/rs6000-c.c: Add the definitions for
18935 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18936 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18937 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18938 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18939 definition for insert4b and define insn *insert3b_internal.
18940 * doc/extend.texi: Add documentation for vec_extract4b.
18941
18942 2018-02-16 Nathan Sidwell <nathan@acm.org>
18943
18944 * doc/extend.texi (Backwards Compatibility): Mention friend
18945 injection. Note for-scope is deprecated.
18946 * doc/invoke.texi (-ffriend-injection): Deprecate.
18947
18948 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18949
18950 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18951 that moved to I2, also allow destinations that are a paradoxical
18952 subreg (instead of a normal reg).
18953
18954 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18955
18956 PR target/83831
18957 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18958 to QImode.
18959
18960 2018-02-16 Richard Biener <rguenther@suse.de>
18961
18962 PR tree-optimization/84037
18963 PR tree-optimization/84016
18964 PR target/82862
18965 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18966 Adjust vec_construct for the fact we need additional higher latency
18967 128bit inserts for AVX256 and AVX512 vector builds.
18968 (ix86_add_stmt_cost): Scale vector construction cost for
18969 elementwise loads.
18970
18971 2018-02-16 Richard Biener <rguenther@suse.de>
18972
18973 PR tree-optimization/84417
18974 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18975 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18976 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18977
18978 2018-02-16 Martin Liska <mliska@suse.cz>
18979
18980 PR sanitizer/84307
18981 * internal-fn.def (ASAN_CHECK): Set proper flags.
18982 (ASAN_MARK): Likewise.
18983
18984 2018-02-16 Julia Koval <julia.koval@intel.com>
18985
18986 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18987 from PTA_CANNONLAKE.
18988
18989 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18990
18991 PR target/84272
18992 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18993 Use ++iter rather than iter++ for std::list iterators.
18994 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18995 defer deleting them until all nodes in the forest are processed. Do
18996 free even leaf nodes. Change to_process into auto_vec.
18997
18998 PR bootstrap/84405
18999 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
19000 * vec.h (vec_default_construct): Use memset instead of placement new
19001 if BROKEN_VALUE_INITIALIZATION is defined.
19002 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
19003 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
19004 is defined.
19005
19006 PR rtl-optimization/83723
19007 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
19008 * lra.c (lra_substitute_pseudo): Likewise. If true, use
19009 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
19010 recursive calls.
19011 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
19012 callers.
19013 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
19014
19015 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
19016
19017 PR rtl-optimization/81443
19018 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
19019 from inner REGs to paradoxical SUBREGs.
19020
19021 2018-02-16 Richard Biener <rguenther@suse.de>
19022
19023 PR tree-optimization/84399
19024 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19025 For operands we can analyze at their definition make sure we can
19026 analyze them at each use as well.
19027
19028 2018-02-16 Richard Biener <rguenther@suse.de>
19029
19030 PR tree-optimization/84190
19031 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
19032 volatile accesses if the decl isn't volatile.
19033
19034 2018-02-15 Jason Merrill <jason@redhat.com>
19035
19036 PR c++/84314 - ICE with templates and fastcall attribute.
19037 * attribs.c (build_type_attribute_qual_variant): Don't clobber
19038 TYPE_CANONICAL on an existing type.
19039
19040 2018-02-15 Jakub Jelinek <jakub@redhat.com>
19041
19042 PR tree-optimization/84383
19043 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
19044 dstoff nor call operand_equal_p if dstbase is NULL.
19045
19046 PR tree-optimization/84334
19047 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
19048 also a CONSTANT_CLASS_P, punt.
19049
19050 2018-02-14 Jim Wilson <jimw@sifive.com>
19051
19052 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
19053 first SMALL_OPERAND check. New local min_second_step. Move assert
19054 to where locals are set. Add TARGET_RVC support.
19055 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
19056
19057 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
19058
19059 * doc/invoke.texi: Correct -Wformat-overflow code sample.
19060
19061 2018-02-14 Martin Sebor <msebor@redhat.com>
19062
19063 PR tree-optimization/83698
19064 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
19065 arrays constrain the offset range to their bounds.
19066 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
19067 (builtin_access::overlap): Avoid setting the size of overlap if it's
19068 already been set.
19069 (maybe_diag_overlap): Also consider arrays when deciding what values
19070 of offsets to include in diagnostics.
19071
19072 2018-02-14 Martin Sebor <msebor@redhat.com>
19073
19074 PR c/84108
19075 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
19076 that correspond to the kind of a declaration.
19077
19078 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
19079
19080 PR target/83984
19081 * config/pa/pa.md: Load address of PIC label using the linkage table
19082 if the label is nonlocal.
19083
19084 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
19085
19086 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
19087 warning message if user requests -maltivec=be.
19088 * doc/invoke.texi: Document deprecation of -maltivec=be.
19089
19090 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
19091
19092 PR target/84220
19093 * config/rs6000/rs6000-c.c: Update definitions for
19094 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
19095 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
19096
19097 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19098
19099 PR target/84239
19100 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
19101 add _get_ssp intrinsics. Remove argument from
19102 __builtin_ia32_rdssp[d|q].
19103 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
19104 * config/i386/i386-builtin.def: Remove argument from
19105 __builtin_ia32_rdssp[d|q].
19106 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
19107 ix86_expand_special_args_builtin for _rdssp[d|q].
19108 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
19109 Clear register before usage.
19110 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
19111 Add documentation for new _get_ssp and _inc_ssp intrinsics.
19112
19113 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
19114
19115 PR tree-optimization/84357
19116 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
19117 operand 1 of an ARRAY_REF too.
19118
19119 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
19120
19121 PR target/83831
19122 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
19123 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19124 declarations.
19125 (set_of_reg): New struct.
19126 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
19127 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
19128 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19129 functions.
19130 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
19131 Split into bitclr, bitset, bitinvert patterns if appropriate.
19132 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
19133 use rx_fuse_in_memory_bitop.
19134 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
19135 to named insn, correct maximum insn length.
19136
19137 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
19138
19139 PR target/79242
19140 * machmode.def: Define a complex mode for PARTIAL_INT.
19141 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
19142 MODE_PARTIAL_INT.
19143 * doc/rtl.texi: Document CSPImode.
19144 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
19145 handling.
19146 (msp430_hard_regno_nregs_with_padding): Likewise.
19147
19148 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
19149
19150 PR target/84279
19151 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
19152
19153 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
19154
19155 PR rtl-optimization/84169
19156 * combine.c (try_combine): New variable split_i2i3. Set it to true if
19157 we generated a parallel as new i3 and we split that to new i2 and i3
19158 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
19159 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
19160 those to i2, not i1. Partially rewrite this scan code.
19161
19162 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19163
19164 PR c/82210
19165 * stor-layout.c (place_field): For variable length fields, adjust
19166 offset_align afterwards not just based on the field's alignment,
19167 but also on the size.
19168
19169 PR middle-end/84309
19170 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
19171 of exps and logs in the use_exp2 case.
19172
19173 2018-02-13 Jeff Law <law@redhat.com>
19174
19175 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
19176 entry for "vector".
19177
19178 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
19179 ARGS as unused.
19180
19181 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
19182
19183 PR debug/84342
19184 PR debug/84319
19185 * common.opt (gas-loc-support, gas-locview-support): New.
19186 (ginline-points, ginternal-reset-location-views): New.
19187 * doc/invoke.texi: Document them. Use @itemx where intended.
19188 (gvariable-location-views): Adjust.
19189 * target.def (reset_location_view): New.
19190 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
19191 (TARGET_RESET_LOCATION_VIEW): New.
19192 * doc/tm.texi: Rebuilt.
19193 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
19194 (dwarf2out_default_as_locview_support): New.
19195 (output_asm_line_debug_info): Use option variables.
19196 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
19197 (output_loc_list): Likewise.
19198 (add_high_low_attributes): Check option variables.
19199 Don't output entry view attribute in strict mode.
19200 (gen_inlined_subroutine_die): Check option variables.
19201 (dwarf2out_inline_entry): Likewise.
19202 (init_sections_and_labels): Likewise.
19203 (dwarf2out_early_finish): Likewise.
19204 (maybe_reset_location_view): New, from...
19205 (dwarf2out_var_location): ... here. Call it.
19206 * debug.h (dwarf2out_default_as_loc_support): Declare.
19207 (dwarf2out_default_as_locview_support): Declare.
19208 * hooks.c (hook_int_rtx_insn_0): New.
19209 * hooks.h (hook_int_rtx_insn_0): Declare.
19210 * toplev.c (process_options): Take -gas-loc-support and
19211 -gas-locview-support from dwarf2out. Enable
19212 -gvariable-location-views by default only with locview
19213 assembler support. Enable -ginternal-reset-location-views by
19214 default only if the target defines the corresponding hook.
19215 Enable -ginline-points by default if location views are
19216 enabled; force it disabled if statement frontiers are
19217 disabled.
19218 * tree-inline.c (expand_call_inline): Check option variables.
19219 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
19220
19221 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
19222
19223 PR tree-optimization/84321
19224 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
19225 handling. Also check whether the anti-range contains any values
19226 that satisfy the mask; switch to a VR_RANGE if not.
19227
19228 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
19229
19230 PR sanitizer/84340
19231 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
19232
19233 2018-02-13 Martin Jambor <mjambor@suse.cz>
19234
19235 PR c++/83990
19236 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
19237 of call statements, also set location of a load to a temporary.
19238
19239 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
19240
19241 * config/rl78/rl78.c (add_vector_labels): New function.
19242 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
19243 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
19244 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
19245 which checks that no arguments are passed.
19246 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
19247 * doc/extend.texi: Documentation for the new attribute.
19248
19249 2018-02-13 Andreas Schwab <schwab@suse.de>
19250
19251 * config/riscv/linux.h (CPP_SPEC): Define.
19252
19253 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19254
19255 PR target/84335
19256 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
19257 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
19258 OPTION_MASK_ISA_AES as first argument to def_builtin_const
19259 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
19260 instead of OPTION_MASK_ISA_PCLMUL as first argument to
19261 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
19262 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
19263 temporarily for AES and PCLMUL builtins.
19264
19265 PR tree-optimization/84339
19266 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
19267 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
19268 Formatting fixes.
19269
19270 PR middle-end/84309
19271 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
19272 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
19273 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
19274 inline function.
19275 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
19276 inline function.
19277 * omp-simd-clone.h: New file.
19278 * omp-simd-clone.c: Include omp-simd-clone.h.
19279 (expand_simd_clones): No longer static.
19280 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
19281 cgraph.h and omp-simd-clone.h.
19282 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
19283 (vect_recog_widen_shift_pattern): Formatting fix.
19284 (vect_pattern_recog_1): Don't check optab for calls.
19285
19286 PR target/84336
19287 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
19288 operands[2] into a REG before using gen_lowpart on it.
19289
19290 2018-02-12 Jeff Law <law@redhat.com>
19291
19292 PR target/83760
19293 * config/sh/sh.c (find_barrier): Consider a sibling call
19294 a barrier as well.
19295
19296 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
19297 successfully back substituting a reg.
19298
19299 2018-02-12 Richard Biener <rguenther@suse.de>
19300
19301 PR tree-optimization/84037
19302 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
19303 parameter, move visited init to caller.
19304 (vect_slp_analyze_operations): Separate cost from validity
19305 check, initialize visited once for all instances.
19306 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
19307 for all instances.
19308 * tree-vect-stmts.c (vect_model_simple_cost): Make early
19309 out an assert.
19310 (vect_model_promotion_demotion_cost): Likewise.
19311 (vectorizable_bswap): Guard cost modeling with !slp_node
19312 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
19313 SLP stmts.
19314 (vectorizable_call): Likewise.
19315 (vectorizable_conversion): Likewise.
19316 (vectorizable_assignment): Likewise.
19317 (vectorizable_shift): Likewise.
19318 (vectorizable_operation): Likewise.
19319 (vectorizable_store): Likewise.
19320 (vectorizable_load): Likewise.
19321 (vectorizable_condition): Likewise.
19322 (vectorizable_comparison): Likewise.
19323
19324 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
19325
19326 PR sanitizer/84307
19327 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
19328 (ASAN_MARK): Fix fnspec to account for return value, change pointer
19329 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
19330
19331 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19332
19333 PR middle-end/83665
19334 * params.def (inline-min-speedup): Increase from 8 to 15.
19335 (max-inline-insns-auto): Decrease from 40 to 30.
19336 * ipa-split.c (consider_split): Add some buffer for function to
19337 be considered inlining candidate.
19338 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19339 default values.
19340
19341 2018-02-12 Richard Biener <rguenther@suse.de>
19342
19343 PR tree-optimization/84037
19344 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19345 matched stmts if we cannot swap the non-matched ones.
19346
19347 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19348
19349 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19350 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19351 _mm_maskz_scalef_round_ss): New intrinsics.
19352 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19353 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19354 __builtin_ia32_scalefss_round): Remove.
19355 (__builtin_ia32_scalefsd_mask_round,
19356 __builtin_ia32_scalefss_mask_round): New intrinsics.
19357 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19358 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19359 ((match_operand:VF_128 2 "<round_nimm_predicate>"
19360 "<round_constraint>")): Changed to ...
19361 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19362 "<round_scalar_constraint>")): ... this.
19363 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19364 %0, %1, %2<round_op3>}"): Changed to ...
19365 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19366 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19367 %2<round_scalar_mask_op3>}"): ... this.
19368 * config/i386/subst.md (round_scalar_nimm_predicate): New.
19369
19370 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19371
19372 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19373 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19374 (_mm_maskz_sqrt_round_ss): New intrinsics.
19375 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19376 (__builtin_ia32_sqrtsd_mask_round)
19377 (__builtin_ia32_sqrtss_mask_round): New builtins.
19378 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19379 (__builtin_ia32_sqrtss_round): Remove.
19380 (__builtin_ia32_sqrtsd_mask_round)
19381 (__builtin_ia32_sqrtss_mask_round): New builtins.
19382 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19383 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19384 ((match_operand:VF_128 1 "vector_operand"
19385 "xBm,<round_constraint>")): Changed to ...
19386 ((match_operand:VF_128 1 "vector_operand"
19387 "xBm,<round_scalar_constraint>")): ... this.
19388 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19389 %0, %2, %<iptr>1<round_op3>}): Changed to ...
19390 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19391 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19392 %<iptr>1<round_scalar_mask_op3>}): ... this.
19393 ((set_attr "prefix" "<round_prefix>")): Changed to ...
19394 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19395
19396 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
19397
19398 PR target/84266
19399 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19400 Cast vec_cmpeq result to correct type.
19401 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19402 Cast vec_cmpgt result to correct type.
19403
19404 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
19405
19406 * final.c (final_scan_insn_1): Renamed from...
19407 (final_scan_insn): ... this. New wrapper, to recover
19408 seen from the outermost call in recursive ones.
19409 * config/sparc/sparc.c (output_return): Drop seen from call.
19410 (output_sibcall): Likewise.
19411 * config/visium/visium.c (output_branch): Likewise.
19412
19413 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
19414
19415 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19416 function label.
19417
19418 2018-02-10 Alan Modra <amodra@gmail.com>
19419
19420 PR target/84300
19421 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19422 Specify LR as an input.
19423
19424 2018-02-10 Jakub Jelinek <jakub@redhat.com>
19425
19426 PR sanitizer/83987
19427 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19428 remove_member_access_dummy_vars): New functions.
19429 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19430 lower_omp_1, execute_lower_omp): Use them.
19431
19432 PR rtl-optimization/84308
19433 * shrink-wrap.c (spread_components): Release todo vector.
19434
19435 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
19436
19437 PR rtl-optimization/57193
19438 * ira-color.c (struct allocno_color_data): Add member
19439 conflict_allocno_hard_prefs.
19440 (update_conflict_allocno_hard_prefs): New.
19441 (bucket_allocno_compare_func): Add a preference based on
19442 conflict_allocno_hard_prefs.
19443 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19444 (color_allocnos): Remove a dead code. Initiate
19445 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
19446
19447 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19448
19449 PR target/84226
19450 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19451 constraint from =wa to wa. Avoid a subreg on the output operand,
19452 instead use a pseudo and subreg it in a move.
19453 (p9_xxbrd_<mode>): Changed to ...
19454 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19455 (p9_xxbrd_v2df): New expander.
19456 (p9_xxbrw_<mode>): Changed to ...
19457 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19458 (p9_xxbrw_v4sf): New expander.
19459
19460 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19461
19462 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19463
19464 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
19465
19466 PR target/83926
19467 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19468 multiply in 32-bit mode.
19469 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19470 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19471 mode.
19472
19473 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19474
19475 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19476 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19477 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19478 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19479
19480 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
19481
19482 PR lto/84213
19483 * dwarf2out.c (is_trivial_indirect_ref): New function.
19484 (dwarf2out_late_global_decl): Do not generate a location
19485 attribute for variables that have a non-trivial DECL_VALUE_EXPR
19486 and that are not defined in the current unit.
19487
19488 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19489
19490 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19491 instead of a libcall for UNORDERED.
19492
19493 2018-02-09 Tamar Christina <tamar.christina@arm.com>
19494
19495 PR target/82641
19496 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19497 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19498
19499 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19500
19501 PR target/PR84295
19502 * config/s390/s390.c (s390_set_current_function): Invoke
19503 s390_indirect_branch_settings also if fndecl didn't change.
19504
19505 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19506
19507 * config/rs6000/rs6000.md (blockage): Set length to zero.
19508
19509 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19510
19511 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19512
19513 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19514
19515 PR sanitizer/84285
19516 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19517 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19518 -static-lib*san.
19519
19520 PR debug/84252
19521 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19522 PARALLEL incoming that failed vt_get_decl_and_offset check.
19523
19524 PR middle-end/84237
19525 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19526 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19527 TREE_READONLY bit.
19528 (get_variable_section): For decls in named .bss* sections pass true as
19529 second argument to bss_initializer_p.
19530
19531 2018-02-09 Marek Polacek <polacek@redhat.com>
19532 Jakub Jelinek <jakub@redhat.com>
19533
19534 PR c++/83659
19535 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19536 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19537 Sync some changes from cxx_fold_indirect_ref.
19538
19539 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19540
19541 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19542 markers.
19543 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19544 (BLOCK_INLINE_ENTRY_LABEL): New.
19545 (dwarf2out_var_location): Disregard inline entry markers.
19546 (inline_entry_data): New struct.
19547 (inline_entry_data_hasher): New hashtable type.
19548 (inline_entry_data_hasher::hash): New.
19549 (inline_entry_data_hasher::equal): New.
19550 (inline_entry_data_table): New variable.
19551 (add_high_low_attributes): Add DW_AT_entry_pc and
19552 DW_AT_GNU_entry_view attributes if a pending entry is found
19553 in inline_entry_data_table. Add old entry_pc attribute only
19554 if debug nonbinding markers are disabled.
19555 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19556 markers are enabled.
19557 (block_within_block_p, dwarf2out_inline_entry): New.
19558 (dwarf2out_finish): Check that no entries remained in
19559 inline_entry_data_table.
19560 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19561 (final_scan_insn, notice_source_line): Likewise.
19562 (rest_of_clean_state): Skip inline entry markers.
19563 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19564 markers.
19565 * gimple.c (gimple_build_debug_inline_entry): New.
19566 * gimple.h (enum gimple_debug_subcode): Add
19567 GIMPLE_DEBUG_INLINE_ENTRY.
19568 (gimple_build_debug_inline_entry): Declare.
19569 (gimple_debug_inline_entry_p): New.
19570 (gimple_debug_nonbind_marker_p): Adjust.
19571 * insn-notes.def (INLINE_ENTRY): New.
19572 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19573 inline entry marker notes.
19574 (print_insn): Likewise.
19575 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19576 (INSN_DEBUG_MARKER_KIND): Likewise.
19577 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19578 * tree-inline.c (expand_call_inline): Build and insert
19579 debug_inline_entry stmt.
19580 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19581 inline entry blocks early, if nonbind markers are enabled.
19582 (dump_scope_block): Dump fragment info.
19583 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19584 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19585 (gimple_build_debug_inline_entry): New.
19586 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19587 Enable/disable inline entry points too.
19588 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19589 (DEBUG_INSN): Describe inline entry markers.
19590
19591 * common.opt (gvariable-location-views): New.
19592 (gvariable-location-views=incompat5): New.
19593 * config.in: Rebuilt.
19594 * configure: Rebuilt.
19595 * configure.ac: Test assembler for view support.
19596 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19597 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19598 * dwarf2out.c (var_loc_view): New typedef.
19599 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19600 (dwarf2out_locviews_in_attribute): New.
19601 (dwarf2out_locviews_in_loclist): New.
19602 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19603 (enum dw_line_info_opcode): Add LI_adv_address.
19604 (struct dw_line_info_table): Add view.
19605 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19606 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19607 (zero_view_p): New variable.
19608 (ZERO_VIEW_P): New macro.
19609 (output_asm_line_debug_info): New.
19610 (struct var_loc_node): Add view.
19611 (add_AT_view_list, AT_loc_list): New.
19612 (add_var_loc_to_decl): Add view param. Test it against last.
19613 (new_loc_list): Add view params. Record them.
19614 (AT_loc_list_ptr): Handle loc and view lists.
19615 (view_list_to_loc_list_val_node): New.
19616 (print_dw_val): Handle dw_val_class_view_list.
19617 (size_of_die): Likewise.
19618 (value_format): Likewise.
19619 (loc_list_has_views): New.
19620 (gen_llsym): Set vl_symbol too.
19621 (maybe_gen_llsym, skip_loc_list_entry): New.
19622 (dwarf2out_maybe_output_loclist_view_pair): New.
19623 (output_loc_list): Output view list or entries too.
19624 (output_view_list_offset): New.
19625 (output_die): Handle dw_val_class_view_list.
19626 (output_dwarf_version): New.
19627 (output_compilation_unit_header): Use it.
19628 (output_skeleton_debug_sections): Likewise.
19629 (output_rnglists, output_line_info): Likewise.
19630 (output_pubnames, output_aranges): Update version comments.
19631 (output_one_line_info_table): Output view numbers in asm comments.
19632 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19633 Call maybe_gen_llsym.
19634 (loc_list_from_tree_1): Adjust.
19635 (add_AT_location_description): Create view list attribute if
19636 needed, check it's absent otherwise.
19637 (convert_cfa_to_fb_loc_list): Adjust.
19638 (maybe_emit_file): Call output_asm_line_debug_info for test.
19639 (dwarf2out_var_location): Reset views as needed. Precompute
19640 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19641 attribute. Set view.
19642 (new_line_info_table): Reset next view.
19643 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19644 (dwarf2out_source_line): Likewise. Output view resets and labels to
19645 the assembler, or select appropriate line info opcodes.
19646 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19647 (optimize_string_length): Catch it. Adjust.
19648 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19649 dw_val_class_view_list, and remove it if no longer needed.
19650 (hash_loc_list): Hash view numbers.
19651 (loc_list_hasher::equal): Compare them.
19652 (optimize_location_lists): Check whether a view list symbol is
19653 needed, and whether the locview attribute is present, and
19654 whether they match. Remove the locview attribute if no longer
19655 needed.
19656 (index_location_lists): Call skip_loc_list_entry for test.
19657 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19658 Use output_dwarf_version.
19659 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19660 (struct dw_val_node): Add val_view_list.
19661 * final.c (SEEN_NEXT_VIEW): New.
19662 (set_next_view_needed): New.
19663 (clear_next_view_needed): New.
19664 (maybe_output_next_view): New.
19665 (final_start_function): Rename to...
19666 (final_start_function_1): ... this. Take pointer to FIRST,
19667 add SEEN parameter. Emit param bindings in the initial view.
19668 (final_start_function): Reintroduce SEEN-less interface.
19669 (final): Rename to...
19670 (final_1): ... this. Take SEEN parameter. Output final pending
19671 next view at the end.
19672 (final): Reintroduce seen-less interface.
19673 (final_scan_insn): Output pending next view before switching
19674 sections or ending a block. Mark the next view as needed when
19675 outputting variable locations. Notify debug backend of section
19676 changes, and of location view changes.
19677 (rest_of_handle_final): Adjust.
19678 * toplev.c (process_options): Autodetect value for debug variable
19679 location views option. Warn on incompat5 without -gdwarf-5.
19680 * doc/invoke.texi (gvariable-location-views): New.
19681 (gvariable-location-views=incompat5): New.
19682 (gno-variable-location-views): New.
19683
19684 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19685
19686 PR tree-optimization/84136
19687 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19688 that the result of find_edge is non-NULL.
19689
19690 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19691
19692 PR target/83008
19693 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19694 storing integer register in SImode. Fix cost of 256 and 512
19695 byte aligned SSE register store.
19696
19697 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19698
19699 * config/i386/i386.c (ix86_multiplication_cost): Fix
19700 multiplication cost for TARGET_AVX512DQ.
19701
19702 2018-02-08 Marek Polacek <polacek@redhat.com>
19703
19704 PR tree-optimization/84238
19705 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19706 get_range_strlen.
19707
19708 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19709
19710 PR tree-optimization/84265
19711 * tree-vect-stmts.c (vectorizable_store): Don't treat
19712 VMAT_CONTIGUOUS accesses as grouped.
19713 (vectorizable_load): Likewise.
19714
19715 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19716
19717 PR tree-optimization/81635
19718 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19719 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19720 (test_round_for_mask): New functions.
19721 (wide_int_cc_tests): Call test_round_for_mask.
19722 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19723 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19724 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19725 range returned by get_range_info.
19726
19727 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19728
19729 PR ipa/81360
19730 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19731 * symtab.c: Include builtins.h
19732 (symtab_node::output_to_lto_symbol_table_p): Move here
19733 from lto-streamer-out.c:output_symbol_p.
19734 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19735 (output_symbol_p): Move all logic to symtab.c
19736 (produce_symtab): Update.
19737
19738 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19739
19740 * config/s390/s390-opts.h (enum indirect_branch): Define.
19741 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19742 (s390_indirect_branch_via_thunk)
19743 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19744 (enum s390_indirect_branch_type): Define.
19745 * config/s390/s390.c (struct s390_frame_layout, struct
19746 machine_function): Remove.
19747 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19748 (indirect_branch_table_label_no, indirect_branch_table_name):
19749 Define variables.
19750 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19751 (enum s390_indirect_branch_option): Define.
19752 (s390_return_addr_from_memory): New function.
19753 (s390_handle_string_attribute): New function.
19754 (s390_attribute_table): Add new attribute handler.
19755 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19756 (s390_indirect_branch_via_thunk): New function.
19757 (s390_indirect_branch_via_inline_thunk): New function.
19758 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19759 sibling call optimization for non z10 compiles.
19760 (s390_emit_call): Force indirect branch target to be a single
19761 register. Add r1 clobber for non-z10 compiles.
19762 (s390_emit_epilogue): Emit return jump via return_use expander.
19763 (s390_reorg): Handle JUMP_INSNs as execute targets.
19764 (s390_option_override_internal): Perform validity checks for the
19765 new command line options.
19766 (s390_indirect_branch_attrvalue): New function.
19767 (s390_indirect_branch_settings): New function.
19768 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19769 (s390_output_indirect_thunk_function): New function.
19770 (s390_code_end): Implement target hook.
19771 (s390_case_values_threshold): Implement target hook.
19772 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19773 macros.
19774 * config/s390/s390.h (struct s390_frame_layout)
19775 (struct machine_function): Move here from s390.c.
19776 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19777 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19778 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19779 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19780 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19781 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19782 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19783 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19784 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19785 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19786 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19787 (mnemonic attribute): Add values which aren't recognized
19788 automatically.
19789 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19790 pattern for branch conversion. Fix mnemonic attribute.
19791 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19792 indirect branch via thunk if requested.
19793 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19794 ("*indirect_jump"): Disable for branch conversion using out of
19795 line thunks.
19796 ("indirect_jump_via_thunk<mode>_z10")
19797 ("indirect_jump_via_thunk<mode>")
19798 ("indirect_jump_via_inlinethunk<mode>_z10")
19799 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19800 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19801 ("casesi_jump_via_inlinethunk<mode>_z10")
19802 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19803 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19804 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19805 ("*indirect2_jump"): Disable for branch conversion.
19806 ("casesi_jump"): Turn into expander and expand patterns for branch
19807 conversion.
19808 ("return_use"): New expander.
19809 ("*return"): Emit return via thunk and rename it to ...
19810 ("*return<mode>"): ... this one.
19811 * config/s390/s390.opt: Add new options and and enum for the
19812 option values.
19813
19814 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19815
19816 * lra-constraints.c (match_reload): Unconditionally use
19817 gen_lowpart_SUBREG, rather than selecting between that
19818 and equivalent gen_rtx_SUBREG code.
19819
19820 2018-02-08 Richard Biener <rguenther@suse.de>
19821
19822 PR tree-optimization/84233
19823 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19824 changed flag instead of boguously re-using phi_inserted.
19825
19826 2018-02-08 Martin Jambor <mjambor@suse.cz>
19827
19828 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19829 static local variables.
19830
19831 2018-02-08 Richard Biener <rguenther@suse.de>
19832
19833 PR tree-optimization/84278
19834 * tree-vect-stmts.c (vectorizable_store): When looking for
19835 smaller vector types to perform grouped strided loads/stores
19836 make sure the mode is supported by the target.
19837 (vectorizable_load): Likewise.
19838
19839 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19840
19841 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19842 Increase LDP/STP opportunities by adding adjacent callee-saves.
19843
19844 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19845
19846 PR rtl-optimization/84068
19847 PR rtl-optimization/83459
19848 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19849
19850 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19851
19852 PR tree-optimization/84224
19853 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19854 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19855 non-zero arguments.
19856
19857 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19858
19859 PR target/84113
19860 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19861 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19862 count, remove one USE.
19863
19864 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19865
19866 * doc/install.texi (Configuration): Document the
19867 --with-long-double-format={ibm,ieee} PowerPC configuration
19868 options.
19869
19870 PR target/84154
19871 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19872 Convert from define_expand to be define_insn_and_split. Rework
19873 float/double/_Float128 conversions to QI/HI/SImode to work with
19874 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19875 conversions to QI/HImode types did a store and then a load to
19876 truncate the value. For conversions to VSX registers, don't split
19877 the insn, instead emit the code directly. Use the code iterator
19878 any_fix to combine signed and unsigned conversions.
19879 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19880 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19881 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19882 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19883 (fix_<mode>di2_hw): Likewise.
19884 (fixuns_<mode>di2_hw): Likewise.
19885 (fix_<mode>si2_hw): Likewise.
19886 (fixuns_<mode>si2_hw): Likewise.
19887 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19888 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19889 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19890 fix<uns>_trunc<SFDF:mode>si2_p8.
19891 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19892 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19893 (fix<uns>_<mode>_mem): Likewise.
19894 (fctiw<u>z_<mode>_mem): Likewise.
19895 (fix<uns>_<mode>_mem): Likewise.
19896 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19897 the register allocator from doing a direct move to the GPRs to do
19898 a store, and instead use the ISA 3.0 store byte/half-word from
19899 vector register instruction. For IEEE 128-bit floating point,
19900 also optimize stores of 32-bit ints.
19901 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19902
19903 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19904
19905 * genextract.c (push_pathstr_operand): New function to support
19906 [a-zA-Z].
19907 (walk_rtx): Call push_pathstr_operand.
19908 (print_path): Support [a-zA-Z].
19909
19910 2018-02-07 Richard Biener <rguenther@suse.de>
19911
19912 PR tree-optimization/84037
19913 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19914 (cse_and_gimplify_to_preheader): Declare.
19915 (vect_get_place_in_interleaving_chain): Likewise.
19916 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19917 ivexpr_map.
19918 (_loop_vec_info::~_loop_vec_info): Delete it.
19919 (cse_and_gimplify_to_preheader): New function.
19920 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19921 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19922 (vectorizable_load): Likewise. For grouped stores always base
19923 the IV on the first element.
19924 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19925 condition before gimplifying.
19926
19927 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19928
19929 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19930 *DIV_EXPR and *MOD_EXPR.
19931
19932 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19933
19934 PR target/84248
19935 * config/i386/i386.c (ix86_option_override_internal): Mask out
19936 the CF_SET bit when checking -fcf-protection.
19937
19938 2018-02-07 Tom de Vries <tom@codesourcery.com>
19939
19940 PR libgomp/84217
19941 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19942 enough.
19943
19944 2018-02-07 Richard Biener <rguenther@suse.de>
19945
19946 PR tree-optimization/84204
19947 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19948 this place.
19949
19950 PR tree-optimization/84205
19951 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19952 special-case isl_ast_op_zdiv_r.
19953
19954 PR tree-optimization/84223
19955 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19956 Only add conditions from within the region.
19957 (gather_bbs::after_dom_children): Adjust.
19958
19959 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19960
19961 PR target/84209
19962 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19963 * config/avr/avr.md: Only post-reload split REG-REG moves if
19964 either register is GENERAL_REG_P.
19965
19966 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19967
19968 PR tree-optimization/84235
19969 * tree-ssa-scopedtables.c
19970 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19971 if the subtraction is performed in floating point type where NaNs are
19972 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19973 build 1. Formatting fix.
19974
19975 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19976
19977 PR target/84146
19978 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19979 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19980 and skip it regardless of bb boundaries. Use CALL_P macro,
19981 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19982 unnecessarily, formatting fix.
19983
19984 2018-02-06 Michael Collison <michael.collison@arm.com>
19985
19986 * config/arm/thumb2.md:
19987 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19988 (*thumb_mov_notscc): Ditto.
19989
19990 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19991
19992 PR target/84154
19993 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19994 unsigned_fix, not "s".
19995
19996 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19997
19998 * configure.ac (gcc_fn_eh_frame_ro): New function.
19999 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
20000 correct .eh_frame permissions.
20001 * configure: Regenerate.
20002
20003 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
20004
20005 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
20006 irrelevant options.
20007
20008 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20009
20010 * config/rs6000/rs6000.c (rs6000_option_override_internal):
20011 Display warning message for -mno-speculate-indirect-jumps.
20012
20013 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
20014
20015 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
20016 Undocumented.
20017 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
20018
20019 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
20020
20021 PR tree-optimization/84225
20022 * tree-eh.c (find_trapping_overflow): Only call
20023 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
20024
20025 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20026
20027 PR target/84145
20028 * config/i386/i386.c: Reimplement the check of possible options
20029 -mibt/-mshstk conbination. Change error messages.
20030 * doc/invoke.texi: Fix a typo: remove extra '='.
20031
20032 2018-02-06 Marek Polacek <polacek@redhat.com>
20033
20034 PR tree-optimization/84228
20035 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
20036
20037 2018-02-06 Tamar Christina <tamar.christina@arm.com>
20038
20039 PR target/82641
20040 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
20041 emitted arch directives.
20042 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
20043 __ARM_FEATURE_COPROC before changing architectures.
20044
20045 2018-02-06 Richard Biener <rguenther@suse.de>
20046
20047 * config/i386/i386.c (print_reg): Fix typo.
20048 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
20049
20050 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
20051
20052 * configure: Regenerate.
20053
20054 2018-02-05 Martin Sebor <msebor@redhat.com>
20055
20056 PR tree-optimization/83369
20057 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
20058 inlining context.
20059
20060 2018-02-05 Martin Liska <mliska@suse.cz>
20061
20062 * doc/invoke.texi: Cherry-pick upstream r323995.
20063
20064 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
20065
20066 * ira.c (ira_init_register_move_cost): Adjust comment.
20067
20068 2018-02-05 Martin Liska <mliska@suse.cz>
20069
20070 PR gcov-profile/84137
20071 * doc/gcov.texi: Fix typo in documentation.
20072
20073 2018-02-05 Martin Liska <mliska@suse.cz>
20074
20075 PR gcov-profile/83879
20076 * doc/gcov.texi: Document necessity of --dynamic-list-data when
20077 using dlopen functionality.
20078
20079 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
20080
20081 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
20082 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
20083 _mm_maskz_range_ss, _mm_mask_range_round_ss,
20084 _mm_maskz_range_round_ss): New intrinsics.
20085 (__builtin_ia32_rangesd128_round)
20086 (__builtin_ia32_rangess128_round): Remove.
20087 (__builtin_ia32_rangesd128_mask_round,
20088 __builtin_ia32_rangess128_mask_round): New builtins.
20089 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
20090 __builtin_ia32_rangess128_round): Remove.
20091 (__builtin_ia32_rangesd128_mask_round,
20092 __builtin_ia32_rangess128_mask_round): New builtins.
20093 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
20094 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
20095 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
20096 "<round_saeonly_constraint>")): Changed to ...
20097 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
20098 "<round_saeonly_scalar_constraint>")): ... this.
20099 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20100 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
20101 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
20102 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
20103 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
20104
20105 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
20106
20107 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
20108 options.
20109 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
20110 Remove all values except native, 8540 and 8548.
20111
20112 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
20113
20114 * config/i386/i386.c (ix86_output_function_return): Pass
20115 INVALID_REGNUM, instead of -1, as invalid register number to
20116 indirect_thunk_name and output_indirect_thunk.
20117
20118 2018-02-02 Julia Koval <julia.koval@intel.com>
20119
20120 * config.gcc: Add -march=icelake.
20121 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
20122 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
20123 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
20124 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
20125 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
20126 (processor_target_table): Add icelake.
20127 (ix86_option_override_internal): Handle new PTAs.
20128 (get_builtin_code_for_version): Handle icelake.
20129 (M_INTEL_COREI7_ICELAKE): New.
20130 (fold_builtin_cpu): Handle icelake.
20131 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
20132 * doc/invoke.texi: Add -march=icelake.
20133
20134 2018-02-02 Julia Koval <julia.koval@intel.com>
20135
20136 * config/i386/i386.c (ix86_option_override_internal): Change flags type
20137 to wide_int_bitmask.
20138 * wide-int-bitmask.h: New.
20139
20140 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20141
20142 PR target/84066
20143 * config/i386/i386.md: Replace Pmode with word_mode in
20144 builtin_setjmp_setup and builtin_longjmp to support x32.
20145
20146 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
20147
20148 PR target/56010
20149 PR target/83743
20150 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
20151 #include "opts.h".
20152 (rs6000_supported_cpu_names): New static variable.
20153 (linux_cpu_translation_table): Likewise.
20154 (elf_platform) <cpu>: Define new static variable and use it.
20155 Translate kernel AT_PLATFORM name to canonical name if needed.
20156 Error if platform name is unknown.
20157
20158 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
20159
20160 PR target/84089
20161 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
20162
20163 2018-02-01 Jeff Law <law@redhat.com>
20164
20165 PR target/84128
20166 * config/i386/i386.c (release_scratch_register_on_entry): Add new
20167 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
20168 the scratch if RELEASE_VIA_POP is false.
20169 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
20170 If we have to save a temporary register, decrement SIZE appropriately.
20171 Pass new arguments to release_scratch_register_on_entry.
20172 (ix86_adjust_stack_and_probe): Likewise.
20173 (ix86_emit_probe_stack_range): Pass new arguments to
20174 release_scratch_register_on_entry.
20175
20176 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
20177
20178 PR rtl-optimization/84157
20179 * combine.c (change_zero_ext): Use REG_P predicate in
20180 front of HARD_REGISTER_P predicate.
20181
20182 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
20183
20184 * config/avr/avr.c (avr_option_override): Move disabling of
20185 -fdelete-null-pointer-checks to...
20186 * common/config/avr/avr-common.c (avr_option_optimization_table):
20187 ...here.
20188
20189 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20190
20191 PR tree-optimization/81635
20192 * tree-data-ref.c (split_constant_offset_1): For types that
20193 wrap on overflow, try to use range info to prove that wrapping
20194 cannot occur.
20195
20196 2018-02-01 Renlin Li <renlin.li@arm.com>
20197
20198 PR target/83370
20199 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
20200 TAILCALL_ADDR_REGS.
20201 (aarch64_register_move_cost): Likewise.
20202 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
20203 TAILCALL_ADDR_REGS.
20204 (REG_CLASS_NAMES): Likewise.
20205 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
20206 TAILCALL_ADDR_REGS. Remove IP registers.
20207 * config/aarch64/aarch64.md (Ucs): Update register constraint.
20208
20209 2018-02-01 Richard Biener <rguenther@suse.de>
20210
20211 * domwalk.h (dom_walker::dom_walker): Add additional constructor
20212 for specifying RPO order and allow NULL for that.
20213 * domwalk.c (dom_walker::dom_walker): Likewise.
20214 (dom_walker::walk): Handle NULL RPO order.
20215 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
20216 in RPO order.
20217 (rewrite_update_dom_walker): Likewise.
20218 (mark_def_dom_walker): Likewise.
20219
20220 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20221
20222 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
20223 (aarch64_maybe_expand_sve_subreg_move): Declare.
20224 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
20225 * config/aarch64/predicates.md (aarch64_any_register_operand): New
20226 predicate.
20227 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
20228 that are semantically a reverse operation.
20229 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
20230 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
20231 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
20232 functions.
20233 (aarch64_can_change_mode_class): For big-endian, forbid changes
20234 between two SVE modes if they have different element sizes.
20235
20236 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20237
20238 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
20239 the TImode handling for big-endian targets.
20240
20241 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20242
20243 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
20244 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
20245 not just bytes.
20246 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
20247 Remove BSWAP handing for big-endian targets and use the form of
20248 LD1RQ appropariate for the mode.
20249
20250 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20251
20252 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
20253 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
20254 duplicated element.
20255
20256 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20257
20258 PR tearget/83845
20259 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
20260 check for operands that need to go through aarch64_sve_reload_be.
20261
20262 2018-02-01 Jakub Jelinek <jakub@redhat.com>
20263
20264 PR tree-optimization/81661
20265 PR tree-optimization/84117
20266 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
20267 * tree-eh.c: Include gimplify.h.
20268 (find_trapping_overflow, replace_trapping_overflow,
20269 rewrite_to_non_trapping_overflow): New functions.
20270 * tree-vect-loop.c: Include tree-eh.h.
20271 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
20272 * tree-data-ref.c: Include tree-eh.h.
20273 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
20274
20275 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
20276
20277 PR rtl-optimization/84123
20278 * combine.c (change_zero_ext): Check if hard register satisfies
20279 can_change_dest_mode before calling gen_lowpart_SUBREG.
20280
20281 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
20282
20283 PR target/82444
20284 * ira.c (ira_init_register_move_cost): Remove assert.
20285
20286 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20287
20288 PR rtl-optimization/84071
20289 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
20290 * doc/tm.texi: Regenerate.
20291
20292 2018-01-31 Richard Biener <rguenther@suse.de>
20293
20294 PR tree-optimization/84132
20295 * tree-data-ref.c (analyze_miv_subscript): Properly
20296 check whether evolution_function_is_affine_multivariate_p
20297 before calling gcd_of_steps_may_divide_p.
20298
20299 2018-01-31 Julia Koval <julia.koval@intel.com>
20300
20301 PR target/83618
20302 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
20303 * config/i386/i386.md (rdpid_rex64) New.
20304 (rdpid): Make 32bit only.
20305
20306 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
20307
20308 PR lto/84105
20309 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
20310 an IDENTIFIER_NODE for FUNCTION_TYPE's.
20311
20312 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20313
20314 Revert
20315 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20316
20317 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20318
20319 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20320
20321 PR rtl-optimization/84071
20322 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
20323 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
20324
20325 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20326
20327 * config/arc/arc.c (arc_handle_aux_attribute): New function.
20328 (arc_attribute_table): Add 'aux' attribute.
20329 (arc_in_small_data_p): Consider aux like variables.
20330 (arc_is_aux_reg_p): New function.
20331 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20332 (arc_get_aux_arg): New function.
20333 (prepare_move_operands): Handle aux-register access.
20334 (arc_handle_aux_attribute): New function.
20335 * doc/extend.texi (ARC Variable attributes): Add subsection.
20336
20337 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20338
20339 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20340 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20341 (arc_attribute_table): Add 'uncached' attribute.
20342 (arc_print_operand): Print '.di' flag for uncached memory
20343 accesses.
20344 (arc_in_small_data_p): Do not consider for small data the uncached
20345 types.
20346 (arc_is_uncached_mem_p): New function.
20347 * config/arc/predicates.md (compact_store_memory_operand): Check
20348 for uncached memory accesses.
20349 (nonvol_nonimm_operand): Likewise.
20350 * doc/extend.texi (ARC Type Attribute): New subsection.
20351
20352 2018-01-31 Jakub Jelinek <jakub@redhat.com>
20353
20354 PR c/84100
20355 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20356 falign-loops=): Add Optimization flag.
20357
20358 2018-01-30 Jeff Law <law@redhat.com>
20359
20360 PR target/84064
20361 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20362 INT_REGISTERS_SAVED. Check it prior to calling
20363 get_scratch_register_on_entry.
20364 (ix86_adjust_stack_and_probe): Similarly.
20365 (ix86_emit_probe_stack_range): Similarly.
20366 (ix86_expand_prologue): Corresponding changes.
20367
20368 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20369
20370 PR target/40411
20371 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20372 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20373
20374 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
20375
20376 PR target/84112
20377 * lra-constraints.c (curr_insn_transform): Process AND in the
20378 address.
20379
20380 2018-01-30 Jakub Jelinek <jakub@redhat.com>
20381
20382 PR rtl-optimization/83986
20383 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20384 dependence against last_pending_memory_flush in addition to
20385 pending_jump_insns.
20386
20387 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
20388
20389 PR tree-optimization/81611
20390 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20391 copies.
20392
20393 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20394
20395 PR target/83758
20396 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20397 a reg rtx.
20398
20399 2018-01-30 Richard Biener <rguenther@suse.de>
20400 Jakub Jelinek <jakub@redhat.com>
20401
20402 PR tree-optimization/84111
20403 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20404 inner loops added during recursion, as they don't have up-to-date
20405 SSA form.
20406
20407 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20408
20409 PR ipa/81360
20410 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20411 (can_inline_edge_by_limits_p): ... here.
20412 (can_early_inline_edge_p, check_callers,
20413 update_caller_keys, update_callee_keys, recursive_inlining,
20414 add_new_edges_to_heap, speculation_useful_p,
20415 inline_small_functions,
20416 inline_small_functions, flatten_function,
20417 inline_to_all_callers_1): Update.
20418
20419 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20420
20421 * profile-count.c (profile_count::combine_with_ipa_count): Handle
20422 zeros correctly.
20423
20424 2018-01-30 Richard Biener <rguenther@suse.de>
20425
20426 PR tree-optimization/83008
20427 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20428 invariant and constant vector uses in stmts when they need
20429 more than one stmt.
20430
20431 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20432
20433 PR bootstrap/84017
20434 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20435 * configure: Regenerate.
20436
20437 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20438
20439 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20440 pattern.
20441 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20442 Use gen_rtx_REG rather than gen_lowpart.
20443
20444 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20445
20446 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20447 rather than 0 when creating partial subregs.
20448
20449 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20450
20451 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20452 of usage.
20453
20454 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
20455
20456 PR target/81550
20457 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20458 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20459 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20460 flags. This restores the settings used before the 2017-07-24.
20461 Turning off pre increment/decrement/modify allows IVOPTS to
20462 optimize DF/SF loops where the index is an int.
20463
20464 2018-01-29 Richard Biener <rguenther@suse.de>
20465 Kelvin Nilsen <kelvin@gcc.gnu.org>
20466
20467 PR bootstrap/80867
20468 * tree-vect-stmts.c (vectorizable_call): Don't call
20469 targetm.vectorize_builtin_md_vectorized_function if callee is
20470 NULL.
20471
20472 2018-01-22 Carl Love <cel@us.ibm.com>
20473
20474 * doc/extend.tex: Fix typo in second arg in
20475 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20476
20477 2018-01-29 Richard Biener <rguenther@suse.de>
20478
20479 PR tree-optimization/84086
20480 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20481 (flush_ssaname_freelist): When SSA names were released reset
20482 the SCEV hash table.
20483
20484 2018-01-29 Richard Biener <rguenther@suse.de>
20485
20486 PR tree-optimization/84057
20487 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20488 removed paths when removing edges.
20489
20490 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
20491
20492 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20493 -mfunction-return=@var{choice}.
20494
20495 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
20496
20497 PR diagnostic/84034
20498 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20499 Handle CR like TAB.
20500 (layout::print_source_line): Likewise.
20501 (test_get_line_width_without_trailing_whitespace): Add test cases.
20502
20503 2018-01-27 Jakub Jelinek <jakub@redhat.com>
20504
20505 PR middle-end/84040
20506 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20507 debug insns.
20508
20509 2018-01-26 Jim Wilson <jimw@sifive.com>
20510
20511 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20512
20513 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20514 specified.
20515
20516 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20517
20518 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20519 and CMP + SUB-immediate -> SUBS.
20520
20521 2018-01-26 Martin Sebor <msebor@redhat.com>
20522
20523 PR tree-optimization/83896
20524 * tree-ssa-strlen.c (get_string_len): Rename...
20525 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
20526 Avoid assuming length is constant.
20527 (handle_char_store): Use HOST_WIDE_INT for string length.
20528
20529 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
20530
20531 PR target/81763
20532 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20533 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20534
20535 2018-01-26 Richard Biener <rguenther@suse.de>
20536
20537 PR rtl-optimization/84003
20538 * dse.c (record_store): Only record redundant stores when
20539 the earlier store aliases at least all accesses the later one does.
20540
20541 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20542
20543 PR rtl-optimization/83985
20544 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20545 REG_CFA_RESTORE insns.
20546 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20547 REG_CFA_RESTORE insns here.
20548
20549 PR c/83989
20550 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20551 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20552
20553 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20554
20555 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20556 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20557 (arc_init): Likewise.
20558 (arc_override_options): Likewise.
20559 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20560 value.
20561 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20562 support.
20563 * config/arc/arc.h (TARGET_DBNZ): Define.
20564 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20565 properly set the tune attribute.
20566 (dbnz): Use TARGET_DBNZ guard.
20567 * config/arc/arc.opt (mtune): Add core3 option.
20568
20569 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20570
20571 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20572 recognize new pic like addresses.
20573 (arc_delegitimize_address): Clean up.
20574
20575 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20576
20577 * config/arc/arc-arches.def: Option mrf16 valid for all
20578 architectures.
20579 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20580 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20581 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20582 * config/arc/arc-tables.opt: Regenerate.
20583 * config/arc/arc.c (arc_conditional_register_usage): Handle
20584 reduced register file case.
20585 (arc_file_start): Set must have build attributes.
20586 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20587 mrf16 option value.
20588 * config/arc/arc.opt (mrf16): Add new option.
20589 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20590 * config/arc/genmultilib.awk: Handle new mrf16 option.
20591 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20592 * config/arc/t-multilib: Regenerate.
20593 * doc/invoke.texi (ARC Options): Document mrf16 option.
20594
20595 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20596
20597 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20598 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20599 (arc_attribute_table): Add 'secure_call' attribute.
20600 (arc_print_operand): Print secure call operand.
20601 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20602 secure.
20603 (arc_is_secure_call_p): New function. * config/arc/arc.md
20604 (call_i): Add support for sjli instruction.
20605 (call_value_i): Likewise.
20606 * config/arc/constraints.md (Csc): New constraint.
20607
20608 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20609 John Eric Martin <John.Martin@emmicro-us.com>
20610
20611 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20612 * config/arc/arc.c (_arc_jli_section): New struct.
20613 (arc_jli_section): New type.
20614 (rc_jli_sections): New static variable.
20615 (arc_handle_jli_attribute): New function.
20616 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20617 (arc_file_end): New function.
20618 (TARGET_ASM_FILE_END): Define.
20619 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20620 (arc_add_jli_section): New function.
20621 (jli_call_scan): Likewise.
20622 (arc_reorg): Call jli_call_scan.
20623 (arc_output_addsi): Remove 'S' from printing asm operand.
20624 (arc_is_jli_call_p): New function.
20625 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20626 operand.
20627 (movhi_insn): Likewise.
20628 (movsi_insn): Likewise.
20629 (movsi_set_cc_insn): Likewise.
20630 (loadqi_update): Likewise.
20631 (load_zeroextendqisi_update): Likewise.
20632 (load_signextendqisi_update): Likewise.
20633 (loadhi_update): Likewise.
20634 (load_zeroextendhisi_update): Likewise.
20635 (load_signextendhisi_update): Likewise.
20636 (loadsi_update): Likewise.
20637 (loadsf_update): Likewise.
20638 (movsicc_insn): Likewise.
20639 (bset_insn): Likewise.
20640 (bxor_insn): Likewise.
20641 (bclr_insn): Likewise.
20642 (bmsk_insn): Likewise.
20643 (bicsi3_insn): Likewise.
20644 (cmpsi_cc_c_insn): Likewise.
20645 (movsi_ne): Likewise.
20646 (movsi_cond_exec): Likewise.
20647 (clrsbsi2): Likewise.
20648 (norm_f): Likewise.
20649 (normw): Likewise.
20650 (swap): Likewise.
20651 (divaw): Likewise.
20652 (flag): Likewise.
20653 (sr): Likewise.
20654 (kflag): Likewise.
20655 (ffs): Likewise.
20656 (ffs_f): Likewise.
20657 (fls): Likewise.
20658 (call_i): Remove 'S' asm letter, add jli instruction.
20659 (call_value_i): Likewise.
20660 * config/arc/arc.op (mjli-always): New option.
20661 * config/arc/constraints.md (Cji): New constraint.
20662 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20663 operand.
20664 (subsf3_fpx): Likewise.
20665 (mulsf3_fpx): Likewise.
20666 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20667 asm operand.
20668 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20669 function attrbutes.
20670 * doc/invoke.texi (ARC): Document mjli-always option.
20671
20672 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20673
20674 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20675 avoid addition with 0 and use incw and decw where possible.
20676
20677 2018-01-26 Richard Biener <rguenther@suse.de>
20678
20679 PR tree-optimization/81082
20680 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20681 association if it requires casting to unsigned.
20682 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20683 from fold_plusminus_mult_expr to catch important cases late when
20684 range info is available.
20685
20686 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20687
20688 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20689 * configure.ac (hidden_linkonce): New test.
20690 * configure: Regenerate.
20691 * config.in: Regenerate.
20692
20693 2018-01-26 Julia Koval <julia.koval@intel.com>
20694
20695 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20696 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20697 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20698 _mm_mask_bitshuffle_epi64_mask): Fix type.
20699 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20700 USI_FTYPE_V4DI_V4DI_USI): Remove.
20701 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20702 __builtin_ia32_vpshufbitqmb256_mask,
20703 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20704 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20705 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20706
20707 2018-01-26 Alan Modra <amodra@gmail.com>
20708
20709 PR target/84033
20710 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20711 UNSPEC_VBPERMQ. Sort other unspecs.
20712
20713 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20714
20715 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20716
20717 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20718
20719 PR middle-end/83055
20720 * predict.c (drop_profile): Do not push/pop cfun; update also
20721 node->count.
20722 (handle_missing_profiles): Fix logic looking for zero profiles.
20723
20724 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20725
20726 PR middle-end/83977
20727 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20728 on functions with #pragma omp declare simd or functions with simd
20729 attribute.
20730 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20731 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20732 Remove trailing \n from warning_at calls.
20733
20734 2018-01-25 Tom de Vries <tom@codesourcery.com>
20735
20736 PR target/84028
20737 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20738 for neutered workers.
20739
20740 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20741
20742 PR target/68467
20743 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20744 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20745
20746 2018-01-24 Jeff Law <law@redhat.com>
20747
20748 PR target/83994
20749 * i386.c (get_probe_interval): Move to earlier point.
20750 (ix86_compute_frame_layout): If -fstack-clash-protection and
20751 the frame is larger than the probe interval, then use pushes
20752 to save registers rather than reg->mem moves.
20753 (ix86_expand_prologue): Remove conditional for int_registers_saved
20754 assertion.
20755
20756 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20757
20758 PR target/84014
20759 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20760 min/max for never referenced object.
20761
20762 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20763
20764 PR middle-end/83977
20765 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20766 here.
20767 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20768 attributes from DECL_ATTRIBUTES (decl) without affecting
20769 DECL_ATTRIBUTES (current_function_decl).
20770 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20771 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20772
20773 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20774
20775 PR tree-optimization/83979
20776 * fold-const.c (fold_comparison): Use constant_boolean_node
20777 instead of boolean_{true,false}_node.
20778
20779 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20780
20781 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20782 with zero counts.
20783
20784 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20785
20786 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20787 Simplify the clause that sets the length attribute.
20788 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20789 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20790 clause that sets the length attribute.
20791 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20792
20793 2018-01-24 Tom de Vries <tom@codesourcery.com>
20794
20795 PR target/83589
20796 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20797 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20798 Add strict parameter.
20799 (prevent_branch_around_nothing): Insert dummy insn between branch to
20800 label and label with no ptx insn inbetween.
20801 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20802
20803 2018-01-24 Tom de Vries <tom@codesourcery.com>
20804
20805 PR target/81352
20806 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20807 for neutered threads in warp.
20808 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20809
20810 2018-01-24 Richard Biener <rguenther@suse.de>
20811
20812 PR tree-optimization/83176
20813 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20814 operands.
20815
20816 2018-01-24 Richard Biener <rguenther@suse.de>
20817
20818 PR tree-optimization/82819
20819 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20820 code generating pluses that are no-ops in the target precision.
20821
20822 2018-01-24 Richard Biener <rguenther@suse.de>
20823
20824 PR middle-end/84000
20825 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20826
20827 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20828
20829 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20830 to merge probabilities.
20831 * predict.c (probably_never_executed): Also mark as cold functions
20832 with global 0 profile and guessed local profile.
20833 * profile-count.c (profile_probability::combine_with_count): New
20834 member function.
20835 * profile-count.h (profile_probability::operator*,
20836 profile_probability::operator*=, profile_probability::operator/,
20837 profile_probability::operator/=): Reduce precision to adjusted
20838 and set value to guessed on contradictory divisions.
20839 (profile_probability::combine_with_freq): Remove.
20840 (profile_probability::combine_wiht_count): Declare.
20841 (profile_count::force_nonzero):: Set to adjusted.
20842 (profile_count::probability_in):: Set quality to adjusted.
20843 * tree-ssa-tail-merge.c (replace_block_by): Use
20844 combine_with_count.
20845
20846 2018-01-23 Andrew Waterman <andrew@sifive.com>
20847 Jim Wilson <jimw@sifive.com>
20848
20849 * config/riscv/riscv.c (riscv_stack_boundary): New.
20850 (riscv_option_override): Set riscv_stack_boundary. Handle
20851 riscv_preferred_stack_boundary_arg.
20852 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20853 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20854 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20855 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20856 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20857 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20858
20859 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20860
20861 PR target/83905
20862 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20863 of struct ix86_frame.
20864 (ix86_expand_epilogue): Likewise. Add a local variable for
20865 the reg_save_offset field in struct ix86_frame.
20866
20867 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20868
20869 PR tree-optimization/82604
20870 * tree-loop-distribution.c (enum partition_kind): New enum item
20871 PKIND_PARTIAL_MEMSET.
20872 (partition_builtin_p): Support above new enum item.
20873 (generate_code_for_partition): Ditto.
20874 (compute_access_range): Differentiate cases that equality can be
20875 proven at all loops, the innermost loops or no loops.
20876 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20877 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20878 (finalize_partitions, distribute_loop): Don't fuse partition of
20879 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20880 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20881 parloop is enabled.
20882
20883 2018-01-23 Martin Liska <mliska@suse.cz>
20884
20885 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20886 order to ignore the predictor.
20887 (PRED_POLYMORPHIC_CALL): Likewise.
20888 (PRED_RECURSIVE_CALL): Likewise.
20889
20890 2018-01-23 Martin Liska <mliska@suse.cz>
20891
20892 * tree-profile.c (tree_profiling): Print function header to
20893 aware reader which function we are working on.
20894 * value-prof.c (gimple_find_values_to_profile): Do not print
20895 not interesting value histograms.
20896
20897 2018-01-23 Martin Liska <mliska@suse.cz>
20898
20899 * profile-count.h (enum profile_quality): Add
20900 profile_uninitialized as the first value. Do not number values
20901 as they are zero based.
20902 (profile_count::verify): Update sanity check.
20903 (profile_probability::verify): Likewise.
20904
20905 2018-01-23 Nathan Sidwell <nathan@acm.org>
20906
20907 * doc/invoke.texi (ffor-scope): Deprecate.
20908
20909 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20910
20911 PR tree-optimization/83510
20912 * domwalk.c (set_all_edges_as_executable): New function.
20913 (dom_walker::dom_walker): Convert bool param
20914 "skip_unreachable_blocks" to enum reachability. Move setup of
20915 edge flags to set_all_edges_as_executable and only do it when
20916 reachability is REACHABLE_BLOCKS.
20917 * domwalk.h (enum dom_walker::reachability): New enum.
20918 (dom_walker::dom_walker): Convert bool param
20919 "skip_unreachable_blocks" to enum reachability.
20920 (set_all_edges_as_executable): New decl.
20921 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20922 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20923 "reachability".
20924 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20925 but converting true to REACHABLE_BLOCKS.
20926 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20927 * tree-vrp.c
20928 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20929 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20930 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20931 REACHABLE_BLOCKS.
20932 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20933 if check_all_array_refs will be called.
20934
20935 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20936
20937 * tree.c (selftest::test_location_wrappers): Add more test
20938 coverage.
20939
20940 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20941
20942 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20943 (selftest::test_bit_in_range): Likewise.
20944
20945 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20946
20947 PR testsuite/83888
20948 * doc/sourcebuild.texi (vect_float): Say that the selector
20949 only describes the situation when -funsafe-math-optimizations is on.
20950 (vect_float_strict): Document.
20951
20952 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20953
20954 PR tree-optimization/83965
20955 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20956 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20957 instead of checking only for a reduction.
20958 (vect_recog_widen_sum_pattern): Likewise.
20959
20960 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20961
20962 * predict.c (probably_never_executed): Only use precise profile info.
20963 (compute_function_frequency): Skip after inlining hack since we now
20964 have quality checking.
20965
20966 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20967
20968 * profile-count.h (profile_probability::very_unlikely,
20969 profile_probability::unlikely, profile_probability::even): Set
20970 precision to guessed.
20971
20972 2018-01-23 Richard Biener <rguenther@suse.de>
20973
20974 PR tree-optimization/83963
20975 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20976 Properly terminate dominator walk when crossing the exit edge not
20977 when visiting its source block.
20978
20979 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20980
20981 PR c++/83918
20982 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20983 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20984
20985 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20986
20987 PR tree-optimization/83957
20988 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20989 semicolon after for body surrounded by braces.
20990
20991 PR tree-optimization/83081
20992 * profile-count.h (profile_probability::split): New method.
20993 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20994 Use profile_probability::split.
20995 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20996 when splitting a single conditional jump into 2.
20997
20998 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20999
21000 PR tree-optimization/69452
21001 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
21002 decl.
21003
21004 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21005
21006 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
21007 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
21008 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
21009
21010 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21011
21012 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
21013 declaration.
21014 * config/rl78/rl78.md (movdi): New define_expand.
21015 * config/rl78/rl78.c (rl78_split_movdi): New function.
21016
21017 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
21018
21019 PR target/83862
21020 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
21021 no longer used.
21022 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
21023 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
21024 128-bit to produce an UNSPEC move to get the double word with the
21025 signbit and then a shift directly to do signbit.
21026 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
21027 implementation with a new version that just does either a direct
21028 move or a regular move. Move memory interface to separate insns.
21029 Move insns so they are next to the expander.
21030 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
21031 with signbit move. Split big and little endian case.
21032 (signbit<mode>2_dm_mem_le): Likewise.
21033 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
21034 (signbit<mode>2_dm2): Likewise.
21035
21036 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21037
21038 * config/rl78/rl78.md (anddi3): New define_expand.
21039
21040 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21041
21042 * config/rl78/rl78.md (umindi3): New define_expand.
21043
21044 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21045
21046 * config/rl78/rl78.md (smindi3): New define_expand.
21047
21048 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21049
21050 * config/rl78/rl78.md (smaxdi3): New define_expand.
21051
21052 2018-01-22 Carl Love <cel@us.ibm.com>
21053
21054 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
21055 LVX_V1TI): Add macro expansion.
21056 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
21057 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
21058 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
21059 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
21060 Change check to determine if the instruction is a byte reversing
21061 entry. Fix typo in comment.
21062 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
21063 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
21064 Add def_builtin calls for new builtins.
21065 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
21066 Add define_insn expansion.
21067
21068 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21069
21070 * config/rl78/rl78.md (umaxdi3): New define_expand.
21071
21072 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21073
21074 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
21075 for non-QImode registers.
21076
21077 2018-01-22 Richard Biener <rguenther@suse.de>
21078
21079 PR tree-optimization/83963
21080 * graphite-scop-detection.c (scop_detection::get_sese): Delay
21081 including the loop exit block.
21082 (scop_detection::merge_sese): Likewise.
21083 (scop_detection::add_scop): Do it here instead.
21084
21085 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21086
21087 * doc/sourcebuild.texi (arm_softfloat): Document.
21088
21089 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
21090
21091 PR gcc/77734
21092 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
21093 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
21094 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
21095
21096 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21097 David Edelsohn <dje.gcc@gmail.com>
21098
21099 PR target/83946
21100 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21101 Change "crset eq" to "crset 2".
21102 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21103 (*call_indirect_aix<mode>_nospec): Likewise.
21104 (*call_value_indirect_aix<mode>_nospec): Likewise.
21105 (*call_indirect_elfv2<mode>_nospec): Likewise.
21106 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
21107 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
21108 change assembly output from . to $.
21109 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21110 (indirect_jump<mode>_nospec): Change assembly output from . to $.
21111 (*tablejump<mode>_internal1_nospec): Likewise.
21112
21113 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
21114
21115 PR target/80870
21116 * config/sh/sh_optimize_sett_clrt.cc:
21117 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
21118
21119 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
21120
21121 PR tree-optimization/83940
21122 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
21123 offset_dt to vect_constant_def rather than vect_unknown_def_type.
21124 (vect_check_load_store_mask): Add a mask_dt_out parameter and
21125 use it to pass back the definition type.
21126 (vect_check_store_rhs): Likewise rhs_dt_out.
21127 (vect_build_gather_load_calls): Add a mask_dt argument and use
21128 it instead of a call to vect_is_simple_use.
21129 (vectorizable_store): Update calls to vect_check_load_store_mask
21130 and vect_check_store_rhs. Use the dt returned by the latter instead
21131 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
21132 instead of calls to vect_is_simple_use. Pass the scalar rather
21133 than the vector operand to vect_is_simple_use when handling
21134 second and subsequent copies of an rhs value.
21135 (vectorizable_load): Update calls to vect_check_load_store_mask
21136 and vect_build_gather_load_calls. Use the cached mask_dt and
21137 gs_info.offset_dt instead of calls to vect_is_simple_use.
21138
21139 2018-01-20 Jakub Jelinek <jakub@redhat.com>
21140
21141 PR middle-end/83945
21142 * tree-emutls.c: Include gimplify.h.
21143 (lower_emutls_2): New function.
21144 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
21145 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
21146 it before further processing.
21147
21148 PR target/83930
21149 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
21150 UINTVAL (trueop1) instead of INTVAL (op1).
21151
21152 2018-01-19 Jakub Jelinek <jakub@redhat.com>
21153
21154 PR debug/81570
21155 PR debug/83728
21156 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
21157 INCOMING_FRAME_SP_OFFSET if not defined.
21158 (scan_trace): Add ENTRY argument. If true and
21159 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
21160 emit a note to adjust the CFA offset.
21161 (create_cfi_notes): Adjust scan_trace callers.
21162 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
21163 INCOMING_FRAME_SP_OFFSET in the CIE.
21164 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
21165 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
21166 Likewise.
21167 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
21168 * doc/tm.texi: Regenerated.
21169
21170 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21171
21172 PR rtl-optimization/83147
21173 * lra-constraints.c (remove_inheritance_pseudos): Use
21174 lra_substitute_pseudo_within_insn.
21175
21176 2018-01-19 Tom de Vries <tom@codesourcery.com>
21177 Cesar Philippidis <cesar@codesourcery.com>
21178
21179 PR target/83920
21180 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
21181
21182 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
21183
21184 PR target/83790
21185 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
21186 spaces for function labels.
21187
21188 2018-01-19 Martin Liska <mliska@suse.cz>
21189
21190 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
21191 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
21192 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
21193 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
21194 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
21195 (PRED_CONST_RETURN): Change from 69 to 65.
21196 (PRED_NULL_RETURN): Change from 91 to 71.
21197 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
21198 (PRED_LOOP_GUARD): Change from 66 to 73.
21199
21200 2018-01-19 Martin Liska <mliska@suse.cz>
21201
21202 * predict.c (predict_insn_def): Add new assert.
21203 (struct branch_predictor): Change type to signed integer.
21204 (test_prediction_value_range): Amend test to cover
21205 PROB_UNINITIALIZED.
21206 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
21207 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
21208 (PRED_LOOP_ITERATIONS_MAX): Likewise.
21209 (PRED_LOOP_IV_COMPARE): Likewise.
21210 * predict.h (PROB_UNINITIALIZED): Define new constant.
21211
21212 2018-01-19 Martin Liska <mliska@suse.cz>
21213
21214 * predict.c (dump_prediction): Add new format for
21215 analyze_brprob.py script which is enabled with -details
21216 suboption.
21217 * profile-count.h (precise_p): New function.
21218
21219 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21220
21221 PR tree-optimization/83922
21222 * tree-vect-loop.c (vect_verify_full_masking): Return false if
21223 there are no statements that need masking.
21224 (vect_active_double_reduction_p): New function.
21225 (vect_analyze_loop_operations): Use it when handling phis that
21226 are not in the loop header.
21227
21228 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21229
21230 PR tree-optimization/83914
21231 * tree-vect-loop.c (vectorizable_induction): Don't convert
21232 init_expr or apply the peeling adjustment for inductions
21233 that are nested within the vectorized loop.
21234
21235 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21236
21237 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
21238 instead of NEG.
21239
21240 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21241
21242 PR sanitizer/81715
21243 PR testsuite/83882
21244 * function.h (gimplify_parameters): Add gimple_seq * argument.
21245 * function.c: Include gimple.h and options.h.
21246 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
21247 for the added local temporaries if needed.
21248 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
21249 if there are any parameter cleanups, wrap whole body into a
21250 try/finally with the cleanups.
21251
21252 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
21253
21254 PR target/82964
21255 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
21256 Use GET_MODE_CLASS for scalar floating point.
21257
21258 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21259
21260 PR ipa/82256
21261 patch by PaX Team
21262 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
21263 Fix call of call_cgraph_insertion_hooks.
21264
21265 2018-01-18 Martin Sebor <msebor@redhat.com>
21266
21267 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
21268
21269 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21270
21271 PR ipa/83619
21272 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
21273 frequencies.
21274
21275 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
21276
21277 PR other/70268
21278 * common.opt: (-ffile-prefix-map): New option.
21279 * opts.c (common_handle_option): Defer it.
21280 * opts-global.c (handle_common_deferred_options): Handle it.
21281 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
21282 * file-prefix-map.h: New file.
21283 (remap_debug_filename, add_debug_prefix_map): ...here.
21284 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
21285 * final.c (debug_prefix_map, add_debug_prefix_map
21286 remap_debug_filename): Move to...
21287 * file-prefix-map.c: New file.
21288 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
21289 generalize, get rid of alloca(), use strrchr() instead of strchr().
21290 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
21291 Implement in terms of add_prefix_map().
21292 (remap_macro_filename, remap_debug_filename): Implement in term of
21293 remap_filename().
21294 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
21295 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
21296 * dbxout.c: Include file-prefix-map.h.
21297 * varasm.c: Likewise.
21298 * vmsdbgout.c: Likewise.
21299 * xcoffout.c: Likewise.
21300 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
21301 * doc/cppopts.texi (-fmacro-prefix-map): Document.
21302 * doc/invoke.texi (-ffile-prefix-map): Document.
21303 (-fdebug-prefix-map): Update description.
21304
21305 2018-01-18 Martin Liska <mliska@suse.cz>
21306
21307 * config/i386/i386.c (indirect_thunk_name): Document that also
21308 lfence is emitted.
21309 (output_indirect_thunk): Document why both instructions
21310 (pause and lfence) are generated.
21311
21312 2018-01-18 Richard Biener <rguenther@suse.de>
21313
21314 PR tree-optimization/83887
21315 * graphite-scop-detection.c
21316 (scop_detection::get_nearest_dom_with_single_entry): Remove.
21317 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
21318 (scop_detection::merge_sese): Re-implement with a flood-fill
21319 algorithm that properly finds a SESE region if it exists.
21320
21321 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21322
21323 PR c/61240
21324 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
21325 pointer_diff optimizations use view_convert instead of convert.
21326
21327 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21328
21329 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21330 Generate different code for -mno-speculate-indirect-jumps.
21331 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21332 (*call_indirect_aix<mode>): Disable for
21333 -mno-speculate-indirect-jumps.
21334 (*call_indirect_aix<mode>_nospec): New define_insn.
21335 (*call_value_indirect_aix<mode>): Disable for
21336 -mno-speculate-indirect-jumps.
21337 (*call_value_indirect_aix<mode>_nospec): New define_insn.
21338 (*sibcall_nonlocal_sysv<mode>): Generate different code for
21339 -mno-speculate-indirect-jumps.
21340 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21341
21342 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21343
21344 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21345 long double type, set the flags for noting the default long double
21346 type, even if we don't pass or return a long double type.
21347
21348 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
21349
21350 PR ipa/83051
21351 * ipa-inline.c (flatten_function): Do not overwrite final inlining
21352 failure.
21353
21354 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
21355
21356 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21357 support for merge[hl].
21358 (fold_mergehl_helper): New helper function.
21359 (tree-vector-builder.h): New #include for tree_vector_builder usage.
21360 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21361 (altivec_vmrglw_direct): Add xxmrglw insn.
21362
21363 2018-01-17 Andrew Waterman <andrew@sifive.com>
21364
21365 * config/riscv/riscv.c (riscv_conditional_register_usage): If
21366 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21367
21368 2018-01-17 David Malcolm <dmalcolm@redhat.com>
21369
21370 PR lto/83121
21371 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21372 call the lto_location_cache before reading the
21373 DECL_SOURCE_LOCATION of the types.
21374
21375 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
21376 Richard Sandiford <richard.sandiford@linaro.org>
21377
21378 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21379 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21380 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21381 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21382 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21383 Add declaration.
21384 * config/aarch64/constraints.md (aarch64_movti_operand):
21385 Limit immediates.
21386 * config/aarch64/predicates.md (Uti): Add new constraint.
21387
21388 2018-01-17 Carl Love <cel@us.ibm.com>
21389
21390 * config/rs6000/vsx.md (define_expand xl_len_r,
21391 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21392 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21393 lxvll.
21394 (define_expand, define_insn): Move the shift left from the
21395 define_insn to the define_expand for lxvl and stxvl instructions.
21396 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21397 and XL_LEN_R definitions to PURE.
21398
21399 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
21400
21401 * config/i386/i386.c (indirect_thunk_name): Declare regno
21402 as unsigned int. Compare regno with INVALID_REGNUM.
21403 (output_indirect_thunk): Ditto.
21404 (output_indirect_thunk_function): Ditto.
21405 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
21406 in the call to output_indirect_thunk_function.
21407
21408 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
21409
21410 PR middle-end/83884
21411 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21412 rather than the size of inner_type to determine the stack slot size
21413 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21414
21415 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
21416
21417 PR target/83546
21418 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21419 to PTA_SILVERMONT.
21420
21421 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
21422
21423 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21424 endian Linux systems to optionally enable multilibs for selecting
21425 the long double type if the user configured an explicit type.
21426 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21427 have no long double multilibs if not defined.
21428 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21429 warn if the user used -mabi={ieee,ibm}longdouble and we built
21430 multilibs for long double.
21431 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21432 appropriate multilib option.
21433 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21434 multilib options.
21435 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21436 for building long double multilibs.
21437 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21438
21439 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
21440
21441 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21442 copies.
21443
21444 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21445 64 bits.
21446 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21447 128 bits.
21448
21449 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21450 variables.
21451
21452 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21453 return value.
21454
21455 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21456
21457 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21458 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21459
21460 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
21461
21462 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21463 different rtl trees depending on TARGET_64BIT.
21464 (rs6000_gen_lvx): Likewise.
21465
21466 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21467
21468 * config/visium/visium.md (nop): Tweak comment.
21469 (hazard_nop): Likewise.
21470
21471 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21472
21473 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21474 -mspeculate-indirect-jumps.
21475 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21476 for -mno-speculate-indirect-jumps.
21477 (*call_indirect_elfv2<mode>_nospec): New define_insn.
21478 (*call_value_indirect_elfv2<mode>): Disable for
21479 -mno-speculate-indirect-jumps.
21480 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21481 (indirect_jump): Emit different RTL for
21482 -mno-speculate-indirect-jumps.
21483 (*indirect_jump<mode>): Disable for
21484 -mno-speculate-indirect-jumps.
21485 (*indirect_jump<mode>_nospec): New define_insn.
21486 (tablejump): Emit different RTL for
21487 -mno-speculate-indirect-jumps.
21488 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21489 (tablejumpsi_nospec): New define_expand.
21490 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21491 (tablejumpdi_nospec): New define_expand.
21492 (*tablejump<mode>_internal1): Disable for
21493 -mno-speculate-indirect-jumps.
21494 (*tablejump<mode>_internal1_nospec): New define_insn.
21495 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21496 option.
21497
21498 2018-01-16 Artyom Skrobov tyomitch@gmail.com
21499
21500 * caller-save.c (insert_save): Drop unnecessary parameter. All
21501 callers updated.
21502
21503 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21504 Richard Biener <rguenth@suse.de>
21505
21506 PR libgomp/83590
21507 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21508 return early, inline manually is_gimple_sizepos. Make sure if we
21509 call gimplify_expr we don't end up with a gimple constant.
21510 * tree.c (variably_modified_type_p): Don't return true for
21511 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
21512 * gimplify.h (is_gimple_sizepos): Remove.
21513
21514 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21515
21516 PR tree-optimization/83857
21517 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21518 vectorizable_live_operation for pure SLP statements.
21519 (vectorizable_live_operation): Handle PHIs.
21520
21521 2018-01-16 Richard Biener <rguenther@suse.de>
21522
21523 PR tree-optimization/83867
21524 * tree-vect-stmts.c (vect_transform_stmt): Precompute
21525 nested_in_vect_loop_p since the scalar stmt may get invalidated.
21526
21527 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21528
21529 PR c/83844
21530 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21531 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21532 If off is not INTEGER_CST, issue a may not be aligned warning
21533 rather than isn't aligned. Use isn%'t rather than isn't.
21534 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21535 into MULT_EXPR.
21536 <case MULT_EXPR>: Improve the case when bottom and one of the
21537 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21538 operand, in that case check if the other operand is multiple of
21539 bottom divided by the INTEGER_CST operand.
21540
21541 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21542
21543 PR target/83858
21544 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21545 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21546 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21547 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21548 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21549 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21550 (pa_function_arg_size): New function.
21551
21552 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21553
21554 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21555 in a separate statement.
21556
21557 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21558
21559 PR tree-optimization/83847
21560 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21561 group gathers and scatters.
21562
21563 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21564
21565 PR rtl-optimization/86620
21566 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21567
21568 PR rtl-optimization/83213
21569 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21570 to last if both are JUMP_INSNs.
21571
21572 PR tree-optimization/83843
21573 * gimple-ssa-store-merging.c
21574 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21575 store_immediate_info for bswap/nop orig_stores.
21576
21577 2018-01-15 Andrew Waterman <andrew@sifive.com>
21578
21579 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21580 !TARGET_MUL.
21581 <UDIV>: Increase cost if !TARGET_DIV.
21582
21583 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21584
21585 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21586 (define_attr "cr_logical_3op"): New.
21587 (cceq_ior_compare): Adjust.
21588 (cceq_ior_compare_complement): Adjust.
21589 (*cceq_rev_compare): Adjust.
21590 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21591 (is_cracked_insn): Adjust.
21592 (insn_must_be_first_in_group): Adjust.
21593 * config/rs6000/40x.md: Adjust.
21594 * config/rs6000/440.md: Adjust.
21595 * config/rs6000/476.md: Adjust.
21596 * config/rs6000/601.md: Adjust.
21597 * config/rs6000/603.md: Adjust.
21598 * config/rs6000/6xx.md: Adjust.
21599 * config/rs6000/7450.md: Adjust.
21600 * config/rs6000/7xx.md: Adjust.
21601 * config/rs6000/8540.md: Adjust.
21602 * config/rs6000/cell.md: Adjust.
21603 * config/rs6000/e300c2c3.md: Adjust.
21604 * config/rs6000/e500mc.md: Adjust.
21605 * config/rs6000/e500mc64.md: Adjust.
21606 * config/rs6000/e5500.md: Adjust.
21607 * config/rs6000/e6500.md: Adjust.
21608 * config/rs6000/mpc.md: Adjust.
21609 * config/rs6000/power4.md: Adjust.
21610 * config/rs6000/power5.md: Adjust.
21611 * config/rs6000/power6.md: Adjust.
21612 * config/rs6000/power7.md: Adjust.
21613 * config/rs6000/power8.md: Adjust.
21614 * config/rs6000/power9.md: Adjust.
21615 * config/rs6000/rs64.md: Adjust.
21616 * config/rs6000/titan.md: Adjust.
21617
21618 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21619
21620 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21621 ix86_indirect_branch_register logic.
21622
21623 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21624
21625 * config/i386/constraints.md (Bs): Update
21626 ix86_indirect_branch_register check. Don't check
21627 ix86_indirect_branch_register with GOT_memory_operand.
21628 (Bw): Likewise.
21629 * config/i386/predicates.md (GOT_memory_operand): Don't check
21630 ix86_indirect_branch_register here.
21631 (GOT32_symbol_operand): Likewise.
21632
21633 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21634
21635 * config/i386/predicates.md (constant_call_address_operand):
21636 Rewrite ix86_indirect_branch_register logic.
21637 (sibcall_insn_operand): Likewise.
21638
21639 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21640
21641 * config/i386/constraints.md (Bs): Replace
21642 ix86_indirect_branch_thunk_register with
21643 ix86_indirect_branch_register.
21644 (Bw): Likewise.
21645 * config/i386/i386.md (indirect_jump): Likewise.
21646 (tablejump): Likewise.
21647 (*sibcall_memory): Likewise.
21648 (*sibcall_value_memory): Likewise.
21649 Peepholes of indirect call and jump via memory: Likewise.
21650 * config/i386/i386.opt: Likewise.
21651 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21652 (GOT_memory_operand): Likewise.
21653 (call_insn_operand): Likewise.
21654 (sibcall_insn_operand): Likewise.
21655 (GOT32_symbol_operand): Likewise.
21656
21657 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21658
21659 PR middle-end/83837
21660 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21661 type rather than type addr's type points to.
21662 (expand_omp_atomic_mutex): Likewise.
21663 (expand_omp_atomic): Likewise.
21664
21665 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21666
21667 PR target/83839
21668 * config/i386/i386.c (output_indirect_thunk_function): Use
21669 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21670 for __x86_return_thunk.
21671
21672 2018-01-15 Richard Biener <rguenther@suse.de>
21673
21674 PR middle-end/83850
21675 * expmed.c (extract_bit_field_1): Fix typo.
21676
21677 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21678
21679 PR target/83687
21680 * config/arm/iterators.md (VF): New mode iterator.
21681 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21682 Remove integer-related logic from pattern.
21683 (neon_vabd<mode>_3): Likewise.
21684
21685 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21686
21687 PR middle-end/82694
21688 * common.opt (fstrict-overflow): No longer an alias.
21689 (fwrapv-pointer): New option.
21690 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21691 also for pointer types based on flag_wrapv_pointer.
21692 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21693 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21694 opts->x_flag_wrapv got set.
21695 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21696 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21697 POINTER_TYPE_OVERFLOW_UNDEFINED.
21698 * match.pd: Likewise in address comparison pattern.
21699 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21700
21701 2018-01-15 Richard Biener <rguenther@suse.de>
21702
21703 PR lto/83804
21704 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21705 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21706 Reset type names to their identifier if their TYPE_DECL doesn't
21707 have linkage (and thus is used for ODR and devirt).
21708 (save_debug_info_for_decl): Remove.
21709 (save_debug_info_for_type): Likewise.
21710 (add_tree_to_fld_list): Adjust.
21711 * tree-pretty-print.c (dump_generic_node): Make dumping of
21712 type names more robust.
21713
21714 2018-01-15 Richard Biener <rguenther@suse.de>
21715
21716 * BASE-VER: Bump to 8.0.1.
21717
21718 2018-01-14 Martin Sebor <msebor@redhat.com>
21719
21720 PR other/83508
21721 * builtins.c (check_access): Avoid warning when the no-warning bit
21722 is set.
21723
21724 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21725
21726 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21727 * ira-color (allocno_hard_regs_compare): Likewise.
21728
21729 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21730
21731 PR target/83013
21732 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21733 Use .pushsection/.popsection.
21734
21735 2018-01-14 Martin Sebor <msebor@redhat.com>
21736
21737 PR c++/81327
21738 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21739
21740 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21741
21742 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21743 entry from extra_headers.
21744 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21745 extra_headers, make the list bitwise identical to the i?86-*-* one.
21746
21747 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21748
21749 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21750 -mcmodel=large with -mindirect-branch=thunk,
21751 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21752 -mfunction-return=thunk-extern.
21753 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21754 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21755 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21756
21757 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21758
21759 * config/i386/i386.c (print_reg): Print the name of the full
21760 integer register without '%'.
21761 (ix86_print_operand): Handle 'V'.
21762 * doc/extend.texi: Document 'V' modifier.
21763
21764 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21765
21766 * config/i386/constraints.md (Bs): Disallow memory operand for
21767 -mindirect-branch-register.
21768 (Bw): Likewise.
21769 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21770 (GOT_memory_operand): Likewise.
21771 (call_insn_operand): Likewise.
21772 (sibcall_insn_operand): Likewise.
21773 (GOT32_symbol_operand): Likewise.
21774 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21775 for -mindirect-branch-register.
21776 (tablejump): Likewise.
21777 (*sibcall_memory): Likewise.
21778 (*sibcall_value_memory): Likewise.
21779 Disallow peepholes of indirect call and jump via memory for
21780 -mindirect-branch-register.
21781 (*call_pop): Replace m with Bw.
21782 (*call_value_pop): Likewise.
21783 (*sibcall_pop_memory): Replace m with Bs.
21784 * config/i386/i386.opt (mindirect-branch-register): New option.
21785 * doc/invoke.texi: Document -mindirect-branch-register option.
21786
21787 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21788
21789 * config/i386/i386-protos.h (ix86_output_function_return): New.
21790 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21791 set function_return_type.
21792 (indirect_thunk_name): Add ret_p to indicate thunk for function
21793 return.
21794 (output_indirect_thunk_function): Pass false to
21795 indirect_thunk_name.
21796 (ix86_output_indirect_branch_via_reg): Likewise.
21797 (ix86_output_indirect_branch_via_push): Likewise.
21798 (output_indirect_thunk_function): Create alias for function
21799 return thunk if regno < 0.
21800 (ix86_output_function_return): New function.
21801 (ix86_handle_fndecl_attribute): Handle function_return.
21802 (ix86_attribute_table): Add function_return.
21803 * config/i386/i386.h (machine_function): Add
21804 function_return_type.
21805 * config/i386/i386.md (simple_return_internal): Use
21806 ix86_output_function_return.
21807 (simple_return_internal_long): Likewise.
21808 * config/i386/i386.opt (mfunction-return=): New option.
21809 (indirect_branch): Mention -mfunction-return=.
21810 * doc/extend.texi: Document function_return function attribute.
21811 * doc/invoke.texi: Document -mfunction-return= option.
21812
21813 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21814
21815 * config/i386/i386-opts.h (indirect_branch): New.
21816 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21817 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21818 with local indirect jump when converting indirect call and jump.
21819 (ix86_set_indirect_branch_type): New.
21820 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21821 (indirectlabelno): New.
21822 (indirect_thunk_needed): Likewise.
21823 (indirect_thunk_bnd_needed): Likewise.
21824 (indirect_thunks_used): Likewise.
21825 (indirect_thunks_bnd_used): Likewise.
21826 (INDIRECT_LABEL): Likewise.
21827 (indirect_thunk_name): Likewise.
21828 (output_indirect_thunk): Likewise.
21829 (output_indirect_thunk_function): Likewise.
21830 (ix86_output_indirect_branch_via_reg): Likewise.
21831 (ix86_output_indirect_branch_via_push): Likewise.
21832 (ix86_output_indirect_branch): Likewise.
21833 (ix86_output_indirect_jmp): Likewise.
21834 (ix86_code_end): Call output_indirect_thunk_function if needed.
21835 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21836 needed.
21837 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21838 (ix86_attribute_table): Add indirect_branch.
21839 * config/i386/i386.h (machine_function): Add indirect_branch_type
21840 and has_local_indirect_jump.
21841 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21842 to true.
21843 (tablejump): Likewise.
21844 (*indirect_jump): Use ix86_output_indirect_jmp.
21845 (*tablejump_1): Likewise.
21846 (simple_return_indirect_internal): Likewise.
21847 * config/i386/i386.opt (mindirect-branch=): New option.
21848 (indirect_branch): New.
21849 (keep): Likewise.
21850 (thunk): Likewise.
21851 (thunk-inline): Likewise.
21852 (thunk-extern): Likewise.
21853 * doc/extend.texi: Document indirect_branch function attribute.
21854 * doc/invoke.texi: Document -mindirect-branch= option.
21855
21856 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21857
21858 PR ipa/83051
21859 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21860
21861 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21862
21863 * ipa-inline.c (want_inline_small_function_p): Return false if
21864 inlining has already failed with CIF_FINAL_ERROR.
21865 (update_caller_keys): Call want_inline_small_function_p before
21866 can_inline_edge_p.
21867 (update_callee_keys): Likewise.
21868
21869 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21870
21871 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21872 New function.
21873 (rs6000_quadword_masked_address_p): Likewise.
21874 (quad_aligned_load_p): Likewise.
21875 (quad_aligned_store_p): Likewise.
21876 (const_load_sequence_p): Add comment to describe the outer-most loop.
21877 (mimic_memory_attributes_and_flags): New function.
21878 (rs6000_gen_stvx): Likewise.
21879 (replace_swapped_aligned_store): Likewise.
21880 (rs6000_gen_lvx): Likewise.
21881 (replace_swapped_aligned_load): Likewise.
21882 (replace_swapped_load_constant): Capitalize argument name in
21883 comment describing this function.
21884 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21885 and stores that access quad-word aligned addresses and replace
21886 with stvx or lvx instructions when appropriate.
21887 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21888 New function prototype.
21889 (rs6000_quadword_masked_address_p): Likewise.
21890 (rs6000_gen_lvx): Likewise.
21891 (rs6000_gen_stvx): Likewise.
21892 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21893 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21894 when memory address is aligned.
21895 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21896 this split to select lvx instruction when memory address is aligned.
21897 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21898 instruction when memory address is aligned.
21899 (*vsx_le_perm_load_v16qi): Likewise.
21900 (four unnamed splitters): Modify to select the stvx instruction
21901 when memory is aligned.
21902
21903 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21904
21905 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21906 which appears in the queue multiple times.
21907
21908 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21909 Alan Hayward <alan.hayward@arm.com>
21910 David Sherwood <david.sherwood@arm.com>
21911
21912 * tree-vectorizer.h (vec_lower_bound): New structure.
21913 (_loop_vec_info): Add check_nonzero and lower_bounds.
21914 (LOOP_VINFO_CHECK_NONZERO): New macro.
21915 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21916 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21917 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21918 fields. Make seg_len the distance travelled, not including the
21919 access size.
21920 (dr_direction_indicator): Declare.
21921 (dr_zero_step_indicator): Likewise.
21922 (dr_known_forward_stride_p): Likewise.
21923 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21924 tree-ssanames.h.
21925 (runtime_alias_check_p): Allow runtime alias checks with
21926 variable strides.
21927 (operator ==): Compare access_size and align.
21928 (prune_runtime_alias_test_list): Rework for new distinction between
21929 the access_size and seg_len.
21930 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21931 segment lengths.
21932 (get_segment_min_max): New function.
21933 (create_intersect_range_checks): Use it.
21934 (dr_step_indicator): New function.
21935 (dr_direction_indicator): Likewise.
21936 (dr_zero_step_indicator): Likewise.
21937 (dr_known_forward_stride_p): Likewise.
21938 * tree-loop-distribution.c (data_ref_segment_size): Return
21939 DR_STEP * (niters - 1).
21940 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21941 constructor.
21942 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21943 (vect_preserves_scalar_order_p): New function, split out from...
21944 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21945 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21946 (vect_vfa_access_size): New function.
21947 (vect_vfa_align): Likewise.
21948 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21949 (dump_lower_bound): New function.
21950 (vect_check_lower_bound): Likewise.
21951 (vect_small_gap_p): Likewise.
21952 (vectorizable_with_step_bound_p): Likewise.
21953 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21954 depencies if the vectorization factor is 1. Convert the checks
21955 for nonzero steps into checks on the bounds of DR_STEP. Try using
21956 a bunds check for variable steps if the minimum required step is
21957 relatively small. Update calls to the dr_with_seg_len
21958 constructor and to vect_compile_time_alias.
21959 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21960 function.
21961 (vect_loop_versioning): Call it.
21962 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21963 when retrying.
21964 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21965
21966 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21967 Alan Hayward <alan.hayward@arm.com>
21968 David Sherwood <david.sherwood@arm.com>
21969
21970 * doc/sourcebuild.texi (vect_scatter_store): Document.
21971 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21972 optabs.
21973 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21974 Document.
21975 * genopinit.c (main): Add supports_vec_scatter_store and
21976 supports_vec_scatter_store_cached to target_optabs.
21977 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21978 IFN_MASK_SCATTER_STORE.
21979 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21980 functions.
21981 * internal-fn.h (internal_store_fn_p): Declare.
21982 (internal_fn_stored_value_index): Likewise.
21983 * internal-fn.c (scatter_store_direct): New macro.
21984 (expand_scatter_store_optab_fn): New function.
21985 (direct_scatter_store_optab_supported_p): New macro.
21986 (internal_store_fn_p): New function.
21987 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21988 IFN_MASK_SCATTER_STORE.
21989 (internal_fn_mask_index): Likewise.
21990 (internal_fn_stored_value_index): New function.
21991 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21992 for scatter stores.
21993 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21994 * optabs-query.c (supports_vec_scatter_store_p): New function.
21995 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21996 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21997 true for scatter stores.
21998 (vect_gather_scatter_fn_p): Handle scatter stores too.
21999 (vect_check_gather_scatter): Consider using scatter stores if
22000 supports_vec_scatter_store_p.
22001 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
22002 scatter stores too.
22003 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22004 internal_fn_stored_value_index.
22005 (check_load_store_masking): Handle scatter stores too.
22006 (vect_get_store_rhs): Make public.
22007 (vectorizable_call): Use internal_store_fn_p.
22008 (vectorizable_store): Handle scatter store internal functions.
22009 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
22010 when deciding whether the end of the group has been reached.
22011 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
22012 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
22013 (mask_scatter_store<mode>): New insns.
22014
22015 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22016 Alan Hayward <alan.hayward@arm.com>
22017 David Sherwood <david.sherwood@arm.com>
22018
22019 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
22020 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
22021 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
22022 function.
22023 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
22024 Use vect_truncate_gather_scatter_offset if we can't treat the
22025 operation as a normal gather load or scatter store.
22026 (get_group_load_store_type): Take the gather_scatter_info
22027 as argument. Try using a gather load or scatter store for
22028 single-element groups.
22029 (get_load_store_type): Update calls to get_group_load_store_type
22030 and vect_use_strided_gather_scatters_p.
22031
22032 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22033 Alan Hayward <alan.hayward@arm.com>
22034 David Sherwood <david.sherwood@arm.com>
22035
22036 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
22037 optional tree argument.
22038 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
22039 null target hooks.
22040 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
22041 but continue to use the current value as a fallback.
22042 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
22043 to compare the updates.
22044 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
22045 (get_load_store_type): Use it when handling a strided access.
22046 (vect_get_strided_load_store_ops): New function.
22047 (vect_get_data_ptr_increment): Likewise.
22048 (vectorizable_load): Handle strided gather loads. Always pass
22049 a step to vect_create_data_ref_ptr and bump_vector_ptr.
22050
22051 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22052 Alan Hayward <alan.hayward@arm.com>
22053 David Sherwood <david.sherwood@arm.com>
22054
22055 * doc/md.texi (gather_load@var{m}): Document.
22056 (mask_gather_load@var{m}): Likewise.
22057 * genopinit.c (main): Add supports_vec_gather_load and
22058 supports_vec_gather_load_cached to target_optabs.
22059 * optabs-tree.c (init_tree_optimization_optabs): Use
22060 ggc_cleared_alloc to allocate target_optabs.
22061 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
22062 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
22063 functions.
22064 * internal-fn.h (internal_load_fn_p): Declare.
22065 (internal_gather_scatter_fn_p): Likewise.
22066 (internal_fn_mask_index): Likewise.
22067 (internal_gather_scatter_fn_supported_p): Likewise.
22068 * internal-fn.c (gather_load_direct): New macro.
22069 (expand_gather_load_optab_fn): New function.
22070 (direct_gather_load_optab_supported_p): New macro.
22071 (direct_internal_fn_optab): New function.
22072 (internal_load_fn_p): Likewise.
22073 (internal_gather_scatter_fn_p): Likewise.
22074 (internal_fn_mask_index): Likewise.
22075 (internal_gather_scatter_fn_supported_p): Likewise.
22076 * optabs-query.c (supports_at_least_one_mode_p): New function.
22077 (supports_vec_gather_load_p): Likewise.
22078 * optabs-query.h (supports_vec_gather_load_p): Declare.
22079 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
22080 and memory_type field.
22081 (NUM_PATTERNS): Bump to 15.
22082 * tree-vect-data-refs.c: Include internal-fn.h.
22083 (vect_gather_scatter_fn_p): New function.
22084 (vect_describe_gather_scatter_call): Likewise.
22085 (vect_check_gather_scatter): Try using internal functions for
22086 gather loads. Recognize existing calls to a gather load function.
22087 (vect_analyze_data_refs): Consider using gather loads if
22088 supports_vec_gather_load_p.
22089 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
22090 (vect_get_gather_scatter_offset_type): Likewise.
22091 (vect_convert_mask_for_vectype): Likewise.
22092 (vect_add_conversion_to_patterm): Likewise.
22093 (vect_try_gather_scatter_pattern): Likewise.
22094 (vect_recog_gather_scatter_pattern): New pattern recognizer.
22095 (vect_vect_recog_func_ptrs): Add it.
22096 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22097 internal_fn_mask_index and internal_gather_scatter_fn_p.
22098 (check_load_store_masking): Take the gather_scatter_info as an
22099 argument and handle gather loads.
22100 (vect_get_gather_scatter_ops): New function.
22101 (vectorizable_call): Check internal_load_fn_p.
22102 (vectorizable_load): Likewise. Handle gather load internal
22103 functions.
22104 (vectorizable_store): Update call to check_load_store_masking.
22105 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
22106 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
22107 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
22108 (aarch64_gather_scale_operand_d): New predicates.
22109 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
22110 (mask_gather_load<mode>): New insns.
22111
22112 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22113 Alan Hayward <alan.hayward@arm.com>
22114 David Sherwood <david.sherwood@arm.com>
22115
22116 * optabs.def (fold_left_plus_optab): New optab.
22117 * doc/md.texi (fold_left_plus_@var{m}): Document.
22118 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
22119 * internal-fn.c (fold_left_direct): Define.
22120 (expand_fold_left_optab_fn): Likewise.
22121 (direct_fold_left_optab_supported_p): Likewise.
22122 * fold-const-call.c (fold_const_fold_left): New function.
22123 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
22124 * tree-parloops.c (valid_reduction_p): New function.
22125 (gather_scalar_reductions): Use it.
22126 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
22127 (vect_finish_replace_stmt): Declare.
22128 * tree-vect-loop.c (fold_left_reduction_fn): New function.
22129 (needs_fold_left_reduction_p): New function, split out from...
22130 (vect_is_simple_reduction): ...here. Accept reductions that
22131 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
22132 (vect_force_simple_reduction): Also store the reduction type in
22133 the assignment's STMT_VINFO_REDUC_TYPE.
22134 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
22135 (merge_with_identity): New function.
22136 (vect_expand_fold_left): Likewise.
22137 (vectorize_fold_left_reduction): Likewise.
22138 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
22139 scalar phi in place for it. Check for target support and reject
22140 cases that would reassociate the operation. Defer the transform
22141 phase to vectorize_fold_left_reduction.
22142 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
22143 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
22144 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
22145
22146 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22147
22148 * tree-if-conv.c (predicate_mem_writes): Remove redundant
22149 call to ifc_temp_var.
22150
22151 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22152 Alan Hayward <alan.hayward@arm.com>
22153 David Sherwood <david.sherwood@arm.com>
22154
22155 * target.def (legitimize_address_displacement): Take the original
22156 offset as a poly_int.
22157 * targhooks.h (default_legitimize_address_displacement): Update
22158 accordingly.
22159 * targhooks.c (default_legitimize_address_displacement): Likewise.
22160 * doc/tm.texi: Regenerate.
22161 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
22162 as an argument, moving assert of ad->disp == ad->disp_term to...
22163 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
22164 Try calling targetm.legitimize_address_displacement before expanding
22165 the address rather than afterwards, and adjust for the new interface.
22166 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
22167 Match the new hook interface. Handle SVE addresses.
22168 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
22169 new hook interface.
22170
22171 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22172
22173 * Makefile.in (OBJS): Add early-remat.o.
22174 * target.def (select_early_remat_modes): New hook.
22175 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
22176 * doc/tm.texi: Regenerate.
22177 * targhooks.h (default_select_early_remat_modes): Declare.
22178 * targhooks.c (default_select_early_remat_modes): New function.
22179 * timevar.def (TV_EARLY_REMAT): New timevar.
22180 * passes.def (pass_early_remat): New pass.
22181 * tree-pass.h (make_pass_early_remat): Declare.
22182 * early-remat.c: New file.
22183 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
22184 function.
22185 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
22186
22187 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22188 Alan Hayward <alan.hayward@arm.com>
22189 David Sherwood <david.sherwood@arm.com>
22190
22191 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
22192 vfm1 with a bound_epilog parameter.
22193 (vect_do_peeling): Update calls accordingly, and move the prologue
22194 call earlier in the function. Treat the base bound_epilog as 0 for
22195 fully-masked loops and retain vf - 1 for other loops. Add 1 to
22196 this base when peeling for gaps.
22197 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
22198 with fully-masked loops.
22199 (vect_estimate_min_profitable_iters): Handle the single peeled
22200 iteration in that case.
22201
22202 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22203 Alan Hayward <alan.hayward@arm.com>
22204 David Sherwood <david.sherwood@arm.com>
22205
22206 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
22207 single-element interleaving even if the size is not a power of 2.
22208 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
22209 accesses for single-element interleaving if the group size is
22210 not a power of 2.
22211
22212 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22213 Alan Hayward <alan.hayward@arm.com>
22214 David Sherwood <david.sherwood@arm.com>
22215
22216 * doc/md.texi (fold_extract_last_@var{m}): Document.
22217 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
22218 * optabs.def (fold_extract_last_optab): New optab.
22219 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
22220 * internal-fn.c (fold_extract_direct): New macro.
22221 (expand_fold_extract_optab_fn): Likewise.
22222 (direct_fold_extract_optab_supported_p): Likewise.
22223 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
22224 * tree-vect-loop.c (vect_model_reduction_cost): Handle
22225 EXTRACT_LAST_REDUCTION.
22226 (get_initial_def_for_reduction): Do not create an initial vector
22227 for EXTRACT_LAST_REDUCTION reductions.
22228 (vectorizable_reduction): Leave the scalar phi in place for
22229 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
22230 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
22231 epilogue code for EXTRACT_LAST_REDUCTION and defer the
22232 transform phase to vectorizable_condition.
22233 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
22234 split out from...
22235 (vect_finish_stmt_generation): ...here.
22236 (vect_finish_replace_stmt): New function.
22237 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
22238 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
22239 pattern.
22240 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
22241
22242 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22243 Alan Hayward <alan.hayward@arm.com>
22244 David Sherwood <david.sherwood@arm.com>
22245
22246 * doc/md.texi (extract_last_@var{m}): Document.
22247 * optabs.def (extract_last_optab): New optab.
22248 * internal-fn.def (EXTRACT_LAST): New internal function.
22249 * internal-fn.c (cond_unary_direct): New macro.
22250 (expand_cond_unary_optab_fn): Likewise.
22251 (direct_cond_unary_optab_supported_p): Likewise.
22252 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
22253 loops using EXTRACT_LAST.
22254 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
22255 (extract_last_<mode>): ...this optab.
22256 (vec_extract<mode><Vel>): Update accordingly.
22257
22258 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22259 Alan Hayward <alan.hayward@arm.com>
22260 David Sherwood <david.sherwood@arm.com>
22261
22262 * target.def (empty_mask_is_expensive): New hook.
22263 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
22264 * doc/tm.texi: Regenerate.
22265 * targhooks.h (default_empty_mask_is_expensive): Declare.
22266 * targhooks.c (default_empty_mask_is_expensive): New function.
22267 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
22268 if the target says that empty masks are expensive.
22269 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
22270 New function.
22271 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
22272
22273 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22274 Alan Hayward <alan.hayward@arm.com>
22275 David Sherwood <david.sherwood@arm.com>
22276
22277 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
22278 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
22279 (vect_use_loop_mask_for_alignment_p): New function.
22280 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
22281 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
22282 niters_skip argument. Make sure that the first niters_skip elements
22283 of the first iteration are inactive.
22284 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
22285 Update call to vect_set_loop_masks_directly.
22286 (get_misalign_in_elems): New function, split out from...
22287 (vect_gen_prolog_loop_niters): ...here.
22288 (vect_update_init_of_dr): Take a code argument that specifies whether
22289 the adjustment should be added or subtracted.
22290 (vect_update_init_of_drs): Likewise.
22291 (vect_prepare_for_masked_peels): New function.
22292 (vect_do_peeling): Skip prologue peeling if we're using a mask
22293 instead. Update call to vect_update_inits_of_drs.
22294 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22295 mask_skip_niters.
22296 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
22297 alignment. Do not include the number of peeled iterations in
22298 the minimum threshold in that case.
22299 (vectorizable_induction): Adjust the start value down by
22300 LOOP_VINFO_MASK_SKIP_NITERS iterations.
22301 (vect_transform_loop): Call vect_prepare_for_masked_peels.
22302 Take the number of skipped iterations into account when calculating
22303 the loop bounds.
22304 * tree-vect-stmts.c (vect_gen_while_not): New function.
22305
22306 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22307 Alan Hayward <alan.hayward@arm.com>
22308 David Sherwood <david.sherwood@arm.com>
22309
22310 * doc/sourcebuild.texi (vect_fully_masked): Document.
22311 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
22312 default value to 0.
22313 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
22314 split out from...
22315 (vect_analyze_loop_2): ...here. Don't check the vectorization
22316 factor against the number of loop iterations if the loop is
22317 fully-masked.
22318
22319 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22320 Alan Hayward <alan.hayward@arm.com>
22321 David Sherwood <david.sherwood@arm.com>
22322
22323 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
22324 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
22325 (dump_groups): Update accordingly.
22326 (iv_use::mem_type): New member variable.
22327 (address_p): New function.
22328 (record_use): Add a mem_type argument and initialize the new
22329 mem_type field.
22330 (record_group_use): Add a mem_type argument. Use address_p.
22331 Remove obsolete null checks of base_object. Update call to record_use.
22332 (find_interesting_uses_op): Update call to record_group_use.
22333 (find_interesting_uses_cond): Likewise.
22334 (find_interesting_uses_address): Likewise.
22335 (get_mem_type_for_internal_fn): New function.
22336 (find_address_like_use): Likewise.
22337 (find_interesting_uses_stmt): Try find_address_like_use before
22338 calling find_interesting_uses_op.
22339 (addr_offset_valid_p): Use the iv mem_type field as the type
22340 of the addressed memory.
22341 (add_autoinc_candidates): Likewise.
22342 (get_address_cost): Likewise.
22343 (split_small_address_groups_p): Use address_p.
22344 (split_address_groups): Likewise.
22345 (add_iv_candidate_for_use): Likewise.
22346 (autoinc_possible_for_pair): Likewise.
22347 (rewrite_groups): Likewise.
22348 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22349 (determine_group_iv_cost): Update after split of USE_ADDRESS.
22350 (get_alias_ptr_type_for_ptr_address): New function.
22351 (rewrite_use_address): Rewrite address uses in calls that were
22352 identified by find_address_like_use.
22353
22354 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22355 Alan Hayward <alan.hayward@arm.com>
22356 David Sherwood <david.sherwood@arm.com>
22357
22358 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22359 TARGET_MEM_REFs.
22360 * gimple-expr.h (is_gimple_addressable: Likewise.
22361 * gimple-expr.c (is_gimple_address): Likewise.
22362 * internal-fn.c (expand_call_mem_ref): New function.
22363 (expand_mask_load_optab_fn): Use it.
22364 (expand_mask_store_optab_fn): Likewise.
22365
22366 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22367 Alan Hayward <alan.hayward@arm.com>
22368 David Sherwood <david.sherwood@arm.com>
22369
22370 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22371 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22372 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22373 (cond_umax@var{mode}): Document.
22374 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22375 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22376 (cond_umin_optab, cond_umax_optab): New optabs.
22377 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22378 (COND_IOR, COND_XOR): New internal functions.
22379 * internal-fn.h (get_conditional_internal_fn): Declare.
22380 * internal-fn.c (cond_binary_direct): New macro.
22381 (expand_cond_binary_optab_fn): Likewise.
22382 (direct_cond_binary_optab_supported_p): Likewise.
22383 (get_conditional_internal_fn): New function.
22384 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22385 Cope with reduction statements that are vectorized as calls rather
22386 than assignments.
22387 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22388 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22389 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22390 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22391 (UNSPEC_COND_EOR): New unspecs.
22392 (optab): Add mappings for them.
22393 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22394 (sve_int_op, sve_fp_op): New int attributes.
22395
22396 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22397 Alan Hayward <alan.hayward@arm.com>
22398 David Sherwood <david.sherwood@arm.com>
22399
22400 * optabs.def (while_ult_optab): New optab.
22401 * doc/md.texi (while_ult@var{m}@var{n}): Document.
22402 * internal-fn.def (WHILE_ULT): New internal function.
22403 * internal-fn.h (direct_internal_fn_supported_p): New override
22404 that takes two types as argument.
22405 * internal-fn.c (while_direct): New macro.
22406 (expand_while_optab_fn): New function.
22407 (convert_optab_supported_p): Likewise.
22408 (direct_while_optab_supported_p): New macro.
22409 * wide-int.h (wi::udiv_ceil): New function.
22410 * tree-vectorizer.h (rgroup_masks): New structure.
22411 (vec_loop_masks): New typedef.
22412 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22413 and fully_masked_p.
22414 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22415 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22416 (vect_max_vf): New function.
22417 (slpeel_make_loop_iterate_ntimes): Delete.
22418 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22419 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22420 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22421 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22422 internal-fn.h, stor-layout.h and optabs-query.h.
22423 (vect_set_loop_mask): New function.
22424 (add_preheader_seq): Likewise.
22425 (add_header_seq): Likewise.
22426 (interleave_supported_p): Likewise.
22427 (vect_maybe_permute_loop_masks): Likewise.
22428 (vect_set_loop_masks_directly): Likewise.
22429 (vect_set_loop_condition_masked): Likewise.
22430 (vect_set_loop_condition_unmasked): New function, split out from
22431 slpeel_make_loop_iterate_ntimes.
22432 (slpeel_make_loop_iterate_ntimes): Rename to..
22433 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
22434 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22435 (vect_do_peeling): Update call accordingly.
22436 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22437 loops.
22438 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22439 mask_compare_type, can_fully_mask_p and fully_masked_p.
22440 (release_vec_loop_masks): New function.
22441 (_loop_vec_info): Use it to free the loop masks.
22442 (can_produce_all_loop_masks_p): New function.
22443 (vect_get_max_nscalars_per_iter): Likewise.
22444 (vect_verify_full_masking): Likewise.
22445 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22446 retries, and free the mask rgroups before retrying. Check loop-wide
22447 reasons for disallowing fully-masked loops. Make the final decision
22448 about whether use a fully-masked loop or not.
22449 (vect_estimate_min_profitable_iters): Do not assume that peeling
22450 for the number of iterations will be needed for fully-masked loops.
22451 (vectorizable_reduction): Disable fully-masked loops.
22452 (vectorizable_live_operation): Likewise.
22453 (vect_halve_mask_nunits): New function.
22454 (vect_double_mask_nunits): Likewise.
22455 (vect_record_loop_mask): Likewise.
22456 (vect_get_loop_mask): Likewise.
22457 (vect_transform_loop): Handle the case in which the final loop
22458 iteration might handle a partial vector. Call vect_set_loop_condition
22459 instead of slpeel_make_loop_iterate_ntimes.
22460 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22461 (check_load_store_masking): New function.
22462 (prepare_load_store_mask): Likewise.
22463 (vectorizable_store): Handle fully-masked loops.
22464 (vectorizable_load): Likewise.
22465 (supportable_widening_operation): Use vect_halve_mask_nunits for
22466 booleans.
22467 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22468 (vect_gen_while): New function.
22469 * config/aarch64/aarch64.md (umax<mode>3): New expander.
22470 (aarch64_uqdec<mode>): New insn.
22471
22472 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22473 Alan Hayward <alan.hayward@arm.com>
22474 David Sherwood <david.sherwood@arm.com>
22475
22476 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22477 (reduc_xor_scal_optab): New optabs.
22478 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22479 (reduc_xor_scal_@var{m}): Document.
22480 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22481 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22482 internal functions.
22483 * fold-const-call.c (fold_const_call): Handle them.
22484 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22485 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22486 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22487 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22488 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22489 (UNSPEC_XORV): New unspecs.
22490 (optab): Add entries for them.
22491 (BITWISEV): New int iterator.
22492 (bit_reduc_op): New int attributes.
22493
22494 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22495 Alan Hayward <alan.hayward@arm.com>
22496 David Sherwood <david.sherwood@arm.com>
22497
22498 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22499 * internal-fn.def (VEC_SHL_INSERT): New internal function.
22500 * optabs.def (vec_shl_insert_optab): New optab.
22501 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22502 (duplicate_and_interleave): Likewise.
22503 * tree-vect-loop.c: Include internal-fn.h.
22504 (neutral_op_for_slp_reduction): New function, split out from
22505 get_initial_defs_for_reduction.
22506 (get_initial_def_for_reduction): Handle option 2 for variable-length
22507 vectors by loading the neutral value into a vector and then shifting
22508 the initial value into element 0.
22509 (get_initial_defs_for_reduction): Replace the code argument with
22510 the neutral value calculated by neutral_op_for_slp_reduction.
22511 Use gimple_build_vector for constant-length vectors.
22512 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22513 but the first group_size elements have a neutral value.
22514 Use duplicate_and_interleave otherwise.
22515 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22516 Update call to get_initial_defs_for_reduction. Handle SLP
22517 reductions for variable-length vectors by creating one vector
22518 result for each scalar result, with the elements associated
22519 with other scalar results stubbed out with the neutral value.
22520 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22521 Require IFN_VEC_SHL_INSERT for double reductions on
22522 variable-length vectors, or SLP reductions that have
22523 a neutral value. Require can_duplicate_and_interleave_p
22524 support for variable-length unchained SLP reductions if there
22525 is no neutral value, such as for MIN/MAX reductions. Also require
22526 the number of vector elements to be a multiple of the number of
22527 SLP statements when doing variable-length unchained SLP reductions.
22528 Update call to vect_create_epilog_for_reduction.
22529 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22530 and remove initial values.
22531 (duplicate_and_interleave): Make public.
22532 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22533 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22534
22535 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22536 Alan Hayward <alan.hayward@arm.com>
22537 David Sherwood <david.sherwood@arm.com>
22538
22539 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22540 (can_duplicate_and_interleave_p): New function.
22541 (vect_get_and_check_slp_defs): Take the vector of statements
22542 rather than just the current one. Remove excess parentheses.
22543 Restriction rejectinon of vect_constant_def and vect_external_def
22544 for variable-length vectors to boolean types, or types for which
22545 can_duplicate_and_interleave_p is false.
22546 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22547 (duplicate_and_interleave): New function.
22548 (vect_get_constant_vectors): Use gimple_build_vector for
22549 constant-length vectors and suitable variable-length constant
22550 vectors. Use duplicate_and_interleave for other variable-length
22551 vectors. Don't defer the update when inserting new statements.
22552
22553 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22554 Alan Hayward <alan.hayward@arm.com>
22555 David Sherwood <david.sherwood@arm.com>
22556
22557 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22558 min_profitable_iters doesn't go negative.
22559
22560 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22561 Alan Hayward <alan.hayward@arm.com>
22562 David Sherwood <david.sherwood@arm.com>
22563
22564 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22565 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22566 * optabs.def (vec_mask_load_lanes_optab): New optab.
22567 (vec_mask_store_lanes_optab): Likewise.
22568 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22569 (MASK_STORE_LANES): Likewise.
22570 * internal-fn.c (mask_load_lanes_direct): New macro.
22571 (mask_store_lanes_direct): Likewise.
22572 (expand_mask_load_optab_fn): Handle masked operations.
22573 (expand_mask_load_lanes_optab_fn): New macro.
22574 (expand_mask_store_optab_fn): Handle masked operations.
22575 (expand_mask_store_lanes_optab_fn): New macro.
22576 (direct_mask_load_lanes_optab_supported_p): Likewise.
22577 (direct_mask_store_lanes_optab_supported_p): Likewise.
22578 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22579 parameter.
22580 (vect_load_lanes_supported): Likewise.
22581 * tree-vect-data-refs.c (strip_conversion): New function.
22582 (can_group_stmts_p): Likewise.
22583 (vect_analyze_data_ref_accesses): Use it instead of checking
22584 for a pair of assignments.
22585 (vect_store_lanes_supported): Take a masked_p parameter.
22586 (vect_load_lanes_supported): Likewise.
22587 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22588 vect_store_lanes_supported and vect_load_lanes_supported.
22589 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22590 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22591 parameter. Don't allow gaps for masked accesses.
22592 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22593 and vect_load_lanes_supported.
22594 (get_load_store_type): Take a masked_p parameter and update
22595 call to get_group_load_store_type.
22596 (vectorizable_store): Update call to get_load_store_type.
22597 Handle IFN_MASK_STORE_LANES.
22598 (vectorizable_load): Update call to get_load_store_type.
22599 Handle IFN_MASK_LOAD_LANES.
22600
22601 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22602 Alan Hayward <alan.hayward@arm.com>
22603 David Sherwood <david.sherwood@arm.com>
22604
22605 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22606 modes for SVE.
22607 * config/aarch64/aarch64-protos.h
22608 (aarch64_sve_struct_memory_operand_p): Declare.
22609 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22610 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22611 (VPRED, vpred): Handle SVE structure modes.
22612 * config/aarch64/constraints.md (Utx): New constraint.
22613 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22614 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22615 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22616 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22617 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22618 structure modes. Split into pieces after RA.
22619 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22620 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22621 New patterns.
22622 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22623 SVE structure modes.
22624 (aarch64_classify_address): Likewise.
22625 (sizetochar): Move earlier in file.
22626 (aarch64_print_operand): Handle SVE register lists.
22627 (aarch64_array_mode): New function.
22628 (aarch64_sve_struct_memory_operand_p): Likewise.
22629 (TARGET_ARRAY_MODE): Redefine.
22630
22631 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22632 Alan Hayward <alan.hayward@arm.com>
22633 David Sherwood <david.sherwood@arm.com>
22634
22635 * target.def (array_mode): New target hook.
22636 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22637 * doc/tm.texi: Regenerate.
22638 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22639 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22640 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22641 targetm.array_mode.
22642 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22643 type sizes.
22644
22645 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22646 Alan Hayward <alan.hayward@arm.com>
22647 David Sherwood <david.sherwood@arm.com>
22648
22649 * fold-const.c (fold_binary_loc): Check the argument types
22650 rather than the result type when testing for a vector operation.
22651
22652 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22653
22654 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22655 * doc/tm.texi: Regenerate.
22656
22657 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22658 Alan Hayward <alan.hayward@arm.com>
22659 David Sherwood <david.sherwood@arm.com>
22660
22661 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22662 (sve): Document new AArch64 extension.
22663 * doc/md.texi (w): Extend the description of the AArch64
22664 constraint to include SVE vectors.
22665 (Upl, Upa): Document new AArch64 predicate constraints.
22666 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22667 enum.
22668 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22669 (msve-vector-bits=): New option.
22670 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22671 SVE when these are disabled.
22672 (sve): New extension.
22673 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22674 modes. Adjust their number of units based on aarch64_sve_vg.
22675 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22676 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22677 aarch64_addr_query_type.
22678 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22679 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22680 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22681 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22682 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22683 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22684 (aarch64_simd_imm_zero_p): Delete.
22685 (aarch64_check_zero_based_sve_index_immediate): Declare.
22686 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22687 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22688 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22689 (aarch64_sve_float_mul_immediate_p): Likewise.
22690 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22691 rather than an rtx.
22692 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22693 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22694 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22695 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22696 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22697 (aarch64_regmode_natural_size): Likewise.
22698 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22699 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22700 left one place.
22701 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22702 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22703 for VG and the SVE predicate registers.
22704 (V_ALIASES): Add a "z"-prefixed alias.
22705 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22706 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22707 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22708 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22709 (REG_CLASS_NAMES): Add entries for them.
22710 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22711 and the predicate registers.
22712 (aarch64_sve_vg): Declare.
22713 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22714 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22715 (REGMODE_NATURAL_SIZE): Define.
22716 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22717 SVE macros.
22718 * config/aarch64/aarch64.c: Include cfgrtl.h.
22719 (simd_immediate_info): Add a constructor for series vectors,
22720 and an associated step field.
22721 (aarch64_sve_vg): New variable.
22722 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22723 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22724 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22725 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22726 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22727 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22728 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22729 (aarch64_get_mask_mode): New functions.
22730 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22731 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22732 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22733 predicate modes and predicate registers. Explicitly restrict
22734 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22735 to store a vector mode if it is recognized by
22736 aarch64_classify_vector_mode.
22737 (aarch64_regmode_natural_size): New function.
22738 (aarch64_hard_regno_caller_save_mode): Return the original mode
22739 for predicates.
22740 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22741 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22742 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22743 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22744 functions.
22745 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22746 does not overlap dest if the function is frame-related. Handle
22747 SVE constants.
22748 (aarch64_split_add_offset): New function.
22749 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22750 them aarch64_add_offset.
22751 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22752 and update call to aarch64_sub_sp.
22753 (aarch64_add_cfa_expression): New function.
22754 (aarch64_expand_prologue): Pass extra temporary registers to the
22755 functions above. Handle the case in which we need to emit new
22756 DW_CFA_expressions for registers that were originally saved
22757 relative to the stack pointer, but now have to be expressed
22758 relative to the frame pointer.
22759 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22760 functions above.
22761 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22762 IP0 and IP1 values for SVE frames.
22763 (aarch64_expand_vec_series): New function.
22764 (aarch64_expand_sve_widened_duplicate): Likewise.
22765 (aarch64_expand_sve_const_vector): Likewise.
22766 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22767 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22768 into the register, rather than emitting a SET directly.
22769 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22770 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22771 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22772 (offset_9bit_signed_scaled_p): New functions.
22773 (aarch64_replicate_bitmask_imm): New function.
22774 (aarch64_bitmask_imm): Use it.
22775 (aarch64_cannot_force_const_mem): Reject expressions involving
22776 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22777 (aarch64_classify_index): Handle SVE indices, by requiring
22778 a plain register index with a scale that matches the element size.
22779 (aarch64_classify_address): Handle SVE addresses. Assert that
22780 the mode of the address is VOIDmode or an integer mode.
22781 Update call to aarch64_classify_symbol.
22782 (aarch64_classify_symbolic_expression): Update call to
22783 aarch64_classify_symbol.
22784 (aarch64_const_vec_all_in_range_p): New function.
22785 (aarch64_print_vector_float_operand): Likewise.
22786 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22787 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22788 and the FP immediates 1.0 and 0.5.
22789 (aarch64_print_address_internal): Handle SVE addresses.
22790 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22791 (aarch64_regno_regclass): Handle predicate registers.
22792 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22793 data modes.
22794 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22795 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22796 (aarch64_convert_sve_vector_bits): New function.
22797 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22798 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22799 rather than an rtx.
22800 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22801 Handle SVE vector and predicate modes. Accept VL-based constants
22802 that need only one temporary register, and VL offsets that require
22803 no temporary registers.
22804 (aarch64_conditional_register_usage): Mark the predicate registers
22805 as fixed if SVE isn't available.
22806 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22807 Return true for SVE vector and predicate modes.
22808 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22809 rather than an unsigned int. Handle SVE modes.
22810 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22811 SVE modes.
22812 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22813 if SVE is enabled.
22814 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22815 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22816 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22817 (aarch64_sve_float_mul_immediate_p): New functions.
22818 (aarch64_sve_valid_immediate): New function.
22819 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22820 Explicitly reject structure modes. Check for INDEX constants.
22821 Handle PTRUE and PFALSE constants.
22822 (aarch64_check_zero_based_sve_index_immediate): New function.
22823 (aarch64_simd_imm_zero_p): Delete.
22824 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22825 vector modes. Accept constants in the range of CNT[BHWD].
22826 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22827 ask for an Advanced SIMD mode.
22828 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22829 (aarch64_simd_vector_alignment): Handle SVE predicates.
22830 (aarch64_vectorize_preferred_vector_alignment): New function.
22831 (aarch64_simd_vector_alignment_reachable): Use it instead of
22832 the vector size.
22833 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22834 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22835 functions.
22836 (MAX_VECT_LEN): Delete.
22837 (expand_vec_perm_d): Add a vec_flags field.
22838 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22839 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22840 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22841 for SVE modes.
22842 (aarch64_evpc_rev): Rename to...
22843 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22844 (aarch64_evpc_rev_global): New function.
22845 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22846 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22847 MAX_VECT_LEN.
22848 (aarch64_evpc_sve_tbl): New function.
22849 (aarch64_expand_vec_perm_const_1): Update after rename of
22850 aarch64_evpc_rev. Handle SVE permutes too, trying
22851 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22852 than aarch64_evpc_tbl.
22853 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22854 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22855 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22856 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22857 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22858 (aarch64_expand_sve_vcond): New functions.
22859 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22860 of aarch64_vector_mode_p.
22861 (aarch64_dwarf_poly_indeterminate_value): New function.
22862 (aarch64_compute_pressure_classes): Likewise.
22863 (aarch64_can_change_mode_class): Likewise.
22864 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22865 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22866 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22867 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22868 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22869 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22870 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22871 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22872 constraints.
22873 (Dn, Dl, Dr): Accept const as well as const_vector.
22874 (Dz): Likewise. Compare against CONST0_RTX.
22875 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22876 of "vector" where appropriate.
22877 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22878 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22879 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22880 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22881 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22882 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22883 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22884 (v_int_equiv): Extend to SVE modes.
22885 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22886 mode attributes.
22887 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22888 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22889 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22890 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22891 (SVE_COND_FP_CMP): New int iterators.
22892 (perm_hilo): Handle the new unpack unspecs.
22893 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22894 attributes.
22895 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22896 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22897 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22898 (aarch64_equality_operator, aarch64_constant_vector_operand)
22899 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22900 (aarch64_sve_nonimmediate_operand): Likewise.
22901 (aarch64_sve_general_operand): Likewise.
22902 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22903 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22904 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22905 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22906 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22907 (aarch64_sve_float_arith_immediate): Likewise.
22908 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22909 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22910 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22911 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22912 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22913 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22914 (aarch64_sve_float_arith_operand): Likewise.
22915 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22916 (aarch64_sve_float_mul_operand): Likewise.
22917 (aarch64_sve_vec_perm_operand): Likewise.
22918 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22919 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22920 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22921 as well as const_vector.
22922 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22923 in file. Use CONST0_RTX and CONSTM1_RTX.
22924 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22925 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22926 Use aarch64_simd_imm_zero.
22927 * config/aarch64/aarch64-sve.md: New file.
22928 * config/aarch64/aarch64.md: Include it.
22929 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22930 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22931 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22932 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22933 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22934 (sve): New attribute.
22935 (enabled): Disable instructions with the sve attribute unless
22936 TARGET_SVE.
22937 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22938 aarch64_expand_mov_immediate.
22939 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22940 CNT[BHSD] immediates.
22941 (movti): Split CONST_POLY_INT moves into two halves.
22942 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22943 Split additions that need a temporary here if the destination
22944 is the stack pointer.
22945 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22946 (*add<mode>3_poly_1): New instruction.
22947 (set_clobber_cc): New expander.
22948
22949 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22950
22951 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22952 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22953 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22954 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22955 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22956 Change innermode from fixed_mode_size to machine_mode.
22957 (simplify_subreg): Update call accordingly. Handle a constant-sized
22958 subreg of a variable-length CONST_VECTOR.
22959
22960 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22961 Alan Hayward <alan.hayward@arm.com>
22962 David Sherwood <david.sherwood@arm.com>
22963
22964 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22965 (add_offset_to_base): New function, split out from...
22966 (create_mem_ref): ...here. When handling a scale other than 1,
22967 check first whether the address is valid without the offset.
22968 Add it into the base if so, leaving the index and scale as-is.
22969
22970 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22971
22972 PR c++/83778
22973 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22974 fold_for_warn before checking if arg2 is INTEGER_CST.
22975
22976 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22977
22978 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22979 (store_multiple_operation): Delete.
22980 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22981 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22982 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22983 guarded by TARGET_STRING.
22984 (rs6000_output_load_multiple): Delete.
22985 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22986 OPTION_MASK_STRING / TARGET_STRING handling.
22987 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22988 (const rs6000_opt_masks) <"string">: Change mask to 0.
22989 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22990 (MASK_STRING): Delete.
22991 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22992 parts. Simplify.
22993 (load_multiple): Delete.
22994 (*ldmsi8): Delete.
22995 (*ldmsi7): Delete.
22996 (*ldmsi6): Delete.
22997 (*ldmsi5): Delete.
22998 (*ldmsi4): Delete.
22999 (*ldmsi3): Delete.
23000 (store_multiple): Delete.
23001 (*stmsi8): Delete.
23002 (*stmsi7): Delete.
23003 (*stmsi6): Delete.
23004 (*stmsi5): Delete.
23005 (*stmsi4): Delete.
23006 (*stmsi3): Delete.
23007 (movmemsi_8reg): Delete.
23008 (corresponding unnamed define_insn): Delete.
23009 (movmemsi_6reg): Delete.
23010 (corresponding unnamed define_insn): Delete.
23011 (movmemsi_4reg): Delete.
23012 (corresponding unnamed define_insn): Delete.
23013 (movmemsi_2reg): Delete.
23014 (corresponding unnamed define_insn): Delete.
23015 (movmemsi_1reg): Delete.
23016 (corresponding unnamed define_insn): Delete.
23017 * config/rs6000/rs6000.opt (mno-string): New.
23018 (mstring): Replace by deprecation warning stub.
23019 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
23020
23021 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23022
23023 * regrename.c (regrename_do_replace): If replacing the same
23024 reg multiple times, try to reuse last created gen_raw_REG.
23025
23026 PR debug/81155
23027 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
23028 main to workaround a bug in GDB.
23029
23030 2018-01-12 Tom de Vries <tom@codesourcery.com>
23031
23032 PR target/83737
23033 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
23034
23035 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
23036
23037 PR rtl-optimization/80481
23038 * ira-color.c (get_cap_member): New function.
23039 (allocnos_conflict_by_live_ranges_p): Use it.
23040 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
23041 (setup_slot_coalesced_allocno_live_ranges): Ditto.
23042
23043 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
23044
23045 PR target/83628
23046 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
23047 (*saddl_se_1): Ditto.
23048 (*ssubsi_1): Ditto.
23049 (*ssubl_se_1): Ditto.
23050
23051 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23052
23053 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
23054 rather than wi::to_widest for DR_INITs.
23055 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
23056 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
23057 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
23058 INTEGER_CSTs.
23059 (vect_analyze_group_access_1): Note that here.
23060
23061 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23062
23063 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
23064 polynomial type sizes.
23065
23066 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23067
23068 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
23069 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
23070 (gimple_add_tmp_var): Likewise.
23071
23072 2018-01-12 Martin Liska <mliska@suse.cz>
23073
23074 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
23075 (gimple_alloc_sizes): Likewise.
23076 (dump_gimple_statistics): Use PRIu64 in printf format.
23077 * gimple.h: Change uint64_t to int.
23078
23079 2018-01-12 Martin Liska <mliska@suse.cz>
23080
23081 * tree-core.h: Use uint64_t instead of int.
23082 * tree.c (tree_node_counts): Likewise.
23083 (tree_node_sizes): Likewise.
23084 (dump_tree_statistics): Use PRIu64 in printf format.
23085
23086 2018-01-12 Martin Liska <mliska@suse.cz>
23087
23088 * Makefile.in: As qsort_chk is implemented in vec.c, add
23089 vec.o to linkage of gencfn-macros.
23090 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
23091 passing the info to record_node_allocation_statistics.
23092 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
23093 and pass the info.
23094 * ggc-common.c (struct ggc_usage): Add operator== and use
23095 it in operator< and compare function.
23096 * mem-stats.h (struct mem_usage): Likewise.
23097 * vec.c (struct vec_usage): Remove operator< and compare
23098 function. Can be simply inherited.
23099
23100 2018-01-12 Martin Jambor <mjambor@suse.cz>
23101
23102 PR target/81616
23103 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
23104 * tree-ssa-math-opts.c: Include domwalk.h.
23105 (convert_mult_to_fma_1): New function.
23106 (fma_transformation_info): New type.
23107 (fma_deferring_state): Likewise.
23108 (cancel_fma_deferring): New function.
23109 (result_of_phi): Likewise.
23110 (last_fma_candidate_feeds_initial_phi): Likewise.
23111 (convert_mult_to_fma): Added deferring logic, split actual
23112 transformation to convert_mult_to_fma_1.
23113 (math_opts_dom_walker): New type.
23114 (math_opts_dom_walker::after_dom_children): New method, body moved
23115 here from pass_optimize_widening_mul::execute, added deferring logic
23116 bits.
23117 (pass_optimize_widening_mul::execute): Moved most of code to
23118 math_opts_dom_walker::after_dom_children.
23119 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
23120 * config/i386/i386.c (ix86_option_override_internal): Added
23121 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
23122
23123 2018-01-12 Richard Biener <rguenther@suse.de>
23124
23125 PR debug/83157
23126 * dwarf2out.c (gen_variable_die): Do not reset old_die for
23127 inline instance vars.
23128
23129 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
23130
23131 PR target/81819
23132 * config/rx/rx.c (rx_is_restricted_memory_address):
23133 Handle SUBREG case.
23134
23135 2018-01-12 Richard Biener <rguenther@suse.de>
23136
23137 PR tree-optimization/80846
23138 * target.def (split_reduction): New target hook.
23139 * targhooks.c (default_split_reduction): New function.
23140 * targhooks.h (default_split_reduction): Declare.
23141 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
23142 target requests first reduce vectors by combining low and high
23143 parts.
23144 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
23145 (get_vectype_for_scalar_type_and_size): Export.
23146 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
23147 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
23148 * doc/tm.texi: Regenerate.
23149 * config/i386/i386.c (ix86_split_reduction): Implement
23150 TARGET_VECTORIZE_SPLIT_REDUCTION.
23151
23152 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23153
23154 PR target/83368
23155 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
23156 in PIC mode except for TARGET_VXWORKS_RTP.
23157 * config/sparc/sparc.c: Include cfgrtl.h.
23158 (TARGET_INIT_PIC_REG): Define.
23159 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
23160 (sparc_pic_register_p): New predicate.
23161 (sparc_legitimate_address_p): Use it.
23162 (sparc_legitimize_pic_address): Likewise.
23163 (sparc_delegitimize_address): Likewise.
23164 (sparc_mode_dependent_address_p): Likewise.
23165 (gen_load_pcrel_sym): Remove 4th parameter.
23166 (load_got_register): Adjust call to above. Remove obsolete stuff.
23167 (sparc_expand_prologue): Do not call load_got_register here.
23168 (sparc_flat_expand_prologue): Likewise.
23169 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
23170 (sparc_use_pseudo_pic_reg): New function.
23171 (sparc_init_pic_reg): Likewise.
23172 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23173 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
23174
23175 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
23176
23177 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23178 Add item for branch_cost.
23179
23180 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23181
23182 PR rtl-optimization/83565
23183 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
23184 not extend the result to a larger mode for rotate operations.
23185 (num_sign_bit_copies1): Likewise.
23186
23187 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23188
23189 PR target/40411
23190 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
23191 -symbolic.
23192 Use values-Xc.o for -pedantic.
23193 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
23194
23195 2018-01-12 Martin Liska <mliska@suse.cz>
23196
23197 PR ipa/83054
23198 * ipa-devirt.c (final_warning_record::grow_type_warnings):
23199 New function.
23200 (possible_polymorphic_call_targets): Use it.
23201 (ipa_devirt): Likewise.
23202
23203 2018-01-12 Martin Liska <mliska@suse.cz>
23204
23205 * profile-count.h (enum profile_quality): Use 0 as invalid
23206 enum value of profile_quality.
23207
23208 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
23209
23210 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
23211 -mext-string options.
23212
23213 2018-01-12 Richard Biener <rguenther@suse.de>
23214
23215 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
23216 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
23217 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
23218 Likewise.
23219 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
23220
23221 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23222
23223 * configure.ac (--with-long-double-format): Add support for the
23224 configuration option to change the default long double format on
23225 PowerPC systems.
23226 * config.gcc (powerpc*-linux*-*): Likewise.
23227 * configure: Regenerate.
23228 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
23229 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
23230 used without modification.
23231
23232 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23233
23234 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
23235 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
23236 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
23237 MISC_BUILTIN_SPEC_BARRIER.
23238 (rs6000_init_builtins): Likewise.
23239 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
23240 enum value.
23241 (speculation_barrier): New define_insn.
23242 * doc/extend.texi: Document __builtin_speculation_barrier.
23243
23244 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23245
23246 PR target/83203
23247 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
23248 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
23249 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
23250 iterators.
23251 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
23252 integral modes instead of "ss" and "sd".
23253 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
23254 vectors with 32-bit and 64-bit elements.
23255 (vecdupssescalarmodesuffix): New mode attribute.
23256 (vec_dup<mode>): Use it.
23257
23258 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
23259
23260 PR target/83330
23261 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
23262 frame if argument is passed on stack.
23263
23264 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23265
23266 PR target/82682
23267 * ree.c (combine_reaching_defs): Optimize also
23268 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
23269 reg2=any_extend(exp); reg1=reg2;, formatting fix.
23270
23271 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23272
23273 PR middle-end/83189
23274 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
23275
23276 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23277
23278 PR middle-end/83718
23279 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
23280 after they are computed.
23281
23282 2018-01-11 Bin Cheng <bin.cheng@arm.com>
23283
23284 PR tree-optimization/83695
23285 * gimple-loop-linterchange.cc
23286 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
23287 reset cached scev information after interchange.
23288 (pass_linterchange::execute): Remove call to scev_reset_htab.
23289
23290 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23291
23292 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
23293 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
23294 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
23295 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
23296 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
23297 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
23298 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
23299 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
23300 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
23301 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
23302 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
23303 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
23304 (V_lane_reg): Likewise.
23305 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
23306 New define_expand.
23307 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
23308 (vfmal_lane_low<mode>_intrinsic,
23309 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
23310 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
23311 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
23312 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
23313 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
23314 vfmsl_lane_high<mode>_intrinsic): New define_insns.
23315
23316 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23317
23318 * config/arm/arm-cpus.in (fp16fml): New feature.
23319 (ALL_SIMD): Add fp16fml.
23320 (armv8.2-a): Add fp16fml as an option.
23321 (armv8.3-a): Likewise.
23322 (armv8.4-a): Add fp16fml as part of fp16.
23323 * config/arm/arm.h (TARGET_FP16FML): Define.
23324 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
23325 when appropriate.
23326 * config/arm/arm-modes.def (V2HF): Define.
23327 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
23328 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
23329 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
23330 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
23331 vfmsl_low, vfmsl_high): New set of builtins.
23332 * config/arm/iterators.md (PLUSMINUS): New code iterator.
23333 (vfml_op): New code attribute.
23334 (VFMLHALVES): New int iterator.
23335 (VFML, VFMLSEL): New mode attributes.
23336 (V_reg): Define mapping for V2HF.
23337 (V_hi, V_lo): New mode attributes.
23338 (VF_constraint): Likewise.
23339 (vfml_half, vfml_half_selector): New int attributes.
23340 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23341 define_expand.
23342 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23343 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23344 New define_insn.
23345 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23346 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23347 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23348 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
23349 documentation.
23350 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23351 Document new effective target and option set.
23352
23353 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23354
23355 * config/arm/arm-cpus.in (armv8_4): New feature.
23356 (ARMv8_4a): New fgroup.
23357 (armv8.4-a): New arch.
23358 * config/arm/arm-tables.opt: Regenerate.
23359 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23360 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23361 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23362 Add matching rules for -march=armv8.4-a and extensions.
23363 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23364
23365 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
23366
23367 PR target/81821
23368 * config/rx/rx.md (BW): New mode attribute.
23369 (sync_lock_test_and_setsi): Add mode suffix to insn output.
23370
23371 2018-01-11 Richard Biener <rguenther@suse.de>
23372
23373 PR tree-optimization/83435
23374 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23375 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23376 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23377
23378 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23379 Alan Hayward <alan.hayward@arm.com>
23380 David Sherwood <david.sherwood@arm.com>
23381
23382 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23383 field.
23384 (aarch64_classify_address): Initialize it. Track polynomial offsets.
23385 (aarch64_print_address_internal): Use it to check for a zero offset.
23386
23387 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23388 Alan Hayward <alan.hayward@arm.com>
23389 David Sherwood <david.sherwood@arm.com>
23390
23391 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23392 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23393 Return a poly_int64 rather than a HOST_WIDE_INT.
23394 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23395 rather than a HOST_WIDE_INT.
23396 * config/aarch64/aarch64.h (aarch64_frame): Protect with
23397 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
23398 hard_fp_offset, frame_size, initial_adjust, callee_offset and
23399 final_offset from HOST_WIDE_INT to poly_int64.
23400 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23401 to_constant when getting the number of units in an Advanced SIMD
23402 mode.
23403 (aarch64_builtin_vectorized_function): Check for a constant number
23404 of units.
23405 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23406 GET_MODE_SIZE.
23407 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23408 attribute instead of GET_MODE_NUNITS.
23409 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23410 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23411 GET_MODE_SIZE for fixed-size registers.
23412 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23413 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23414 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23415 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23416 (aarch64_print_operand, aarch64_print_address_internal)
23417 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23418 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23419 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23420 Handle polynomial GET_MODE_SIZE.
23421 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
23422 wider than SImode without modification.
23423 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23424 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23425 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23426 passing and returning SVE modes.
23427 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23428 rather than GEN_INT.
23429 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23430 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23431 (aarch64_allocate_and_probe_stack_space): Likewise.
23432 (aarch64_layout_frame): Cope with polynomial offsets.
23433 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23434 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
23435 polynomial offsets.
23436 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23437 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23438 poly_int64 rather than a HOST_WIDE_INT.
23439 (aarch64_get_separate_components, aarch64_process_components)
23440 (aarch64_expand_prologue, aarch64_expand_epilogue)
23441 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23442 (aarch64_anchor_offset): New function, split out from...
23443 (aarch64_legitimize_address): ...here.
23444 (aarch64_builtin_vectorization_cost): Handle polynomial
23445 TYPE_VECTOR_SUBPARTS.
23446 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23447 GET_MODE_NUNITS.
23448 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23449 number of elements from the PARALLEL rather than the mode.
23450 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23451 rather than GET_MODE_BITSIZE.
23452 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23453 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23454 (aarch64_expand_vec_perm_const_1): Handle polynomial
23455 d->perm.length () and d->perm elements.
23456 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
23457 Apply to_constant to d->perm elements.
23458 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23459 polynomial CONST_VECTOR_NUNITS.
23460 (aarch64_move_pointer): Take amount as a poly_int64 rather
23461 than an int.
23462 (aarch64_progress_pointer): Avoid temporary variable.
23463 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23464 the mode attribute instead of GET_MODE.
23465
23466 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23467 Alan Hayward <alan.hayward@arm.com>
23468 David Sherwood <david.sherwood@arm.com>
23469
23470 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23471 x exists before using it.
23472 (aarch64_add_constant_internal): Rename to...
23473 (aarch64_add_offset_1): ...this. Replace regnum with separate
23474 src and dest rtxes. Handle the case in which they're different,
23475 including when the offset is zero. Replace scratchreg with an rtx.
23476 Use 2 additions if there is no spare register into which we can
23477 move a 16-bit constant.
23478 (aarch64_add_constant): Delete.
23479 (aarch64_add_offset): Replace reg with separate src and dest
23480 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
23481 Use aarch64_add_offset_1.
23482 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23483 an rtx rather than an int. Take the delta as a poly_int64
23484 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
23485 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23486 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23487 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23488 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23489 and aarch64_add_sp.
23490 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23491 aarch64_add_constant.
23492
23493 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23494
23495 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23496 Use scalar_float_mode.
23497
23498 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23499
23500 * config/aarch64/aarch64-simd.md
23501 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23502 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23503 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23504 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23505 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23506 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23507 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23508 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23509 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23510 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23511
23512 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23513
23514 PR target/83514
23515 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23516 targ_options->x_arm_arch_string is non NULL.
23517
23518 2018-01-11 Tamar Christina <tamar.christina@arm.com>
23519
23520 * config/aarch64/aarch64.h
23521 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
23522
23523 2018-01-11 Sudakshina Das <sudi.das@arm.com>
23524
23525 PR target/82096
23526 * expmed.c (emit_store_flag_force): Swap if const op0
23527 and change VOIDmode to mode of op0.
23528
23529 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23530
23531 PR rtl-optimization/83761
23532 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23533 than bytes to mode_for_size.
23534
23535 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23536
23537 PR middle-end/83189
23538 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23539 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23540 profile.
23541
23542 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23543
23544 PR middle-end/83575
23545 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23546 when in layout mode.
23547 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23548 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23549 partition fixup.
23550
23551 2018-01-10 Michael Collison <michael.collison@arm.com>
23552
23553 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23554 * config/aarch64/aarch64-option-extension.def: Add
23555 AARCH64_OPT_EXTENSION of 'fp16fml'.
23556 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23557 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23558 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23559 * config/aarch64/constraints.md (Ui7): New constraint.
23560 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23561 (VFMLA_SEL_W): Ditto.
23562 (f16quad): Ditto.
23563 (f16mac1): Ditto.
23564 (VFMLA16_LOW): New int iterator.
23565 (VFMLA16_HIGH): Ditto.
23566 (UNSPEC_FMLAL): New unspec.
23567 (UNSPEC_FMLSL): Ditto.
23568 (UNSPEC_FMLAL2): Ditto.
23569 (UNSPEC_FMLSL2): Ditto.
23570 (f16mac): New code attribute.
23571 * config/aarch64/aarch64-simd-builtins.def
23572 (aarch64_fmlal_lowv2sf): Ditto.
23573 (aarch64_fmlsl_lowv2sf): Ditto.
23574 (aarch64_fmlalq_lowv4sf): Ditto.
23575 (aarch64_fmlslq_lowv4sf): Ditto.
23576 (aarch64_fmlal_highv2sf): Ditto.
23577 (aarch64_fmlsl_highv2sf): Ditto.
23578 (aarch64_fmlalq_highv4sf): Ditto.
23579 (aarch64_fmlslq_highv4sf): Ditto.
23580 (aarch64_fmlal_lane_lowv2sf): Ditto.
23581 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23582 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23583 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23584 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23585 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23586 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23587 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23588 (aarch64_fmlal_lane_highv2sf): Ditto.
23589 (aarch64_fmlsl_lane_highv2sf): Ditto.
23590 (aarch64_fmlal_laneq_highv2sf): Ditto.
23591 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23592 (aarch64_fmlalq_lane_highv4sf): Ditto.
23593 (aarch64_fmlsl_lane_highv4sf): Ditto.
23594 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23595 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23596 * config/aarch64/aarch64-simd.md:
23597 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23598 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23599 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23600 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23601 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23602 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23603 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23604 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23605 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23606 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23607 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23608 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23609 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23610 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23611 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23612 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23613 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23614 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23615 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23616 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23617 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23618 (vfmlsl_low_u32): Ditto.
23619 (vfmlalq_low_u32): Ditto.
23620 (vfmlslq_low_u32): Ditto.
23621 (vfmlal_high_u32): Ditto.
23622 (vfmlsl_high_u32): Ditto.
23623 (vfmlalq_high_u32): Ditto.
23624 (vfmlslq_high_u32): Ditto.
23625 (vfmlal_lane_low_u32): Ditto.
23626 (vfmlsl_lane_low_u32): Ditto.
23627 (vfmlal_laneq_low_u32): Ditto.
23628 (vfmlsl_laneq_low_u32): Ditto.
23629 (vfmlalq_lane_low_u32): Ditto.
23630 (vfmlslq_lane_low_u32): Ditto.
23631 (vfmlalq_laneq_low_u32): Ditto.
23632 (vfmlslq_laneq_low_u32): Ditto.
23633 (vfmlal_lane_high_u32): Ditto.
23634 (vfmlsl_lane_high_u32): Ditto.
23635 (vfmlal_laneq_high_u32): Ditto.
23636 (vfmlsl_laneq_high_u32): Ditto.
23637 (vfmlalq_lane_high_u32): Ditto.
23638 (vfmlslq_lane_high_u32): Ditto.
23639 (vfmlalq_laneq_high_u32): Ditto.
23640 (vfmlslq_laneq_high_u32): Ditto.
23641 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23642 (AARCH64_FL_FOR_ARCH8_4): New.
23643 (AARCH64_ISA_F16FML): New ISA flag.
23644 (TARGET_F16FML): New feature flag for fp16fml.
23645 (doc/invoke.texi): Document new fp16fml option.
23646
23647 2018-01-10 Michael Collison <michael.collison@arm.com>
23648
23649 * config/aarch64/aarch64-builtins.c:
23650 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23651 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23652 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23653 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23654 (AARCH64_ISA_SHA3): New ISA flag.
23655 (TARGET_SHA3): New feature flag for sha3.
23656 * config/aarch64/iterators.md (sha512_op): New int attribute.
23657 (CRYPTO_SHA512): New int iterator.
23658 (UNSPEC_SHA512H): New unspec.
23659 (UNSPEC_SHA512H2): Ditto.
23660 (UNSPEC_SHA512SU0): Ditto.
23661 (UNSPEC_SHA512SU1): Ditto.
23662 * config/aarch64/aarch64-simd-builtins.def
23663 (aarch64_crypto_sha512hqv2di): New builtin.
23664 (aarch64_crypto_sha512h2qv2di): Ditto.
23665 (aarch64_crypto_sha512su0qv2di): Ditto.
23666 (aarch64_crypto_sha512su1qv2di): Ditto.
23667 (aarch64_eor3qv8hi): Ditto.
23668 (aarch64_rax1qv2di): Ditto.
23669 (aarch64_xarqv2di): Ditto.
23670 (aarch64_bcaxqv8hi): Ditto.
23671 * config/aarch64/aarch64-simd.md:
23672 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23673 (aarch64_crypto_sha512su0qv2di): Ditto.
23674 (aarch64_crypto_sha512su1qv2di): Ditto.
23675 (aarch64_eor3qv8hi): Ditto.
23676 (aarch64_rax1qv2di): Ditto.
23677 (aarch64_xarqv2di): Ditto.
23678 (aarch64_bcaxqv8hi): Ditto.
23679 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23680 (vsha512h2q_u64): Ditto.
23681 (vsha512su0q_u64): Ditto.
23682 (vsha512su1q_u64): Ditto.
23683 (veor3q_u16): Ditto.
23684 (vrax1q_u64): Ditto.
23685 (vxarq_u64): Ditto.
23686 (vbcaxq_u16): Ditto.
23687 * config/arm/types.md (crypto_sha512): New type attribute.
23688 (crypto_sha3): Ditto.
23689 (doc/invoke.texi): Document new sha3 option.
23690
23691 2018-01-10 Michael Collison <michael.collison@arm.com>
23692
23693 * config/aarch64/aarch64-builtins.c:
23694 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23695 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23696 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23697 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23698 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23699 (AARCH64_ISA_SM4): New ISA flag.
23700 (TARGET_SM4): New feature flag for sm4.
23701 * config/aarch64/aarch64-simd-builtins.def
23702 (aarch64_sm3ss1qv4si): Ditto.
23703 (aarch64_sm3tt1aq4si): Ditto.
23704 (aarch64_sm3tt1bq4si): Ditto.
23705 (aarch64_sm3tt2aq4si): Ditto.
23706 (aarch64_sm3tt2bq4si): Ditto.
23707 (aarch64_sm3partw1qv4si): Ditto.
23708 (aarch64_sm3partw2qv4si): Ditto.
23709 (aarch64_sm4eqv4si): Ditto.
23710 (aarch64_sm4ekeyqv4si): Ditto.
23711 * config/aarch64/aarch64-simd.md:
23712 (aarch64_sm3ss1qv4si): Ditto.
23713 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23714 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23715 (aarch64_sm4eqv4si): Ditto.
23716 (aarch64_sm4ekeyqv4si): Ditto.
23717 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23718 (sm3part_op): Ditto.
23719 (CRYPTO_SM3TT): Ditto.
23720 (CRYPTO_SM3PART): Ditto.
23721 (UNSPEC_SM3SS1): New unspec.
23722 (UNSPEC_SM3TT1A): Ditto.
23723 (UNSPEC_SM3TT1B): Ditto.
23724 (UNSPEC_SM3TT2A): Ditto.
23725 (UNSPEC_SM3TT2B): Ditto.
23726 (UNSPEC_SM3PARTW1): Ditto.
23727 (UNSPEC_SM3PARTW2): Ditto.
23728 (UNSPEC_SM4E): Ditto.
23729 (UNSPEC_SM4EKEY): Ditto.
23730 * config/aarch64/constraints.md (Ui2): New constraint.
23731 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23732 * config/arm/types.md (crypto_sm3): New type attribute.
23733 (crypto_sm4): Ditto.
23734 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23735 (vsm3tt1aq_u32): Ditto.
23736 (vsm3tt1bq_u32): Ditto.
23737 (vsm3tt2aq_u32): Ditto.
23738 (vsm3tt2bq_u32): Ditto.
23739 (vsm3partw1q_u32): Ditto.
23740 (vsm3partw2q_u32): Ditto.
23741 (vsm4eq_u32): Ditto.
23742 (vsm4ekeyq_u32): Ditto.
23743 (doc/invoke.texi): Document new sm4 option.
23744
23745 2018-01-10 Michael Collison <michael.collison@arm.com>
23746
23747 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23748 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23749 (AARCH64_FL_FOR_ARCH8_4): New.
23750 (AARCH64_FL_V8_4): New flag.
23751 (doc/invoke.texi): Document new armv8.4-a option.
23752
23753 2018-01-10 Michael Collison <michael.collison@arm.com>
23754
23755 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23756 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23757 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23758 * config/aarch64/aarch64-option-extension.def: Add
23759 AARCH64_OPT_EXTENSION of 'sha2'.
23760 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23761 (crypto): Disable sha2 and aes if crypto disabled.
23762 (crypto): Enable aes and sha2 if enabled.
23763 (simd): Disable sha2 and aes if simd disabled.
23764 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23765 New flags.
23766 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23767 (TARGET_SHA2): New feature flag for sha2.
23768 (TARGET_AES): New feature flag for aes.
23769 * config/aarch64/aarch64-simd.md:
23770 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23771 conditional on TARGET_AES.
23772 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23773 (aarch64_crypto_sha1hsi): Make pattern conditional
23774 on TARGET_SHA2.
23775 (aarch64_crypto_sha1hv4si): Ditto.
23776 (aarch64_be_crypto_sha1hv4si): Ditto.
23777 (aarch64_crypto_sha1su1v4si): Ditto.
23778 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23779 (aarch64_crypto_sha1su0v4si): Ditto.
23780 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23781 (aarch64_crypto_sha256su0v4si): Ditto.
23782 (aarch64_crypto_sha256su1v4si): Ditto.
23783 (doc/invoke.texi): Document new aes and sha2 options.
23784
23785 2018-01-10 Martin Sebor <msebor@redhat.com>
23786
23787 PR tree-optimization/83781
23788 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23789 as string arrays.
23790
23791 2018-01-11 Martin Sebor <msebor@gmail.com>
23792 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23793
23794 PR tree-optimization/83501
23795 PR tree-optimization/81703
23796
23797 * tree-ssa-strlen.c (get_string_cst): Rename...
23798 (get_string_len): ...to this. Handle global constants.
23799 (handle_char_store): Adjust.
23800
23801 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23802 Jim Wilson <jimw@sifive.com>
23803
23804 * config/riscv/riscv-protos.h (riscv_output_return): New.
23805 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23806 (riscv_attribute_table, riscv_output_return),
23807 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23808 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23809 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23810 function.
23811 (riscv_expand_prologue): Add early return for naked function.
23812 (riscv_expand_epilogue): Likewise.
23813 (riscv_function_ok_for_sibcall): Return false for naked function.
23814 (riscv_set_current_function): New.
23815 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23816 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23817 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23818 * doc/extend.texi (RISC-V Function Attributes): New.
23819
23820 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23821
23822 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23823 check for 128-bit long double before checking TCmode.
23824 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23825 128-bit long doubles before checking TFmode or TCmode.
23826 (FLOAT128_IBM_P): Likewise.
23827
23828 2018-01-10 Martin Sebor <msebor@redhat.com>
23829
23830 PR tree-optimization/83671
23831 * builtins.c (c_strlen): Unconditionally return zero for the empty
23832 string.
23833 Use -Warray-bounds for warnings.
23834 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23835 for non-constant array indices with COMPONENT_REF, arrays of
23836 arrays, and pointers to arrays.
23837 (gimple_fold_builtin_strlen): Determine and set length range for
23838 non-constant character arrays.
23839
23840 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23841
23842 PR middle-end/81897
23843 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23844 empty blocks.
23845
23846 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23847
23848 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23849
23850 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23851
23852 PR target/83399
23853 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23854 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23855 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23856 indexed_or_indirect_operand predicate.
23857 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23858 (*vsx_le_perm_load_v8hi): Likewise.
23859 (*vsx_le_perm_load_v16qi): Likewise.
23860 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23861 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23862 (*vsx_le_perm_store_v8hi): Likewise.
23863 (*vsx_le_perm_store_v16qi): Likewise.
23864 (eight unnamed splitters): Likewise.
23865
23866 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23867
23868 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23869 * config/rs6000/emmintrin.h: Likewise.
23870 * config/rs6000/mmintrin.h: Likewise.
23871 * config/rs6000/xmmintrin.h: Likewise.
23872
23873 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23874
23875 PR c++/43486
23876 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23877 "public_flag".
23878 * tree.c (tree_nop_conversion): Return true for location wrapper
23879 nodes.
23880 (maybe_wrap_with_location): New function.
23881 (selftest::check_strip_nops): New function.
23882 (selftest::test_location_wrappers): New function.
23883 (selftest::tree_c_tests): Call it.
23884 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23885 (maybe_wrap_with_location): New decl.
23886 (EXPR_LOCATION_WRAPPER_P): New macro.
23887 (location_wrapper_p): New inline function.
23888 (tree_strip_any_location_wrapper): New inline function.
23889
23890 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23891
23892 PR target/83735
23893 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23894 stack_realign_offset for the largest alignment of stack slot
23895 actually used.
23896 (ix86_find_max_used_stack_alignment): New function.
23897 (ix86_finalize_stack_frame_flags): Use it. Set
23898 max_used_stack_alignment if we don't realign stack.
23899 * config/i386/i386.h (machine_function): Add
23900 max_used_stack_alignment.
23901
23902 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23903
23904 * config/arm/arm.opt (-mbranch-cost): New option.
23905 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23906 account.
23907
23908 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23909
23910 PR target/83629
23911 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23912 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23913
23914 2018-01-10 Richard Biener <rguenther@suse.de>
23915
23916 PR debug/83765
23917 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23918 early out so it also covers the case where we have a non-NULL
23919 origin.
23920
23921 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23922
23923 PR tree-optimization/83753
23924 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23925 for non-strided grouped accesses if the number of elements is 1.
23926
23927 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23928
23929 PR target/81616
23930 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23931 * i386.h (TARGET_USE_GATHER): Define.
23932 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23933
23934 2018-01-10 Martin Liska <mliska@suse.cz>
23935
23936 PR bootstrap/82831
23937 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23938 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23939 partitioning.
23940 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23941 CLEANUP_NO_PARTITIONING is not set.
23942
23943 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23944
23945 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23946 for vectors, as a partial revert of r254296.
23947 * rtl.h (const_vec_p): Delete.
23948 (const_vec_duplicate_p): Don't test for vector CONSTs.
23949 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23950 * expmed.c (make_tree): Likewise.
23951
23952 Revert:
23953 * common.md (E, F): Use CONSTANT_P instead of checking for
23954 CONST_VECTOR.
23955 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23956 checking for CONST_VECTOR.
23957
23958 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23959
23960 PR middle-end/83575
23961 * predict.c (force_edge_cold): Handle in more sane way edges
23962 with no prediction.
23963
23964 2018-01-09 Carl Love <cel@us.ibm.com>
23965
23966 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23967 V4SI, V4SF types.
23968 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23969 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23970 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23971 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23972 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23973 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23974 * config/rs6000/rs6000-protos.h: Add extern defition for
23975 rs6000_generate_float2_double_code.
23976 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23977 function.
23978 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23979 (float2_v2df): Add define_expand.
23980
23981 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23982
23983 PR target/83628
23984 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23985 op_mode in the force_to_mode call.
23986
23987 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23988
23989 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23990 instead of checking each element individually.
23991 (aarch64_evpc_uzp): Likewise.
23992 (aarch64_evpc_zip): Likewise.
23993 (aarch64_evpc_ext): Likewise.
23994 (aarch64_evpc_rev): Likewise.
23995 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23996 instead of checking each element individually. Return true without
23997 generating rtl if
23998 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23999 whether all selected elements come from the same input, instead of
24000 checking each element individually. Remove calls to gen_rtx_REG,
24001 start_sequence and end_sequence and instead assert that no rtl is
24002 generated.
24003
24004 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24005
24006 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
24007 order of HIGH and CONST checks.
24008
24009 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24010
24011 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
24012 if the destination isn't an SSA_NAME.
24013
24014 2018-01-09 Richard Biener <rguenther@suse.de>
24015
24016 PR tree-optimization/83668
24017 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
24018 move prologue...
24019 (canonicalize_loop_form): ... here, renamed from ...
24020 (canonicalize_loop_closed_ssa_form): ... this and amended to
24021 swap successor edges for loop exit blocks to make us use
24022 the RPO order we need for initial schedule generation.
24023
24024 2018-01-09 Joseph Myers <joseph@codesourcery.com>
24025
24026 PR tree-optimization/64811
24027 * match.pd: When optimizing comparisons with Inf, avoid
24028 introducing or losing exceptions from comparisons with NaN.
24029
24030 2018-01-09 Martin Liska <mliska@suse.cz>
24031
24032 PR sanitizer/82517
24033 * asan.c (shadow_mem_size): Add gcc_assert.
24034
24035 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
24036
24037 Don't save registers in main().
24038
24039 PR target/83738
24040 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
24041 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
24042 * config/avr/avr.c (avr_set_current_function): Don't error if
24043 naked, OS_task or OS_main are specified at the same time.
24044 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
24045 OS_main.
24046 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
24047 attribute.
24048 * common/config/avr/avr-common.c (avr_option_optimization_table):
24049 Switch on -mmain-is-OS_task for optimizing compilations.
24050
24051 2018-01-09 Richard Biener <rguenther@suse.de>
24052
24053 PR tree-optimization/83572
24054 * graphite.c: Include cfganal.h.
24055 (graphite_transform_loops): Connect infinite loops to exit
24056 and remove fake edges at the end.
24057
24058 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24059
24060 * ipa-inline.c (edge_badness): Revert accidental checkin.
24061
24062 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24063
24064 PR ipa/80763
24065 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
24066 symbols; not inline clones.
24067
24068 2018-01-09 Jakub Jelinek <jakub@redhat.com>
24069
24070 PR target/83507
24071 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
24072 hard registers. Formatting fixes.
24073
24074 PR preprocessor/83722
24075 * gcc.c (try_generate_repro): Pass
24076 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
24077 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
24078 do_report_bug.
24079
24080 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
24081 Kito Cheng <kito.cheng@gmail.com>
24082
24083 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
24084 (riscv_leaf_function_p): Delete.
24085 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
24086
24087 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24088
24089 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
24090 function.
24091 (do_ifelse): New function.
24092 (do_isel): New function.
24093 (do_sub3): New function.
24094 (do_add3): New function.
24095 (do_load_mask_compare): New function.
24096 (do_overlap_load_compare): New function.
24097 (expand_compare_loop): New function.
24098 (expand_block_compare): Call expand_compare_loop() when appropriate.
24099 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
24100 option description.
24101 (-mblock-compare-inline-loop-limit): New option.
24102
24103 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24104
24105 PR target/83677
24106 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
24107 Reverse order of second and third operands in first alternative.
24108 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
24109 of first and second elements in UNSPEC_VPERMR vector.
24110 (altivec_expand_vec_perm_le): Likewise.
24111
24112 2018-01-08 Jeff Law <law@redhat.com>
24113
24114 PR rtl-optimizatin/81308
24115 * tree-switch-conversion.c (cfg_altered): New file scoped static.
24116 (process_switch): If group_case_labels makes a change, then set
24117 cfg_altered.
24118 (pass_convert_switch::execute): If a switch is converted, then
24119 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
24120
24121 PR rtl-optimization/81308
24122 * recog.c (split_all_insns): Conditionally cleanup the CFG after
24123 splitting insns.
24124
24125 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
24126
24127 PR target/83663 - Revert r255946
24128 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
24129 generation for cases where splatting a value is not useful.
24130 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
24131 across a vec_duplicate and a paradoxical subreg forming a vector
24132 mode to a vec_concat.
24133
24134 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24135
24136 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
24137 -march=armv8.3-a variants.
24138 * config/arm/t-multilib: Likewise.
24139 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
24140
24141 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24142
24143 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
24144 to generate rtl.
24145 (cceq_ior_compare_complement): Give it a name so I can use it, and
24146 change boolean_or_operator predicate to boolean_operator so it can
24147 be used to generate a crand.
24148 (eqne): New code iterator.
24149 (bd/bd_neg): New code_attrs.
24150 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
24151 a single define_insn.
24152 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
24153 decrement (bdnzt/bdnzf/bdzt/bdzf).
24154 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
24155 with the new names of the branch decrement patterns, and added the
24156 names of the branch decrement conditional patterns.
24157
24158 2018-01-08 Richard Biener <rguenther@suse.de>
24159
24160 PR tree-optimization/83563
24161 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
24162 cache.
24163
24164 2018-01-08 Richard Biener <rguenther@suse.de>
24165
24166 PR middle-end/83713
24167 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
24168
24169 2018-01-08 Richard Biener <rguenther@suse.de>
24170
24171 PR tree-optimization/83685
24172 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
24173 references to abnormals.
24174
24175 2018-01-08 Richard Biener <rguenther@suse.de>
24176
24177 PR lto/83719
24178 * dwarf2out.c (output_indirect_strings): Handle empty
24179 skeleton_debug_str_hash.
24180 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
24181
24182 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24183
24184 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
24185 (emit_store_direct): Likewise.
24186 (arc_trampoline_adjust_address): Likewise.
24187 (arc_asm_trampoline_template): New function.
24188 (arc_initialize_trampoline): Use asm_trampoline_template.
24189 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
24190 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
24191 * config/arc/arc.md (flush_icache): Delete pattern.
24192
24193 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24194
24195 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
24196 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
24197 munaligned-access.
24198
24199 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24200
24201 PR target/83681
24202 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
24203 by not USED_FOR_TARGET.
24204 (make_pass_resolve_sw_modes): Likewise.
24205
24206 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24207
24208 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
24209 USED_FOR_TARGET.
24210
24211 2018-01-08 Richard Biener <rguenther@suse.de>
24212
24213 PR middle-end/83580
24214 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
24215
24216 2018-01-08 Richard Biener <rguenther@suse.de>
24217
24218 PR middle-end/83517
24219 * match.pd ((t * 2) / 2) -> t): Add missing :c.
24220
24221 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
24222
24223 PR middle-end/81897
24224 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
24225 basic blocks with a small number of successors.
24226 (convert_control_dep_chain_into_preds): Improve handling of
24227 forwarder blocks.
24228 (dump_predicates): Split apart into...
24229 (dump_pred_chain): ...here...
24230 (dump_pred_info): ...and here.
24231 (can_one_predicate_be_invalidated_p): Add debugging printfs.
24232 (can_chain_union_be_invalidated_p): Improve check for invalidation
24233 of paths.
24234 (uninit_uses_cannot_happen): Avoid unnecessary if
24235 convert_control_dep_chain_into_preds yielded nothing.
24236
24237 2018-01-06 Martin Sebor <msebor@redhat.com>
24238
24239 PR tree-optimization/83640
24240 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
24241 subtracting negative offset from size.
24242 (builtin_access::overlap): Adjust offset bounds of the access to fall
24243 within the size of the object if possible.
24244
24245 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
24246
24247 PR rtl-optimization/83699
24248 * expmed.c (extract_bit_field_1): Restrict the vector usage of
24249 extract_bit_field_as_subreg to cases in which the extracted
24250 value is also a vector.
24251
24252 * lra-constraints.c (process_alt_operands): Test for the equivalence
24253 substitutions when detecting a possible reload cycle.
24254
24255 2018-01-06 Jakub Jelinek <jakub@redhat.com>
24256
24257 PR debug/83480
24258 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
24259 by default if flag_selective_schedling{,2}. Formatting fixes.
24260
24261 PR rtl-optimization/83682
24262 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
24263 if it has non-VECTOR_MODE element mode.
24264 (vec_duplicate_p): Likewise.
24265
24266 PR middle-end/83694
24267 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
24268 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
24269
24270 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24271
24272 PR target/83604
24273 * config/i386/i386-builtin.def
24274 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
24275 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
24276 Require also OPTION_MASK_ISA_AVX512F in addition to
24277 OPTION_MASK_ISA_GFNI.
24278 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
24279 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
24280 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
24281 to OPTION_MASK_ISA_GFNI.
24282 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
24283 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
24284 OPTION_MASK_ISA_AVX512BW.
24285 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
24286 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
24287 addition to OPTION_MASK_ISA_GFNI.
24288 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
24289 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
24290 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
24291 to OPTION_MASK_ISA_GFNI.
24292 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
24293 a requirement for all ISAs rather than any of them with a few
24294 exceptions.
24295 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
24296 processing.
24297 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
24298 bitmasks to be enabled with 3 exceptions, instead of requiring any
24299 enabled ISA with lots of exceptions.
24300 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
24301 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
24302 Change avx512bw in isa attribute to avx512f.
24303 * config/i386/sgxintrin.h: Add license boilerplate.
24304 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
24305 to __AVX512F__ and __AVX512VL to __AVX512VL__.
24306 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
24307 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
24308 defined.
24309 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
24310 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
24311 temporarily sse2 rather than sse if not enabled already.
24312
24313 PR target/83604
24314 * config/i386/sse.md (VI248_VLBW): Rename to ...
24315 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
24316 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
24317 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
24318 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
24319 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
24320 mode iterator instead of VI248_VLBW.
24321
24322 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
24323
24324 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
24325 (record_modified): Skip clobbers; add debug output.
24326 (param_change_prob): Use sreal frequencies.
24327
24328 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24329
24330 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24331 punt for user-aligned variables.
24332
24333 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24334
24335 * tree-chrec.c (chrec_contains_symbols): Return true for
24336 POLY_INT_CST.
24337
24338 2018-01-05 Sudakshina Das <sudi.das@arm.com>
24339
24340 PR target/82439
24341 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24342 of (x|y) == x for BICS pattern.
24343
24344 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24345
24346 PR tree-optimization/83605
24347 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24348 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24349 can throw.
24350
24351 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
24352
24353 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24354 * config/epiphany/rtems.h: New file.
24355
24356 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24357 Uros Bizjak <ubizjak@gmail.com>
24358
24359 PR target/83554
24360 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24361 QIreg_operand instead of register_operand predicate.
24362 * config/i386/i386.c (ix86_rop_should_change_byte_p,
24363 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24364 comments instead of -fmitigate[-_]rop.
24365
24366 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24367
24368 PR bootstrap/81926
24369 * cgraphunit.c (symbol_table::compile): Switch to text_section
24370 before calling assembly_start debug hook.
24371 * run-rtl-passes.c (run_rtl_passes): Likewise.
24372 Include output.h.
24373
24374 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24375
24376 * tree-vrp.c (extract_range_from_binary_expr_1): Check
24377 range_int_cst_p rather than !symbolic_range_p before calling
24378 extract_range_from_multiplicative_op_1.
24379
24380 2018-01-04 Jeff Law <law@redhat.com>
24381
24382 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24383 redundant test in assertion.
24384
24385 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24386
24387 * doc/rtl.texi: Document machine_mode wrapper classes.
24388
24389 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24390
24391 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24392 using tree_to_uhwi.
24393
24394 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24395
24396 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24397 the VEC_PERM_EXPR fold to fail.
24398
24399 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24400
24401 PR debug/83585
24402 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24403 to switched_sections.
24404
24405 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24406
24407 PR target/83680
24408 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24409 test for d.testing.
24410
24411 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
24412
24413 PR target/83387
24414 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24415 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24416
24417 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24418
24419 PR debug/83666
24420 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24421 is BLKmode and bitpos not zero or mode change is needed.
24422
24423 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24424
24425 PR target/83675
24426 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24427 TARGET_VIS2.
24428
24429 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
24430
24431 PR target/83628
24432 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24433 instead of MULT rtx. Update all corresponding splitters.
24434 (*saddl_se): Ditto.
24435 (*ssub<modesuffix>): Ditto.
24436 (*ssubl_se): Ditto.
24437 (*cmp_sadd_di): Update split patterns.
24438 (*cmp_sadd_si): Ditto.
24439 (*cmp_sadd_sidi): Ditto.
24440 (*cmp_ssub_di): Ditto.
24441 (*cmp_ssub_si): Ditto.
24442 (*cmp_ssub_sidi): Ditto.
24443 * config/alpha/predicates.md (const23_operand): New predicate.
24444 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24445 Look for ASHIFT, not MULT inner operand.
24446 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24447
24448 2018-01-04 Martin Liska <mliska@suse.cz>
24449
24450 PR gcov-profile/83669
24451 * gcov.c (output_intermediate_file): Add version to intermediate
24452 gcov file.
24453 * doc/gcov.texi: Document new field 'version' in intermediate
24454 file format. Fix location of '-k' option of gcov command.
24455
24456 2018-01-04 Martin Liska <mliska@suse.cz>
24457
24458 PR ipa/82352
24459 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24460
24461 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24462
24463 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24464
24465 2018-01-03 Martin Sebor <msebor@redhat.com>
24466
24467 PR tree-optimization/83655
24468 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24469 checking calls with invalid arguments.
24470
24471 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24472
24473 * tree-vect-stmts.c (vect_get_store_rhs): New function.
24474 (vectorizable_mask_load_store): Delete.
24475 (vectorizable_call): Return false for masked loads and stores.
24476 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
24477 instead of gimple_assign_rhs1.
24478 (vectorizable_load): Handle IFN_MASK_LOAD.
24479 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24480
24481 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24482
24483 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24484 split out from..,
24485 (vectorizable_mask_load_store): ...here.
24486 (vectorizable_load): ...and here.
24487
24488 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24489
24490 * tree-vect-stmts.c (vect_build_all_ones_mask)
24491 (vect_build_zero_merge_argument): New functions, split out from...
24492 (vectorizable_load): ...here.
24493
24494 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24495
24496 * tree-vect-stmts.c (vect_check_store_rhs): New function,
24497 split out from...
24498 (vectorizable_mask_load_store): ...here.
24499 (vectorizable_store): ...and here.
24500
24501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24502
24503 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24504 split out from...
24505 (vectorizable_mask_load_store): ...here.
24506
24507 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24508
24509 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24510 (vect_model_store_cost): Take a vec_load_store_type instead of a
24511 vect_def_type.
24512 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24513 (vect_model_store_cost): Take a vec_load_store_type instead of a
24514 vect_def_type.
24515 (vectorizable_mask_load_store): Update accordingly.
24516 (vectorizable_store): Likewise.
24517 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24518
24519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24520
24521 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24522 IFN_MASK_LOAD calls here rather than...
24523 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24524
24525 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24526 Alan Hayward <alan.hayward@arm.com>
24527 David Sherwood <david.sherwood@arm.com>
24528
24529 * expmed.c (extract_bit_field_1): For vector extracts,
24530 fall back to extract_bit_field_as_subreg if vec_extract
24531 isn't available.
24532
24533 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24534 Alan Hayward <alan.hayward@arm.com>
24535 David Sherwood <david.sherwood@arm.com>
24536
24537 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24538 they are variable or constant sized.
24539 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24540 slots for constant-sized data.
24541
24542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24543 Alan Hayward <alan.hayward@arm.com>
24544 David Sherwood <david.sherwood@arm.com>
24545
24546 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24547 handling COND_EXPRs with boolean comparisons, try to find a better
24548 basis for the mask type than the boolean itself.
24549
24550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24551
24552 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24553 is calculated and how it can be overridden.
24554 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24555 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24556 if defined.
24557 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24558 if nonzero.
24559
24560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24561 Alan Hayward <alan.hayward@arm.com>
24562 David Sherwood <david.sherwood@arm.com>
24563
24564 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24565 Remove the mode argument.
24566 (aarch64_simd_valid_immediate): Remove the mode and inverse
24567 arguments.
24568 * config/aarch64/iterators.md (bitsize): New iterator.
24569 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24570 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24571 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24572 aarch64_simd_valid_immediate.
24573 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24574 (aarch64_reg_or_bic_imm): Likewise.
24575 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24576 with an insn_type enum and msl with a modifier_type enum.
24577 Replace element_width with a scalar_mode. Change the shift
24578 to unsigned int. Add constructors for scalar_float_mode and
24579 scalar_int_mode elements.
24580 (aarch64_vect_float_const_representable_p): Delete.
24581 (aarch64_can_const_movi_rtx_p)
24582 (aarch64_simd_scalar_immediate_valid_for_move)
24583 (aarch64_simd_make_constant): Update call to
24584 aarch64_simd_valid_immediate.
24585 (aarch64_advsimd_valid_immediate_hs): New function.
24586 (aarch64_advsimd_valid_immediate): Likewise.
24587 (aarch64_simd_valid_immediate): Remove mode and inverse
24588 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24589 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24590 and aarch64_float_const_representable_p on the result.
24591 (aarch64_output_simd_mov_immediate): Remove mode argument.
24592 Update call to aarch64_simd_valid_immediate and use of
24593 simd_immediate_info.
24594 (aarch64_output_scalar_simd_mov_immediate): Update call
24595 accordingly.
24596
24597 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24598 Alan Hayward <alan.hayward@arm.com>
24599 David Sherwood <david.sherwood@arm.com>
24600
24601 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24602 (mode_nunits): Likewise CONST_MODE_NUNITS.
24603 * machmode.def (ADJUST_NUNITS): Document.
24604 * genmodes.c (mode_data::need_nunits_adj): New field.
24605 (blank_mode): Update accordingly.
24606 (adj_nunits): New variable.
24607 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24608 parameter.
24609 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24610 listed in adj_nunits.
24611 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24612 listed in adj_nunits. Don't emit case statements for such modes.
24613 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24614 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24615 nothing if adj_nunits is nonnull.
24616 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24617 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24618 (emit_mode_fbit): Update use of print_maybe_const_decl.
24619 (emit_move_size): Likewise. Treat the array as non-const
24620 if adj_nunits.
24621 (emit_mode_adjustments): Handle adj_nunits.
24622
24623 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24624
24625 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24626 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24627 (VECTOR_MODES): Use it.
24628 (make_vector_modes): Take the prefix as an argument.
24629
24630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24631 Alan Hayward <alan.hayward@arm.com>
24632 David Sherwood <david.sherwood@arm.com>
24633
24634 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24635 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24636 for MODE_VECTOR_BOOL.
24637 * machmode.def (VECTOR_BOOL_MODE): Document.
24638 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24639 (make_vector_bool_mode): New function.
24640 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24641 MODE_VECTOR_BOOL.
24642 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24643 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24644 Likewise.
24645 * stor-layout.c (int_mode_for_mode): Likewise.
24646 * tree.c (build_vector_type_for_mode): Likewise.
24647 * varasm.c (output_constant_pool_2): Likewise.
24648 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24649 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24650 for MODE_VECTOR_BOOL.
24651 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24652 of mode class checks.
24653 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24654 instead of a list of mode class checks.
24655 (expand_vector_scalar_condition): Likewise.
24656 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24657
24658 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24659 Alan Hayward <alan.hayward@arm.com>
24660 David Sherwood <david.sherwood@arm.com>
24661
24662 * machmode.h (mode_size): Change from unsigned short to
24663 poly_uint16_pod.
24664 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24665 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24666 or if measurement_type is not polynomial.
24667 (fixed_size_mode::includes_p): Check for constant-sized modes.
24668 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24669 return a poly_uint16 rather than an unsigned short.
24670 (emit_mode_size): Change the type of mode_size from unsigned short
24671 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24672 (emit_mode_adjustments): Cope with polynomial vector sizes.
24673 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24674 for GET_MODE_SIZE.
24675 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24676 for GET_MODE_SIZE.
24677 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24678 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24679 * caller-save.c (setup_save_areas): Likewise.
24680 (replace_reg_with_saved_mem): Likewise.
24681 * calls.c (emit_library_call_value_1): Likewise.
24682 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24683 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24684 (gen_lowpart_for_combine): Likewise.
24685 * convert.c (convert_to_integer_1): Likewise.
24686 * cse.c (equiv_constant, cse_insn): Likewise.
24687 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24688 (cselib_subst_to_values): Likewise.
24689 * dce.c (word_dce_process_block): Likewise.
24690 * df-problems.c (df_word_lr_mark_ref): Likewise.
24691 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24692 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24693 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24694 (rtl_for_decl_location): Likewise.
24695 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24696 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24697 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24698 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24699 (expand_expr_real_1): Likewise.
24700 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24701 (pad_below): Likewise.
24702 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24703 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24704 * ira.c (get_subreg_tracking_sizes): Likewise.
24705 * ira-build.c (ira_create_allocno_objects): Likewise.
24706 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24707 (ira_sort_regnos_for_alter_reg): Likewise.
24708 * ira-costs.c (record_operand_costs): Likewise.
24709 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24710 (resolve_simple_move): Likewise.
24711 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24712 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24713 (lra_constraints): Likewise.
24714 (CONST_POOL_OK_P): Reject variable-sized modes.
24715 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24716 (add_pseudo_to_slot, lra_spill): Likewise.
24717 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24718 * optabs-query.c (get_best_extraction_insn): Likewise.
24719 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24720 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24721 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24722 * recog.c (offsettable_address_addr_space_p): Likewise.
24723 * regcprop.c (maybe_mode_change): Likewise.
24724 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24725 * regrename.c (build_def_use): Likewise.
24726 * regstat.c (dump_reg_info): Likewise.
24727 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24728 (find_reloads, find_reloads_subreg_address): Likewise.
24729 * reload1.c (eliminate_regs_1): Likewise.
24730 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24731 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24732 (simplify_binary_operation_1, simplify_subreg): Likewise.
24733 * targhooks.c (default_function_arg_padding): Likewise.
24734 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24735 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24736 (verify_gimple_assign_ternary): Likewise.
24737 * tree-inline.c (estimate_move_cost): Likewise.
24738 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24739 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24740 (get_address_cost_ainc): Likewise.
24741 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24742 (vect_supportable_dr_alignment): Likewise.
24743 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24744 (vectorizable_reduction): Likewise.
24745 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24746 (vectorizable_operation, vectorizable_load): Likewise.
24747 * tree.c (build_same_sized_truth_vector_type): Likewise.
24748 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24749 * var-tracking.c (emit_note_insn_var_location): Likewise.
24750 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24751 (ADDR_VEC_ALIGN): Likewise.
24752
24753 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24754 Alan Hayward <alan.hayward@arm.com>
24755 David Sherwood <david.sherwood@arm.com>
24756
24757 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24758 unsigned short.
24759 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24760 or if measurement_type is polynomial.
24761 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24762 * combine.c (make_extraction): Likewise.
24763 * dse.c (find_shift_sequence): Likewise.
24764 * dwarf2out.c (mem_loc_descriptor): Likewise.
24765 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24766 (extract_bit_field, extract_low_bits): Likewise.
24767 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24768 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24769 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24770 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24771 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24772 * reload.c (find_reloads): Likewise.
24773 * reload1.c (alter_reg): Likewise.
24774 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24775 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24776 * tree-if-conv.c (predicate_mem_writes): Likewise.
24777 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24778 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24779 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24780 * valtrack.c (dead_debug_insert_temp): Likewise.
24781 * varasm.c (mergeable_constant_section): Likewise.
24782 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24783
24784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24785 Alan Hayward <alan.hayward@arm.com>
24786 David Sherwood <david.sherwood@arm.com>
24787
24788 * expr.c (expand_assignment): Cope with polynomial mode sizes
24789 when assigning to a CONCAT.
24790
24791 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24792 Alan Hayward <alan.hayward@arm.com>
24793 David Sherwood <david.sherwood@arm.com>
24794
24795 * machmode.h (mode_precision): Change from unsigned short to
24796 poly_uint16_pod.
24797 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24798 short.
24799 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24800 or if measurement_type is not polynomial.
24801 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24802 in which the mode is already known to be a scalar_int_mode.
24803 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24804 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24805 initializer.
24806 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24807 for GET_MODE_PRECISION.
24808 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24809 for GET_MODE_PRECISION.
24810 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24811 as polynomial.
24812 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24813 (expand_field_assignment, make_extraction): Likewise.
24814 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24815 (get_last_value): Likewise.
24816 * convert.c (convert_to_integer_1): Likewise.
24817 * cse.c (cse_insn): Likewise.
24818 * expr.c (expand_expr_real_1): Likewise.
24819 * lra-constraints.c (simplify_operand_subreg): Likewise.
24820 * optabs-query.c (can_atomic_load_p): Likewise.
24821 * optabs.c (expand_atomic_load): Likewise.
24822 (expand_atomic_store): Likewise.
24823 * ree.c (combine_reaching_defs): Likewise.
24824 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24825 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24826 * tree.h (type_has_mode_precision_p): Likewise.
24827 * ubsan.c (instrument_si_overflow): Likewise.
24828
24829 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24830 Alan Hayward <alan.hayward@arm.com>
24831 David Sherwood <david.sherwood@arm.com>
24832
24833 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24834 polynomial numbers of units.
24835 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24836 (valid_vector_subparts_p): New function.
24837 (build_vector_type): Remove temporary shim and take the number
24838 of units as a poly_uint64 rather than an int.
24839 (build_opaque_vector_type): Take the number of units as a
24840 poly_uint64 rather than an int.
24841 * tree.c (build_vector_from_ctor): Handle polynomial
24842 TYPE_VECTOR_SUBPARTS.
24843 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24844 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24845 (build_vector_from_val): If the number of units is variable,
24846 use build_vec_duplicate_cst for constant operands and
24847 VEC_DUPLICATE_EXPR otherwise.
24848 (make_vector_type): Remove temporary is_constant ().
24849 (build_vector_type, build_opaque_vector_type): Take the number of
24850 units as a poly_uint64 rather than an int.
24851 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24852 VECTOR_CST_NELTS.
24853 * cfgexpand.c (expand_debug_expr): Likewise.
24854 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24855 (store_constructor, expand_expr_real_1): Likewise.
24856 (const_scalar_mask_from_tree): Likewise.
24857 * fold-const-call.c (fold_const_reduction): Likewise.
24858 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24859 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24860 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24861 (fold_relational_const): Likewise.
24862 (native_interpret_vector): Likewise. Change the size from an
24863 int to an unsigned int.
24864 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24865 TYPE_VECTOR_SUBPARTS.
24866 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24867 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24868 duplicating a non-constant operand into a variable-length vector.
24869 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24870 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24871 * ipa-icf.c (sem_variable::equals): Likewise.
24872 * match.pd: Likewise.
24873 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24874 * print-tree.c (print_node): Likewise.
24875 * stor-layout.c (layout_type): Likewise.
24876 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24877 * tree-cfg.c (verify_gimple_comparison): Likewise.
24878 (verify_gimple_assign_binary): Likewise.
24879 (verify_gimple_assign_ternary): Likewise.
24880 (verify_gimple_assign_single): Likewise.
24881 * tree-pretty-print.c (dump_generic_node): Likewise.
24882 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24883 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24884 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24885 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24886 (vect_shift_permute_load_chain): Likewise.
24887 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24888 (expand_vector_condition, optimize_vector_constructor): Likewise.
24889 (lower_vec_perm, get_compute_type): Likewise.
24890 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24891 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24892 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24893 (vect_recog_mask_conversion_pattern): Likewise.
24894 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24895 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24896 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24897 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24898 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24899 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24900 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24901 (supportable_widening_operation): Likewise.
24902 (supportable_narrowing_operation): Likewise.
24903 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24904 Likewise.
24905 * varasm.c (output_constant): Likewise.
24906
24907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24908 Alan Hayward <alan.hayward@arm.com>
24909 David Sherwood <david.sherwood@arm.com>
24910
24911 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24912 so that both the length == 3 and length != 3 cases set up their
24913 own permute vectors. Add comments explaining why we know the
24914 number of elements is constant.
24915 (vect_permute_load_chain): Likewise.
24916
24917 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24918 Alan Hayward <alan.hayward@arm.com>
24919 David Sherwood <david.sherwood@arm.com>
24920
24921 * machmode.h (mode_nunits): Change from unsigned char to
24922 poly_uint16_pod.
24923 (ONLY_FIXED_SIZE_MODES): New macro.
24924 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24925 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24926 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24927 New typedefs.
24928 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24929 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24930 or if measurement_type is not polynomial.
24931 * genmodes.c (ZERO_COEFFS): New macro.
24932 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24933 poly_uint16.
24934 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24935 Use ZERO_COEFFS when emitting initializers.
24936 * data-streamer.h (bp_pack_poly_value): New function.
24937 (bp_unpack_poly_value): Likewise.
24938 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24939 for GET_MODE_NUNITS.
24940 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24941 for GET_MODE_NUNITS.
24942 * tree.c (make_vector_type): Remove temporary shim and make
24943 the real function take the number of units as a poly_uint64
24944 rather than an int.
24945 (build_vector_type_for_mode): Handle polynomial nunits.
24946 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24947 * emit-rtl.c (const_vec_series_p_1): Likewise.
24948 (gen_rtx_CONST_VECTOR): Likewise.
24949 * fold-const.c (test_vec_duplicate_folding): Likewise.
24950 * genrecog.c (validate_pattern): Likewise.
24951 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24952 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24953 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24954 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24955 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24956 * rtlanal.c (subreg_get_info): Likewise.
24957 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24958 (vect_grouped_load_supported): Likewise.
24959 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24960 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24961 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24962 (simplify_const_unary_operation, simplify_binary_operation_1)
24963 (simplify_const_binary_operation, simplify_ternary_operation)
24964 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24965 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24966 instead of CONST_VECTOR_NUNITS.
24967 * varasm.c (output_constant_pool_2): Likewise.
24968 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24969 explicit-encoded elements in the XVEC for variable-length vectors.
24970
24971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24972
24973 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24974
24975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24976 Alan Hayward <alan.hayward@arm.com>
24977 David Sherwood <david.sherwood@arm.com>
24978
24979 * coretypes.h (fixed_size_mode): Declare.
24980 (fixed_size_mode_pod): New typedef.
24981 * builtins.h (target_builtins::x_apply_args_mode)
24982 (target_builtins::x_apply_result_mode): Change type to
24983 fixed_size_mode_pod.
24984 * builtins.c (apply_args_size, apply_result_size, result_vector)
24985 (expand_builtin_apply_args_1, expand_builtin_apply)
24986 (expand_builtin_return): Update accordingly.
24987
24988 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24989
24990 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24991 * cselib.c (cselib_hash_rtx): Likewise.
24992 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24993 CONST_VECTOR encoding.
24994
24995 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24996 Jeff Law <law@redhat.com>
24997
24998 PR target/83641
24999 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
25000 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
25001 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
25002 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
25003
25004 PR target/83641
25005 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
25006 explicitly probe *sp in a noreturn function if there were any callee
25007 register saves or frame pointer is needed.
25008
25009 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25010
25011 PR debug/83621
25012 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
25013 BLKmode for ternary, binary or unary expressions.
25014
25015 PR debug/83645
25016 * var-tracking.c (delete_vta_debug_insn): New inline function.
25017 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
25018 insns from get_insns () to NULL instead of each bb separately.
25019 Use delete_vta_debug_insn. No longer static.
25020 (vt_debug_insns_local, variable_tracking_main_1): Adjust
25021 delete_vta_debug_insns callers.
25022 * rtl.h (delete_vta_debug_insns): Declare.
25023 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
25024 instead of variable_tracking_main.
25025
25026 2018-01-03 Martin Sebor <msebor@redhat.com>
25027
25028 PR tree-optimization/83603
25029 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
25030 arguments past the endof the argument list in functions declared
25031 without a prototype.
25032 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
25033 Avoid checking when arguments are null.
25034
25035 2018-01-03 Martin Sebor <msebor@redhat.com>
25036
25037 PR c/83559
25038 * doc/extend.texi (attribute const): Fix a typo.
25039 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
25040 issuing -Wsuggest-attribute for void functions.
25041
25042 2018-01-03 Martin Sebor <msebor@redhat.com>
25043
25044 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
25045 offset_int::from instead of wide_int::to_shwi.
25046 (maybe_diag_overlap): Remove assertion.
25047 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
25048 * gimple-ssa-sprintf.c (format_directive): Same.
25049 (parse_directive): Same.
25050 (sprintf_dom_walker::compute_format_length): Same.
25051 (try_substitute_return_value): Same.
25052
25053 2018-01-03 Jeff Law <law@redhat.com>
25054
25055 PR middle-end/83654
25056 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
25057 non-constant residual for zero at runtime and avoid probing in
25058 that case. Reorganize code for trailing problem to mirror handling
25059 of the residual.
25060
25061 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25062
25063 PR tree-optimization/83501
25064 * tree-ssa-strlen.c (get_string_cst): New.
25065 (handle_char_store): Call get_string_cst.
25066
25067 2018-01-03 Martin Liska <mliska@suse.cz>
25068
25069 PR tree-optimization/83593
25070 * tree-ssa-strlen.c: Include tree-cfg.h.
25071 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
25072 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
25073 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
25074 to false.
25075 (strlen_dom_walker::before_dom_children): Call
25076 gimple_purge_dead_eh_edges. Dump tranformation with details
25077 dump flags.
25078 (strlen_dom_walker::before_dom_children): Update call by adding
25079 new argument cleanup_eh.
25080 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
25081
25082 2018-01-03 Martin Liska <mliska@suse.cz>
25083
25084 PR ipa/83549
25085 * cif-code.def (VARIADIC_THUNK): New enum value.
25086 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
25087 thunks.
25088
25089 2018-01-03 Jan Beulich <jbeulich@suse.com>
25090
25091 * sse.md (mov<mode>_internal): Tighten condition for when to use
25092 vmovdqu<ssescalarsize> for TI and OI modes.
25093
25094 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25095
25096 Update copyright years.
25097
25098 2018-01-03 Martin Liska <mliska@suse.cz>
25099
25100 PR ipa/83594
25101 * ipa-visibility.c (function_and_variable_visibility): Skip
25102 functions with noipa attribure.
25103
25104 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25105
25106 * gcc.c (process_command): Update copyright notice dates.
25107 * gcov-dump.c (print_version): Ditto.
25108 * gcov.c (print_version): Ditto.
25109 * gcov-tool.c (print_version): Ditto.
25110 * gengtype.c (create_file): Ditto.
25111 * doc/cpp.texi: Bump @copying's copyright year.
25112 * doc/cppinternals.texi: Ditto.
25113 * doc/gcc.texi: Ditto.
25114 * doc/gccint.texi: Ditto.
25115 * doc/gcov.texi: Ditto.
25116 * doc/install.texi: Ditto.
25117 * doc/invoke.texi: Ditto.
25118
25119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25120
25121 * vector-builder.h (vector_builder::m_full_nelts): Change from
25122 unsigned int to poly_uint64.
25123 (vector_builder::full_nelts): Update prototype accordingly.
25124 (vector_builder::new_vector): Likewise.
25125 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
25126 (vector_builder::operator ==): Likewise.
25127 (vector_builder::finalize): Likewise.
25128 * int-vector-builder.h (int_vector_builder::int_vector_builder):
25129 Take the number of elements as a poly_uint64 rather than an
25130 unsigned int.
25131 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
25132 from unsigned int to poly_uint64.
25133 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
25134 (vec_perm_indices::new_vector): Likewise.
25135 (vec_perm_indices::length): Likewise.
25136 (vec_perm_indices::nelts_per_input): Likewise.
25137 (vec_perm_indices::input_nelts): Likewise.
25138 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
25139 number of elements per input as a poly_uint64 rather than an
25140 unsigned int. Use the original encoding for variable-length
25141 vectors, rather than clamping each individual element.
25142 For the second and subsequent elements in each pattern,
25143 clamp the step and base before clamping their sum.
25144 (vec_perm_indices::series_p): Handle polynomial element counts.
25145 (vec_perm_indices::all_in_range_p): Likewise.
25146 (vec_perm_indices_to_tree): Likewise.
25147 (vec_perm_indices_to_rtx): Likewise.
25148 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
25149 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
25150 (tree_vector_builder::new_binary_operation): Handle polynomial
25151 element counts. Return false if we need to know the number
25152 of elements at compile time.
25153 * fold-const.c (fold_vec_perm): Punt if the number of elements
25154 isn't known at compile time.
25155
25156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25157
25158 * vec-perm-indices.h (vec_perm_builder): Change element type
25159 from HOST_WIDE_INT to poly_int64.
25160 (vec_perm_indices::element_type): Update accordingly.
25161 (vec_perm_indices::clamp): Handle polynomial element_types.
25162 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25163 (vec_perm_indices::all_in_range_p): Likewise.
25164 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
25165 than shwi trees.
25166 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
25167 polynomial vec_perm_indices element types.
25168 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
25169 * fold-const.c (fold_vec_perm): Likewise.
25170 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
25171 * tree-vect-generic.c (lower_vec_perm): Likewise.
25172 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25173 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
25174 element type to HOST_WIDE_INT.
25175
25176 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25177 Alan Hayward <alan.hayward@arm.com>
25178 David Sherwood <david.sherwood@arm.com>
25179
25180 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
25181 rather than an int. Use plus_constant.
25182 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
25183 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
25184
25185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25186 Alan Hayward <alan.hayward@arm.com>
25187 David Sherwood <david.sherwood@arm.com>
25188
25189 * calls.c (emit_call_1, expand_call): Change struct_value_size from
25190 a HOST_WIDE_INT to a poly_int64.
25191
25192 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25193 Alan Hayward <alan.hayward@arm.com>
25194 David Sherwood <david.sherwood@arm.com>
25195
25196 * calls.c (load_register_parameters): Cope with polynomial
25197 mode sizes. Require a constant size for BLKmode parameters
25198 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
25199 forces a parameter to be padded at the lsb end in order to
25200 fill a complete number of words, require the parameter size
25201 to be ordered wrt UNITS_PER_WORD.
25202
25203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25204 Alan Hayward <alan.hayward@arm.com>
25205 David Sherwood <david.sherwood@arm.com>
25206
25207 * reload1.c (spill_stack_slot_width): Change element type
25208 from unsigned int to poly_uint64_pod.
25209 (alter_reg): Treat mode sizes as polynomial.
25210
25211 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25212 Alan Hayward <alan.hayward@arm.com>
25213 David Sherwood <david.sherwood@arm.com>
25214
25215 * reload.c (complex_word_subreg_p): New function.
25216 (reload_inner_reg_of_subreg, push_reload): Use it.
25217
25218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25219 Alan Hayward <alan.hayward@arm.com>
25220 David Sherwood <david.sherwood@arm.com>
25221
25222 * lra-constraints.c (process_alt_operands): Reject matched
25223 operands whose sizes aren't ordered.
25224 (match_reload): Refer to this check here.
25225
25226 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25227 Alan Hayward <alan.hayward@arm.com>
25228 David Sherwood <david.sherwood@arm.com>
25229
25230 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
25231 that the mode size is in the set {1, 2, 4, 8, 16}.
25232
25233 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25234 Alan Hayward <alan.hayward@arm.com>
25235 David Sherwood <david.sherwood@arm.com>
25236
25237 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
25238 Use plus_constant instead of gen_rtx_PLUS.
25239
25240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25241 Alan Hayward <alan.hayward@arm.com>
25242 David Sherwood <david.sherwood@arm.com>
25243
25244 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
25245 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
25246 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
25247 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
25248 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
25249 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
25250 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
25251 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
25252 * config/i386/i386.c (ix86_push_rounding): ...this new function.
25253 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
25254 a poly_int64.
25255 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
25256 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
25257 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
25258 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
25259 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
25260 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
25261 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
25262 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
25263 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
25264 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
25265 function.
25266 * expr.c (emit_move_resolve_push): Treat the input and result
25267 of PUSH_ROUNDING as a poly_int64.
25268 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
25269 (emit_push_insn): Likewise.
25270 * lra-eliminations.c (mark_not_eliminable): Likewise.
25271 * recog.c (push_operand): Likewise.
25272 * reload1.c (elimination_effects): Likewise.
25273 * rtlanal.c (nonzero_bits1): Likewise.
25274 * calls.c (store_one_arg): Likewise. Require the padding to be
25275 known at compile time.
25276
25277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25278 Alan Hayward <alan.hayward@arm.com>
25279 David Sherwood <david.sherwood@arm.com>
25280
25281 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
25282 Use plus_constant instead of gen_rtx_PLUS.
25283
25284 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25285 Alan Hayward <alan.hayward@arm.com>
25286 David Sherwood <david.sherwood@arm.com>
25287
25288 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
25289 rather than an int.
25290
25291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25292 Alan Hayward <alan.hayward@arm.com>
25293 David Sherwood <david.sherwood@arm.com>
25294
25295 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
25296 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
25297 via stack temporaries. Treat the mode size as polynomial too.
25298
25299 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25300 Alan Hayward <alan.hayward@arm.com>
25301 David Sherwood <david.sherwood@arm.com>
25302
25303 * expr.c (expand_expr_real_2): When handling conversions involving
25304 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
25305 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
25306 as a poly_uint64 too.
25307
25308 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25309 Alan Hayward <alan.hayward@arm.com>
25310 David Sherwood <david.sherwood@arm.com>
25311
25312 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
25313
25314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25315 Alan Hayward <alan.hayward@arm.com>
25316 David Sherwood <david.sherwood@arm.com>
25317
25318 * combine.c (can_change_dest_mode): Handle polynomial
25319 REGMODE_NATURAL_SIZE.
25320 * expmed.c (store_bit_field_1): Likewise.
25321 * expr.c (store_constructor): Likewise.
25322 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
25323 and polynomial REGMODE_NATURAL_SIZE.
25324 (gen_lowpart_common): Likewise.
25325 * reginfo.c (record_subregs_of_mode): Likewise.
25326 * rtlanal.c (read_modify_subreg_p): Likewise.
25327
25328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25329 Alan Hayward <alan.hayward@arm.com>
25330 David Sherwood <david.sherwood@arm.com>
25331
25332 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25333 numbers of elements.
25334
25335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25336 Alan Hayward <alan.hayward@arm.com>
25337 David Sherwood <david.sherwood@arm.com>
25338
25339 * match.pd: Cope with polynomial numbers of vector elements.
25340
25341 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25342 Alan Hayward <alan.hayward@arm.com>
25343 David Sherwood <david.sherwood@arm.com>
25344
25345 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25346 in a POINTER_PLUS_EXPR.
25347
25348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25349 Alan Hayward <alan.hayward@arm.com>
25350 David Sherwood <david.sherwood@arm.com>
25351
25352 * omp-simd-clone.c (simd_clone_subparts): New function.
25353 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25354 (ipa_simd_modify_function_body): Likewise.
25355
25356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25357 Alan Hayward <alan.hayward@arm.com>
25358 David Sherwood <david.sherwood@arm.com>
25359
25360 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25361 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25362 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25363 (expand_vector_condition, vector_element): Likewise.
25364 (subparts_gt): New function.
25365 (get_compute_type): Use subparts_gt.
25366 (count_type_subparts): Delete.
25367 (expand_vector_operations_1): Use subparts_gt instead of
25368 count_type_subparts.
25369
25370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25371 Alan Hayward <alan.hayward@arm.com>
25372 David Sherwood <david.sherwood@arm.com>
25373
25374 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25375 (vect_compile_time_alias): ...this new function. Do the calculation
25376 on poly_ints rather than trees.
25377 (vect_prune_runtime_alias_test_list): Update call accordingly.
25378
25379 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25380 Alan Hayward <alan.hayward@arm.com>
25381 David Sherwood <david.sherwood@arm.com>
25382
25383 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25384 numbers of units.
25385 (vect_schedule_slp_instance): Likewise.
25386
25387 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25388 Alan Hayward <alan.hayward@arm.com>
25389 David Sherwood <david.sherwood@arm.com>
25390
25391 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
25392 constant and extern definitions for variable-length vectors.
25393 (vect_get_constant_vectors): Note that the number of units
25394 is known to be constant.
25395
25396 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25397 Alan Hayward <alan.hayward@arm.com>
25398 David Sherwood <david.sherwood@arm.com>
25399
25400 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25401 of units as polynomial. Choose between WIDE and NARROW based
25402 on multiple_p.
25403
25404 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25405 Alan Hayward <alan.hayward@arm.com>
25406 David Sherwood <david.sherwood@arm.com>
25407
25408 * tree-vect-stmts.c (simd_clone_subparts): New function.
25409 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25410
25411 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25412 Alan Hayward <alan.hayward@arm.com>
25413 David Sherwood <david.sherwood@arm.com>
25414
25415 * tree-vect-stmts.c (vectorizable_call): Treat the number of
25416 vectors as polynomial. Use build_index_vector for
25417 IFN_GOMP_SIMD_LANE.
25418
25419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25420 Alan Hayward <alan.hayward@arm.com>
25421 David Sherwood <david.sherwood@arm.com>
25422
25423 * tree-vect-stmts.c (get_load_store_type): Treat the number of
25424 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25425 for variable-length vectors.
25426 (vectorizable_mask_load_store): Treat the number of units as
25427 polynomial, asserting that it is constant if the condition has
25428 already been enforced.
25429 (vectorizable_store, vectorizable_load): Likewise.
25430
25431 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25432 Alan Hayward <alan.hayward@arm.com>
25433 David Sherwood <david.sherwood@arm.com>
25434
25435 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25436 of units as polynomial. Punt if we can't tell at compile time
25437 which vector contains the final result.
25438
25439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25440 Alan Hayward <alan.hayward@arm.com>
25441 David Sherwood <david.sherwood@arm.com>
25442
25443 * tree-vect-loop.c (vectorizable_induction): Treat the number
25444 of units as polynomial. Punt on SLP inductions. Use an integer
25445 VEC_SERIES_EXPR for variable-length integer reductions. Use a
25446 cast of such a series for variable-length floating-point
25447 reductions.
25448
25449 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25450 Alan Hayward <alan.hayward@arm.com>
25451 David Sherwood <david.sherwood@arm.com>
25452
25453 * tree.h (build_index_vector): Declare.
25454 * tree.c (build_index_vector): New function.
25455 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25456 of units as polynomial, forcibly converting it to a constant if
25457 vectorizable_reduction has already enforced the condition.
25458 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
25459 to create a {1,2,3,...} vector.
25460 (vectorizable_reduction): Treat the number of units as polynomial.
25461 Choose vectype_in based on the largest scalar element size rather
25462 than the smallest number of units. Enforce the restrictions
25463 relied on above.
25464
25465 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25466 Alan Hayward <alan.hayward@arm.com>
25467 David Sherwood <david.sherwood@arm.com>
25468
25469 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25470 number of units as polynomial.
25471
25472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25473 Alan Hayward <alan.hayward@arm.com>
25474 David Sherwood <david.sherwood@arm.com>
25475
25476 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25477 * target.def (autovectorize_vector_sizes): Return the vector sizes
25478 by pointer, using vector_sizes rather than a bitmask.
25479 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25480 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25481 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25482 Likewise.
25483 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25484 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25485 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25486 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25487 * omp-general.c (omp_max_vf): Likewise.
25488 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25489 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25490 * tree-vect-loop.c (vect_analyze_loop): Likewise.
25491 * tree-vect-slp.c (vect_slp_bb): Likewise.
25492 * doc/tm.texi: Regenerate.
25493 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25494 to a poly_uint64.
25495 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25496 the vector size as a poly_uint64 rather than an unsigned int.
25497 (current_vector_size): Change from an unsigned int to a poly_uint64.
25498 (get_vectype_for_scalar_type): Update accordingly.
25499 * tree.h (build_truth_vector_type): Take the size and number of
25500 units as a poly_uint64 rather than an unsigned int.
25501 (build_vector_type): Add a temporary overload that takes
25502 the number of units as a poly_uint64 rather than an unsigned int.
25503 * tree.c (make_vector_type): Likewise.
25504 (build_truth_vector_type): Take the number of units as a poly_uint64
25505 rather than an unsigned int.
25506
25507 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25508 Alan Hayward <alan.hayward@arm.com>
25509 David Sherwood <david.sherwood@arm.com>
25510
25511 * target.def (get_mask_mode): Take the number of units and length
25512 as poly_uint64s rather than unsigned ints.
25513 * targhooks.h (default_get_mask_mode): Update accordingly.
25514 * targhooks.c (default_get_mask_mode): Likewise.
25515 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25516 * doc/tm.texi: Regenerate.
25517
25518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25519 Alan Hayward <alan.hayward@arm.com>
25520 David Sherwood <david.sherwood@arm.com>
25521
25522 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25523 * omp-general.c (omp_max_vf): Likewise.
25524 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25525 (expand_omp_simd): Handle polynomial safelen.
25526 * omp-low.c (omplow_simd_context): Add a default constructor.
25527 (omplow_simd_context::max_vf): Change from int to poly_uint64.
25528 (lower_rec_simd_input_clauses): Update accordingly.
25529 (lower_rec_input_clauses): Likewise.
25530
25531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25532 Alan Hayward <alan.hayward@arm.com>
25533 David Sherwood <david.sherwood@arm.com>
25534
25535 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25536 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25537 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25538 (vect_analyze_slp_cost): Likewise.
25539 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25540 (vect_model_load_cost): Likewise.
25541
25542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25543 Alan Hayward <alan.hayward@arm.com>
25544 David Sherwood <david.sherwood@arm.com>
25545
25546 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25547 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25548 from an unsigned int * to a poly_uint64_pod *.
25549 (calculate_unrolling_factor): New function.
25550 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
25551
25552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25553 Alan Hayward <alan.hayward@arm.com>
25554 David Sherwood <david.sherwood@arm.com>
25555
25556 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25557 from an unsigned int to a poly_uint64.
25558 (_loop_vec_info::slp_unrolling_factor): Likewise.
25559 (_loop_vec_info::vectorization_factor): Change from an int
25560 to a poly_uint64.
25561 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25562 (vect_get_num_vectors): New function.
25563 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25564 (vect_get_num_copies): Use vect_get_num_vectors.
25565 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25566 to an unsigned int *.
25567 (vect_analyze_data_refs): Change min_vf from an int * to a
25568 poly_uint64 *.
25569 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25570 than an unsigned HOST_WIDE_INT.
25571 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25572 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25573 to an unsigned int *.
25574 (vect_analyze_data_ref_dependences): Likewise.
25575 (vect_compute_data_ref_alignment): Handle polynomial vf.
25576 (vect_enhance_data_refs_alignment): Likewise.
25577 (vect_prune_runtime_alias_test_list): Likewise.
25578 (vect_shift_permute_load_chain): Likewise.
25579 (vect_supportable_dr_alignment): Likewise.
25580 (dependence_distance_ge_vf): Take the vectorization factor as a
25581 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25582 (vect_analyze_data_refs): Change min_vf from an int * to a
25583 poly_uint64 *.
25584 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25585 vfm1 as a poly_uint64 rather than an int. Make the same change
25586 for the returned bound_scalar.
25587 (vect_gen_vector_loop_niters): Handle polynomial vf.
25588 (vect_do_peeling): Likewise. Update call to
25589 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25590 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25591 be constant.
25592 * tree-vect-loop.c (vect_determine_vectorization_factor)
25593 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25594 (vect_get_known_peeling_cost): Likewise.
25595 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25596 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25597 (vect_transform_loop): Likewise. Use the lowest possible VF when
25598 updating the upper bounds of the loop.
25599 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25600 rather than an int.
25601 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25602 polynomial unroll factors.
25603 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25604 (vect_make_slp_decision): Likewise.
25605 (vect_supported_load_permutation_p): Likewise, and polynomial
25606 vf too.
25607 (vect_analyze_slp_cost): Handle polynomial vf.
25608 (vect_slp_analyze_node_operations): Likewise.
25609 (vect_slp_analyze_bb_1): Likewise.
25610 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25611 than an unsigned HOST_WIDE_INT.
25612 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25613 (vectorizable_load): Handle polynomial vf.
25614 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25615 a poly_uint64.
25616 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25617
25618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25619 Alan Hayward <alan.hayward@arm.com>
25620 David Sherwood <david.sherwood@arm.com>
25621
25622 * match.pd: Handle bit operations involving three constants
25623 and try to fold one pair.
25624
25625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25626
25627 * tree-vect-loop-manip.c: Include gimple-fold.h.
25628 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25629 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25630 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25631 Add a path that uses a step of VF instead of 1, but disable it
25632 for now.
25633 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25634 and niters_no_overflow parameters. Update calls to
25635 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25636 Create a new SSA name if the latter choses to use a ste other
25637 than zero, and return it via niters_vector_mult_vf_var.
25638 * tree-vect-loop.c (vect_transform_loop): Update calls to
25639 vect_do_peeling, vect_gen_vector_loop_niters and
25640 slpeel_make_loop_iterate_ntimes.
25641 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25642 (vect_gen_vector_loop_niters): Update declarations after above changes.
25643
25644 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25645
25646 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25647 128-bit round to integer instructions.
25648 (ceil<mode>2): Likewise.
25649 (btrunc<mode>2): Likewise.
25650 (round<mode>2): Likewise.
25651
25652 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25653
25654 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25655 unaligned VSX load/store on P8/P9.
25656 (expand_block_clear): Allow the use of unaligned VSX
25657 load/store on P8/P9.
25658
25659 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25660
25661 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25662 New function.
25663 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25664 swap associated with both a load and a store.
25665
25666 2018-01-02 Andrew Waterman <andrew@sifive.com>
25667
25668 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25669 * config/riscv/riscv.md (clear_cache): Use it.
25670
25671 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25672
25673 * web.c: Remove out-of-date comment.
25674
25675 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25676
25677 * expr.c (fixup_args_size_notes): Check that any existing
25678 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25679 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25680 (emit_single_push_insn): ...here.
25681
25682 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25683
25684 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25685 (const_vector_encoded_nelts): New function.
25686 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25687 (const_vector_int_elt, const_vector_elt): Declare.
25688 * emit-rtl.c (const_vector_int_elt_1): New function.
25689 (const_vector_elt): Likewise.
25690 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25691 of CONST_VECTOR_ELT.
25692
25693 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25694
25695 * expr.c: Include rtx-vector-builder.h.
25696 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25697 directly on the tree encoding.
25698 (const_vector_from_tree): Likewise.
25699 * optabs.c: Include rtx-vector-builder.h.
25700 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25701 sequence of "u" values.
25702 * vec-perm-indices.c: Include rtx-vector-builder.h.
25703 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25704 directly on the vec_perm_indices encoding.
25705
25706 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25707
25708 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25709 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25710 * rtx-vector-builder.h: New file.
25711 * rtx-vector-builder.c: Likewise.
25712 * rtl.h (rtx_def::u2): Add a const_vector field.
25713 (CONST_VECTOR_NPATTERNS): New macro.
25714 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25715 (CONST_VECTOR_DUPLICATE_P): Likewise.
25716 (CONST_VECTOR_STEPPED_P): Likewise.
25717 (CONST_VECTOR_ENCODED_ELT): Likewise.
25718 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25719 (unwrap_const_vec_duplicate): Likewise.
25720 (const_vec_series_p): Check for a non-duplicated vector encoding.
25721 Say that the function only returns true for integer vectors.
25722 * emit-rtl.c: Include rtx-vector-builder.h.
25723 (gen_const_vec_duplicate_1): Delete.
25724 (gen_const_vector): Call gen_const_vec_duplicate instead of
25725 gen_const_vec_duplicate_1.
25726 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25727 (gen_const_vec_duplicate): Use rtx_vector_builder.
25728 (gen_const_vec_series): Likewise.
25729 (gen_rtx_CONST_VECTOR): Likewise.
25730 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25731 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25732 Build a new vector rather than modifying a CONST_VECTOR in-place.
25733 (handle_special_swappables): Update call accordingly.
25734 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25735 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25736 Build a new vector rather than modifying a CONST_VECTOR in-place.
25737 (handle_special_swappables): Update call accordingly.
25738
25739 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25740
25741 * simplify-rtx.c (simplify_const_binary_operation): Use
25742 CONST_VECTOR_ELT instead of XVECEXP.
25743
25744 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25745
25746 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25747 the selector elements to be different from the data elements
25748 if the selector is a VECTOR_CST.
25749 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25750 ssizetype for the selector.
25751
25752 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25753
25754 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25755 before testing each element individually.
25756 * tree-vect-generic.c (lower_vec_perm): Likewise.
25757
25758 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25759
25760 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25761 * selftest-run-tests.c (selftest::run_tests): Call it.
25762 * vector-builder.h (vector_builder::operator ==): New function.
25763 (vector_builder::operator !=): Likewise.
25764 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25765 (vec_perm_indices::all_from_input_p): New function.
25766 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25767 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25768 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25769 instead of reading the VECTOR_CST directly. Detect whether both
25770 vector inputs are the same before constructing the vec_perm_indices,
25771 and update the number of inputs argument accordingly. Use the
25772 utility functions added above. Only construct sel2 if we need to.
25773
25774 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25775
25776 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25777 the broadcast of the low byte.
25778 (expand_mult_highpart): Use an explicit encoding for the permutes.
25779 * optabs-query.c (can_mult_highpart_p): Likewise.
25780 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25781 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25782 (vectorizable_bswap): Likewise.
25783 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25784 explicit encoding for the power-of-2 permutes.
25785 (vect_permute_store_chain): Likewise.
25786 (vect_grouped_load_supported): Likewise.
25787 (vect_permute_load_chain): Likewise.
25788
25789 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25790
25791 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25792 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25793 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25794 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25795 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25796 (vect_gen_perm_mask_any): Likewise.
25797
25798 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25799
25800 * int-vector-builder.h: New file.
25801 * vec-perm-indices.h: Include int-vector-builder.h.
25802 (vec_perm_indices): Redefine as an int_vector_builder.
25803 (auto_vec_perm_indices): Delete.
25804 (vec_perm_builder): Redefine as a stand-alone class.
25805 (vec_perm_indices::vec_perm_indices): New function.
25806 (vec_perm_indices::clamp): Likewise.
25807 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25808 (vec_perm_indices::new_vector): New function.
25809 (vec_perm_indices::new_expanded_vector): Update for new
25810 vec_perm_indices class.
25811 (vec_perm_indices::rotate_inputs): New function.
25812 (vec_perm_indices::all_in_range_p): Operate directly on the
25813 encoded form, without computing elided elements.
25814 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25815 encoding. Update for new vec_perm_indices class.
25816 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25817 the given vec_perm_builder.
25818 (expand_vec_perm_var): Update vec_perm_builder constructor.
25819 (expand_mult_highpart): Use vec_perm_builder instead of
25820 auto_vec_perm_indices.
25821 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25822 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25823 or double series encoding as appropriate.
25824 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25825 vec_perm_indices instead of auto_vec_perm_indices.
25826 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25827 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25828 (vect_permute_store_chain): Likewise.
25829 (vect_grouped_load_supported): Likewise.
25830 (vect_permute_load_chain): Likewise.
25831 (vect_shift_permute_load_chain): Likewise.
25832 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25833 (vect_transform_slp_perm_load): Likewise.
25834 (vect_schedule_slp_instance): Likewise.
25835 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25836 (vectorizable_mask_load_store): Likewise.
25837 (vectorizable_bswap): Likewise.
25838 (vectorizable_store): Likewise.
25839 (vectorizable_load): Likewise.
25840 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25841 vec_perm_indices instead of auto_vec_perm_indices. Use
25842 tree_to_vec_perm_builder to read the vector from a tree.
25843 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25844 vec_perm_builder instead of a vec_perm_indices.
25845 (have_whole_vector_shift): Use vec_perm_builder and
25846 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25847 truncation to calc_vec_perm_mask_for_shift.
25848 (vect_create_epilog_for_reduction): Likewise.
25849 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25850 from auto_vec_perm_indices to vec_perm_indices.
25851 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25852 instead of changing individual elements.
25853 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25854 the vector in d.perm.
25855 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25856 from auto_vec_perm_indices to vec_perm_indices.
25857 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25858 instead of changing individual elements.
25859 (arm_vectorize_vec_perm_const): Use new_vector to install
25860 the vector in d.perm.
25861 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25862 Update vec_perm_builder constructor.
25863 (rs6000_expand_interleave): Likewise.
25864 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25865 (rs6000_expand_interleave): Likewise.
25866
25867 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25868
25869 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25870 to qimode could truncate the indices.
25871 * optabs.c (expand_vec_perm_var): Likewise.
25872
25873 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25874
25875 * Makefile.in (OBJS): Add vec-perm-indices.o.
25876 * vec-perm-indices.h: New file.
25877 * vec-perm-indices.c: Likewise.
25878 * target.h (vec_perm_indices): Replace with a forward class
25879 declaration.
25880 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25881 * optabs.h: Include vec-perm-indices.h.
25882 (expand_vec_perm): Delete.
25883 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25884 (expand_vec_perm_const): Declare.
25885 * target.def (vec_perm_const_ok): Replace with...
25886 (vec_perm_const): ...this new hook.
25887 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25888 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25889 * doc/tm.texi: Regenerate.
25890 * optabs.def (vec_perm_const): Delete.
25891 * doc/md.texi (vec_perm_const): Likewise.
25892 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25893 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25894 expand_vec_perm for constant permutation vectors. Assert that
25895 the mode of variable permutation vectors is the integer equivalent
25896 of the mode that is being permuted.
25897 * optabs-query.h (selector_fits_mode_p): Declare.
25898 * optabs-query.c: Include vec-perm-indices.h.
25899 (selector_fits_mode_p): New function.
25900 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25901 is defined, instead of checking whether the vec_perm_const_optab
25902 exists. Use targetm.vectorize.vec_perm_const instead of
25903 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25904 fit in the vector mode before using a variable permute.
25905 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25906 vec_perm_indices instead of an rtx.
25907 (expand_vec_perm): Replace with...
25908 (expand_vec_perm_const): ...this new function. Take the selector
25909 as a vec_perm_indices rather than an rtx. Also take the mode of
25910 the selector. Update call to shift_amt_for_vec_perm_mask.
25911 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25912 Use vec_perm_indices::new_expanded_vector to expand the original
25913 selector into bytes. Check whether the indices fit in the vector
25914 mode before using a variable permute.
25915 (expand_vec_perm_var): Make global.
25916 (expand_mult_highpart): Use expand_vec_perm_const.
25917 * fold-const.c: Includes vec-perm-indices.h.
25918 * tree-ssa-forwprop.c: Likewise.
25919 * tree-vect-data-refs.c: Likewise.
25920 * tree-vect-generic.c: Likewise.
25921 * tree-vect-loop.c: Likewise.
25922 * tree-vect-slp.c: Likewise.
25923 * tree-vect-stmts.c: Likewise.
25924 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25925 Delete.
25926 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25927 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25928 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25929 (aarch64_vectorize_vec_perm_const): ...this new function.
25930 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25931 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25932 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25933 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25934 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25935 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25936 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25937 into...
25938 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25939 check for NEON modes.
25940 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25941 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25942 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25943 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25944 into...
25945 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25946 the old VEC_PERM_CONST conditions.
25947 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25948 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25949 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25950 (ia64_vectorize_vec_perm_const_ok): Merge into...
25951 (ia64_vectorize_vec_perm_const): ...this new function.
25952 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25953 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25954 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25955 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25956 * config/mips/mips.c (mips_expand_vec_perm_const)
25957 (mips_vectorize_vec_perm_const_ok): Merge into...
25958 (mips_vectorize_vec_perm_const): ...this new function.
25959 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25960 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25961 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25962 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25963 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25964 (rs6000_expand_vec_perm_const): Delete.
25965 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25966 Delete.
25967 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25968 (altivec_expand_vec_perm_const_le): Take each operand individually.
25969 Operate on constant selectors rather than rtxes.
25970 (altivec_expand_vec_perm_const): Likewise. Update call to
25971 altivec_expand_vec_perm_const_le.
25972 (rs6000_expand_vec_perm_const): Delete.
25973 (rs6000_vectorize_vec_perm_const_ok): Delete.
25974 (rs6000_vectorize_vec_perm_const): New function.
25975 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25976 an element count and rtx array.
25977 (rs6000_expand_extract_even): Update call accordingly.
25978 (rs6000_expand_interleave): Likewise.
25979 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25980 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25981 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25982 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25983 (rs6000_expand_vec_perm_const): Delete.
25984 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25985 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25986 (altivec_expand_vec_perm_const_le): Take each operand individually.
25987 Operate on constant selectors rather than rtxes.
25988 (altivec_expand_vec_perm_const): Likewise. Update call to
25989 altivec_expand_vec_perm_const_le.
25990 (rs6000_expand_vec_perm_const): Delete.
25991 (rs6000_vectorize_vec_perm_const_ok): Delete.
25992 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25993 reference to the SPE evmerge intructions.
25994 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25995 an element count and rtx array.
25996 (rs6000_expand_extract_even): Update call accordingly.
25997 (rs6000_expand_interleave): Likewise.
25998 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25999 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
26000 new function.
26001 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26002
26003 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26004
26005 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
26006 vector mode and that that mode matches the mode of the data
26007 being permuted.
26008 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
26009 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
26010 directly using expand_vec_perm_1 when forcing selectors into
26011 registers.
26012 (expand_vec_perm_var): New function, split out from expand_vec_perm.
26013
26014 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26015
26016 * optabs-query.h (can_vec_perm_p): Delete.
26017 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
26018 * optabs-query.c (can_vec_perm_p): Split into...
26019 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
26020 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
26021 particular selector is valid.
26022 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26023 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26024 (vect_grouped_load_supported): Likewise.
26025 (vect_shift_permute_load_chain): Likewise.
26026 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26027 (vect_transform_slp_perm_load): Likewise.
26028 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26029 (vectorizable_bswap): Likewise.
26030 (vect_gen_perm_mask_checked): Likewise.
26031 * fold-const.c (fold_ternary_loc): Likewise. Don't take
26032 implementations of variable permutation vectors into account
26033 when deciding which selector to use.
26034 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
26035 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
26036 with a false third argument.
26037 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
26038 to test whether the constant selector is valid and can_vec_perm_var_p
26039 to test whether a variable selector is valid.
26040
26041 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26042
26043 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
26044 * optabs-query.c (can_vec_perm_p): Likewise.
26045 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
26046 instead of vec_perm_indices.
26047 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
26048 (vect_gen_perm_mask_checked): Likewise,
26049 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
26050 (vect_gen_perm_mask_checked): Likewise,
26051
26052 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26053
26054 * optabs-query.h (qimode_for_vec_perm): Declare.
26055 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
26056 (qimode_for_vec_perm): ...this new function.
26057 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
26058
26059 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26060
26061 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
26062 does not have a conditional at the top.
26063
26064 2018-01-02 Richard Biener <rguenther@suse.de>
26065
26066 * ipa-inline.c (big_speedup_p): Fix expression.
26067
26068 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26069
26070 PR target/81616
26071 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
26072 for generic 4->6.
26073
26074 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26075
26076 PR target/81616
26077 Generic tuning.
26078 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
26079 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
26080 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
26081 cond_taken_branch_cost 3->4.
26082
26083 2018-01-01 Jakub Jelinek <jakub@redhat.com>
26084
26085 PR tree-optimization/83581
26086 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
26087 TODO_cleanup_cfg if any changes have been made.
26088
26089 PR middle-end/83608
26090 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
26091 convert_modes if target mode has the right side, but different mode
26092 class.
26093
26094 PR middle-end/83609
26095 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
26096 last argument when extracting from CONCAT. If either from_real or
26097 from_imag is NULL, use expansion through memory. If result is not
26098 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
26099 the parts directly to inner mode, if even that fails, use expansion
26100 through memory.
26101
26102 PR middle-end/83623
26103 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
26104 check for bswap in mode rather than HImode and use that in expand_unop
26105 too.
26106 \f
26107 Copyright (C) 2018 Free Software Foundation, Inc.
26108
26109 Copying and distribution of this file, with or without modification,
26110 are permitted in any medium without royalty provided the copyright
26111 notice and this notice are preserved.