[aarch64] Add HiSilicon tsv110 CPU support
[gcc.git] / gcc / ChangeLog
1 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
2 Bo Zhou <zbo.zhou@hisilicon.com>
3
4 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
5 * config/aarch64/aarch64-tune.md: Regenerated.
6 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
7 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
8 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
9
10 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
11 Julian Brown <julian@codesourcery.com>
12
13 * builtins.c (get_builtin_sync_mem): Handle address spaces.
14
15 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
16
17 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
18 if the call takes a static chain.
19
20 2018-09-21 Martin Liska <mliska@suse.cz>
21
22 * auto-profile.c (autofdo_source_profile::read): Do not
23 set sum_all.
24 (read_profile): Do not add working sets.
25 (read_autofdo_file): Remove sum_all.
26 (afdo_callsite_hot_enough_for_early_inline): Remove const
27 qualifier.
28 * coverage.c (struct counts_entry): Remove gcov_summary.
29 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
30 do not support GCOV_TAG_PROGRAM_SUMMARY.
31 (get_coverage_counts): Remove summary and expected
32 arguments.
33 * coverage.h (get_coverage_counts): Likewise.
34 * doc/gcov-dump.texi: Remove -w option.
35 * gcov-dump.c (dump_working_sets): Remove.
36 (main): Do not support '-w' option.
37 (print_usage): Likewise.
38 (tag_summary): Likewise.
39 * gcov-io.c (gcov_write_summary): Do not dump
40 histogram.
41 (gcov_read_summary): Likewise.
42 (gcov_histo_index): Remove.
43 (gcov_histogram_merge): Likewise.
44 (compute_working_sets): Likewise.
45 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
46 it not obsolete.
47 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
48 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
49 (GCOV_HISTOGRAM_SIZE): Remove.
50 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
51 (struct gcov_summary): Simplify rapidly just
52 to runs and sum_max fields.
53 (gcov_histo_index): Remove.
54 (NUM_GCOV_WORKING_SETS): Likewise.
55 (compute_working_sets): Likewise.
56 * gcov-tool.c (print_overlap_usage_message): Remove
57 trailing empty line.
58 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
59 (output_lines): Remove program related line.
60 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
61 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
62 histogram.
63 (input_profile_summary): Do not read it.
64 (merge_profile_summaries): And do not merge it.
65 (input_symtab): Do not call removed function.
66 * modulo-sched.c (sms_schedule): Do not print sum_max.
67 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
68 removed when histogram method was invented.
69 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
70 mode.
71 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
72 GCOV coding style.
73 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
74 and dump selected value.
75 * profile.c (add_working_set): Remove.
76 (get_working_sets): Likewise.
77 (find_working_set): Likewise.
78 (get_exec_counts): Do not work with working sets.
79 (read_profile_edge_counts): Do not inform as sum_max is removed.
80 (compute_branch_probabilities): Likewise.
81 (compute_value_histograms): Remove argument for call of
82 get_coverage_counts.
83 * profile.h: Do not make gcov_summary const.
84
85 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
86
87 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
88
89 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
90
91 PR tree-optimization/86990
92 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
93 Check that the entire merged store group is made of constants only for
94 overlapping stores.
95
96 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
97
98 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
99 (VTABLE_VERIFICATION_SPEC): Likewise.
100 (SANITIZER_EARLY_SPEC): Likewise.
101 (SANITIZER_SPEC): Likewise.
102 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
103 * doc/invoke.texi (Link Options): Document -r.
104
105 2018-09-20 Richard Biener <rguenther@suse.de>
106
107 PR middle-end/87054
108 * gimplify.c (gimplify_expr): Retain alignment of
109 addressable lvalue in dereference.
110
111 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
112
113 PR bootstrap/87013
114 * configure.ac: Check for .loc is_stmt support.
115 * configure, config.in: Rebuilt.
116 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
117 if not supported.
118
119 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
120
121 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
122 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
123 -misel=no.
124
125 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
126
127 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
128 VECTOR_OTHER.
129 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
130 case VECTOR_OTHER.
131
132 2018-09-20 Marek Polacek <polacek@redhat.com>
133
134 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
135
136 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
137
138 PR tree-optimization/87288
139 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
140 into account when determining PEELING_FOR_NITERS.
141
142 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
143
144 PR tree-optimization/86877
145 * tree-vect-loop.c (vect_analyze_loop_2): Call
146 vect_verify_datarefs_alignment.
147
148 2018-09-19 Marek Polacek <polacek@redhat.com>
149
150 * doc/invoke.texi: Document -Wclass-conversion.
151
152 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
153
154 * config/pa/pa.c (pa_adjust_priority): Delete.
155 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
156
157 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
158 (atomic_storehi): Likewise.
159 (atomic_storesi): Likewise.
160 (atomic_loaddi): Restore compare and swap exchange loop code.
161
162 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
163
164 PR rtl-optimization/86902
165 * combine.c (try_combine): When changing the CC mode used, don't change
166 an unrelated mode in other_insn to that new CC mode.
167
168 2018-09-19 David Malcolm <dmalcolm@redhat.com>
169
170 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
171 with %T in place of calls to dump_generic_expr.
172 (prune_runtime_alias_test_list): Likewise.
173 (create_runtime_alias_checks): Likewise.
174 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
175 (vect_analyze_data_ref_dependence): Likewise.
176 (vect_slp_analyze_data_ref_dependence): Likewise.
177 (vect_record_base_alignment): Likewise. Use %G in place of call
178 to dump_gimple_stmt.
179 (vect_compute_data_ref_alignment): Likewise.
180 (verify_data_ref_alignment): Likewise.
181 (vect_find_same_alignment_drs): Likewise.
182 (vect_analyze_group_access_1): Likewise.
183 (vect_analyze_data_ref_accesses): Likewise.
184 (dependence_distance_ge_vf): Likewise.
185 (dump_lower_bound): Likewise.
186 (vect_prune_runtime_alias_test_list): Likewise.
187 (vect_find_stmt_data_reference): Likewise.
188 (vect_analyze_data_refs): Likewise.
189 (vect_create_addr_base_for_vector_ref): Likewise.
190 (vect_create_data_ref_ptr): Likewise.
191 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
192 (vect_can_advance_ivs_p): Likewise.
193 (vect_update_ivs_after_vectorizer): Likewise.
194 (vect_gen_prolog_loop_niters): Likewise.
195 (vect_prepare_for_masked_peels): Likewise.
196 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
197 (vect_determine_vectorization_factor): Likewise.
198 (vect_is_simple_iv_evolution): Likewise.
199 (vect_analyze_scalar_cycles_1): Likewise.
200 (vect_analyze_loop_operations): Likewise.
201 (report_vect_op): Likewise.
202 (vect_is_slp_reduction): Likewise.
203 (check_reduction_path): Likewise.
204 (vect_is_simple_reduction): Likewise.
205 (vect_create_epilog_for_reduction): Likewise.
206 (vect_finalize_reduction:): Likewise.
207 (vectorizable_induction): Likewise.
208 (vect_transform_loop_stmt): Likewise.
209 (vect_transform_loop): Likewise.
210 (optimize_mask_stores): Likewise.
211 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
212 (vect_split_statement): Likewise.
213 (vect_recog_over_widening_pattern): Likewise.
214 (vect_recog_average_pattern): Likewise.
215 (vect_determine_min_output_precision_1): Likewise.
216 (vect_determine_precisions_from_range): Likewise.
217 (vect_determine_precisions_from_users): Likewise.
218 (vect_mark_pattern_stmts): Likewise.
219 (vect_pattern_recog_1): Likewise.
220 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
221 (vect_record_max_nunits): Likewise.
222 (vect_build_slp_tree_1): Likewise.
223 (vect_build_slp_tree_2): Likewise.
224 (vect_print_slp_tree): Likewise.
225 (vect_analyze_slp_instance): Likewise.
226 (vect_detect_hybrid_slp_stmts): Likewise.
227 (vect_detect_hybrid_slp_1): Likewise.
228 (vect_slp_analyze_operations): Likewise.
229 (vect_slp_analyze_bb_1): Likewise.
230 (vect_transform_slp_perm_load): Likewise.
231 (vect_schedule_slp_instance): Likewise.
232 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
233 (vect_mark_stmts_to_be_vectorized): Likewise.
234 (vect_init_vector_1): Likewise.
235 (vect_get_vec_def_for_operand): Likewise.
236 (vect_finish_stmt_generation_1): Likewise.
237 (vect_check_load_store_mask): Likewise.
238 (vectorizable_call): Likewise.
239 (vectorizable_conversion): Likewise.
240 (vectorizable_operation): Likewise.
241 (vectorizable_load): Likewise.
242 (vect_analyze_stmt): Likewise.
243 (vect_is_simple_use): Likewise.
244 (vect_get_vector_types_for_stmt): Likewise.
245 (vect_get_mask_type_for_stmt): Likewise.
246 * tree-vectorizer.c (increase_alignment): Likewise.
247
248 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
249
250 * doc/rtl.texi: Adjust vec_select description.
251 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
252 non-constant selectors.
253
254 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
255
256 * config/aarch64/aarch64-protos.h
257 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
258 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
259 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
260 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
261 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
262 (AARCH64_FL_PROFILE): Move index so flags are ordered.
263 (AARCH64_ISA_RCPC8_4): New flag.
264 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
265 to aarch64_offset_9bit_signed_unscaled_p.
266 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
267 and use stlur.
268 * config/aarch64/constraints.md (Ust): New constraint.
269 * config/aarch64/predicates.md.
270 (aarch64_9bit_offset_memory_operand): New predicate.
271 (aarch64_rcpc_memory_operand): New predicate.
272
273 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
274
275 PR rtl-optimization/87361
276 * rtlanal.c (nonzero_bits1): Revert accidental change.
277
278 2018-09-19 Richard Biener <rguenther@suse.de>
279
280 PR tree-optimization/87349
281 PR tree-optimization/87342
282 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
283
284 2018-09-18 Marek Polacek <polacek@redhat.com>
285
286 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
287 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
288
289 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
290
291 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
292
293 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
294
295 PR rtl-optimization/86882
296 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
297
298 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
299
300 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
301 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
302
303 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
304
305 PR other/87353
306 * doc/invoke.texi (Link Options): Fix formatting and grammar.
307
308 2018-09-18 Richard Biener <rguenther@suse.de>
309
310 PR middle-end/63155
311 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
312 (compute_samebase_partition_bases): Likewise.
313 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
314 (gimple_can_coalesce_p): Simplify.
315
316 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
317
318 Handle a library implementation of ffs calling __builtin_ffs.
319 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
320 (mmix_init_libfuncs): New function: make __builtin_ffs expand
321 to __ffsdi2.
322
323 2018-09-17 David Malcolm <dmalcolm@redhat.com>
324
325 * diagnostic-show-locus.c (class layout_range): Add field
326 "m_original_idx".
327 (layout_range::layout_range): Add "original_idx" param and use it
328 to initialize new field.
329 (make_range): Use 0 for original_idx.
330 (layout::layout): Pass in index to calls to
331 maybe_add_location_range.
332 (layout::maybe_add_location_range): Add param "original_idx" and
333 pass it on to layout_range.
334 (layout::print_any_labels): Pass on range->m_original_idx to
335 get_text call.
336 (gcc_rich_location::add_location_if_nearby): Use 0 for
337 original_idx.
338 * gcc-rich-location.h (text_range_label::get_text): Update for new
339 param.
340 (range_label_for_type_mismatch::get_text): Likewise.
341
342 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
343
344 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
345
346 2018-09-17 David Malcolm <dmalcolm@redhat.com>
347
348 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
349 format_string_diagnostic_t.
350 (fmtwarn_n): Likewise.
351 * substring-locations.c
352 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
353 (format_warning_n_va): Convert to...
354 (format_string_diagnostic_t::emit_warning_n_va): ...this.
355 (format_warning_va): Convert to...
356 (format_string_diagnostic_t::emit_warning_va): ...this.
357 (format_warning_at_substring): Convert to...
358 (format_string_diagnostic_t::emit_warning): ...this.
359 (format_warning_at_substring_n): Convert to...
360 (format_string_diagnostic_t::emit_warning_n): ...this.
361 * substring-locations.h (class format_string_diagnostic_t): New
362 class.
363 (format_warning_va): Convert to
364 format_string_diagnostic_t::emit_warning_va.
365 (format_warning_n_va): Convert to
366 format_string_diagnostic_t::emit_warning_n_va.
367 (format_warning_at_substring): Convert to
368 format_string_diagnostic_t::emit_warning.
369 (format_warning_at_substring_n): Convert to
370 format_string_diagnostic_t::emit_warning_n.
371
372 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
373 Bernd Schmidt <bernds_cb1@t-online.de>
374
375 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
376 SImode args.
377
378 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
379
380 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
381 operand 0 predicate to nonimmediate operand.
382 (rint<mode>2_frndint): Remove insn pattern.
383 (rint<mode>2): Change operand 1 predicate to general_operand.
384 Extend operand 1 to XFmode and generate rintxf2 insn.
385 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
386 Do not use X87MODEF mode macro.
387 (frndintxf2_<rounding>_i387): Rename from
388 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
389 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
390 to XFmode and generate significandxf3 insn.
391
392 2018-09-17 Richard Biener <rguenther@suse.de>
393
394 PR tree-optimization/87328
395 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
396 visiting unexecutable backedges when not iterating.
397 (do_rpo_vn): Mark all edges not executable even when not
398 iterating.
399
400 2018-09-17 Martin Jambor <mjambor@suse.cz>
401
402 PR c/63886
403 * doc/invoke.texi (Warning Options): Likewise.
404
405 2018-09-17 Richard Biener <rguenther@suse.de>
406
407 PR tree-optimization/87301
408 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
409 clean EH info from leftover copy assignments.
410
411 2018-09-17 Martin Liska <mliska@suse.cz>
412
413 PR gcov-profile/85871
414 * gcov.c (output_intermediate_file): Fix out of bounds
415 access.
416
417 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
418
419 * config/arc/arc.c: Object attributes for core4 not reflected
420 correctly.
421 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
422 core3).
423
424 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
425
426 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
427
428 2018-09-17 Martin Liska <mliska@suse.cz>
429
430 * doc/gcov.texi: Document new option --use-hotness-colors.
431 * gcov.c (struct source_info): Declare new field.
432 (source_info::source_info): Set default for maximum_count.
433 (print_usage): Add new -q option.
434 (process_args): Process it.
435 (accumulate_line_info): Save src->maximum_count.
436 (output_line_beginning): Make color line number if
437 flag_use_hotness_colors is set.
438 (output_line_details): Pass default argument value.
439 (output_lines): Pass src->maximum_count.
440
441 2018-09-17 Martin Liska <mliska@suse.cz>
442
443 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
444 Use processor_names table.
445 * config/i386/i386.c (ix86_default_align): Use
446 processor_cost_table for alignment values.
447 (ix86_option_override_internal): Use processor_names.
448 (ix86_function_specific_print): Likewise.
449 * config/i386/i386.h (struct processor_costs):
450 Add alignment values.
451 (struct ptt): Remove and replace with const char *.
452 * config/i386/x86-tune-costs.h (struct processor_costs):
453 Declare default alignments for all costs.
454
455 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
456
457 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
458 symbolics or VR_VARYING ranges for ABS_EXPR.
459 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
460 when range will wrap.
461
462 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
463
464 PR middle-end/86864
465 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
466 before and after a JUMP_TABLE_DATA.
467
468 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
469
470 PR middle-end/87188
471 * dojump.c (do_compare_and_jump): Canonicalize function pointers
472 when one operand is a function pointer. Use POINTER_TYPE_P and
473 FUNC_OR_METHOD_TYPE_P.
474 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
475 * fold-const.c (build_range_check): Likewise.
476 * match.pd (simple_comparison): Likewise.
477
478 2018-09-14 David Malcolm <dmalcolm@redhat.com>
479
480 PR c/82967
481 * spellcheck.c (get_edit_distance_cutoff): New function.
482 (selftest::test_edit_distance_unit_test_oneway): Rename to...
483 (selftest::test_get_edit_distance_one_way): ...this.
484 (selftest::test_get_edit_distance_unit): Rename to...
485 (selftest::test_get_edit_distance_both_ways): ...this.
486 (selftest::test_edit_distances): Move tests to this new function,
487 and test some more pairs of strings. Update for above renaming.
488 (selftest::get_old_cutoff): New function.
489 (selftest::test_get_edit_distance_cutoff): New function.
490 (selftest::assert_suggested_for): New function.
491 (ASSERT_SUGGESTED_FOR): New macro.
492 (selftest::assert_not_suggested_for): New function.
493 (ASSERT_NOT_SUGGESTED_FOR): New macro.
494 (selftest::test_suggestions): New function.
495 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
496 tests to selftest::test_edit_distances and call it. Add calls to
497 selftest::test_get_edit_distance_cutoff and
498 selftest::test_suggestions.
499 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
500 (best_match::consider): Replace hard-coded cutoff calculation with
501 a call to...
502 (best_match::get_cutoff): New declaration.
503 (best_match::get_best_meaningful_candidate): Likewise.
504
505 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
506
507 * builtins.c (fold_builtin_strlen): Remove TODO comment.
508
509 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
510
511 revert:
512 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
513
514 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
515 terminated string literal.
516
517 2018-09-14 Martin Sebor <msebor@redhat.com>
518
519 * builtins.c (unterminated_array): Handle ARRAY_REF.
520 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
521 * builtins.h (unterminated_array): Declare extern.
522 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
523 arrays.
524 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
525 calls.
526
527 2018-09-14 Martin Sebor <msebor@redhat.com>
528 Jeff Law <law@redhat.com>
529
530 * builtins.c (unterminated_array): New.
531 (expand_builtin_strcpy): Adjust.
532 (expand_builtin_strcpy_args): Detect unterminated arrays.
533 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
534 unterminated arrays.
535 * gimple-fold.h (get_maxval_strlen): Add argument.
536 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
537
538 * gimple-fold.c (get_range_strlen): Add argument.
539 (get_maxval_strlen): Adjust.
540 * gimple-fold.h (get_range_strlen): Add argument.
541
542 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
543
544 * config/i386/movdirintrin.h: Fix copyright year.
545
546 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
547
548 * reg-stack.c: Include regs.h.
549 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
550 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
551 FIRST_STACK_REG, not DFmode.
552 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
553 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
554 (change stack): Default register mode to the reg_raw_mode of
555 FIRST_STACK_REG, not DFmode.
556 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
557 (*swapxf): Rename from swapxf.
558
559 2018-09-14 Carl Love <cel@us.ibm.com>
560
561 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
562 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
563
564 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
565
566 PR target/87224
567 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
568 alternatives.
569
570 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
571
572 PR target/85628
573 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
574
575 2018-09-14 Jason Merrill <jason@redhat.com>
576
577 Fix --enable-gather-detailed-mem-stats.
578 * hash-table.c (hash_table_usage): Change from variable to function.
579 * hash-table.h: Adjust.
580 * Makefile.in: Add missing dependencies on hash-table.h.
581
582 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
583
584 PR tree-optimization/87259
585 PR lto/87283
586 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
587 execute_cse_reciprocals_1 has tried transforming.
588
589 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
590
591 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
592 VR_VARYING for PLUS/MINUS_EXPR.
593
594 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
595
596 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
597 formatting.
598
599 2018-09-14 Richard Biener <rguenther@suse.de>
600
601 PR middle-end/63155
602 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
603 bits for the merged partition.
604
605 2018-09-13 Martin Sebor <msebor@redhat.com>
606 Bernd Edlinger <bernd.edlinger@hotmail.de>
607
608 * builtins.h (c_srlen): Add argument.
609 * builtins.c (warn_string_no_nul): New function.
610 (c_strlen): Add argument and use it. Update recursive calls.
611 Pass DECL argument to string_constant to get info on non
612 terminated strings. Update *NONSTR as needed.
613 (fold_builtin_strlen): Add argument to calls to c_strlen.
614 Warn for unterminated arrays.
615 (warn_string_no_null): Add prototype.
616 * expr.c (string_constant): Update arguments. Update recursive
617 calls appropriately. Detect missing NUL terminator and outermost
618 declaration its missing in.
619 Improve checks for arrays with nonzero lower bound or elements
620 that are not a single byte. Simplify offset computation.
621 Simplify checks for non-NUL terminated strings.
622 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
623 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
624
625 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
626
627 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
628 correctly.
629 * fold-const.c (c_getstr): Fix function comment. Remove unused third
630 argument. Fix range checks.
631 * fold-const.h (c_getstr): Adjust protoype.
632 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
633 string is constant but contains no NUL byte.
634
635 * expr.c (string_constant): Adjust function comment.
636 Remove bogus check for zero termination.
637
638 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
639
640 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
641 (get_constant_size): Don't make STRING_CSTs larger than they are.
642 (check_string_literal): New check function for STRING_CSTs.
643 (output_constant): Use it.
644
645 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
646
647 PR target/86812
648 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
649
650 2018-09-13 Richard Biener <rguenther@suse.de>
651
652 PR tree-optimization/87263
653 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
654 (struct unwind_state): Add max_rpo field.
655 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
656 Compute max_rpo, the max RPO number a block can be backwards reached
657 from. Re-write non-iterating mode to a RPO ordered worklist approach,
658 separating it from the iterating mode.
659
660 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
661
662 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
663 (rfs_decision): New scheduling decision.
664
665 2018-09-13 Richard Biener <rguenther@suse.de>
666
667 PR bootstrap/87134
668 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
669 (vn_nary_op_insert_pieces_predicated): Do not write useless
670 valid_dominated_by_p entry outside of the allocated storage.
671
672 2018-09-13 Omar Sandoval <osandov@osandov.com>
673 Tom de Vries <tdevries@suse.de>
674
675 PR debug/86985
676 * dwarf2out.c (is_c): New function.
677 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
678
679 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
680
681 PR target/85628
682 * config/aarch64/aarch64.md (*aarch64_bfxil):
683 Define.
684 * config/aarch64/constraints.md (Ulc): Define.
685 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
686 Define.
687 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
688 New function.
689
690 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
691
692 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
693 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
694 aarch64_layout_frame call.
695 (aarch64_expand_epilogue): Likewise.
696 (aarch64_initial_elimination_offset): Likewise.
697 (aarch64_get_separate_components): Likewise.
698 (aarch64_use_return_insn_p): Likewise.
699 (aarch64_layout_frame): Remove unneeded check.
700
701 2018-09-13 Jakub Jelinek <jakub@redhat.com>
702
703 * configure.ac: Only append
704 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
705 gcc_config_arguments if it was never reconfigured or last reconfigure
706 was with different arguments.
707 * configure: Regenerated.
708
709 2018-09-13 Jakub Jelinek <jakub@redhat.com>
710 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
711
712 PR middle-end/87290
713 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
714 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
715
716 2018-09-13 Jakub Jelinek <jakub@redhat.com>
717
718 PR tree-optimization/87287
719 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
720 X % C == 0 to X % (unsigned) C == 0 optimization to ...
721 * match.pd (X % C == 0): ... here. New optimization.
722
723 2018-09-12 Jakub Jelinek <jakub@redhat.com>
724
725 PR middle-end/82853
726 * expr.h (maybe_optimize_mod_cmp): Declare.
727 * expr.c (mod_inv): New function.
728 (maybe_optimize_mod_cmp): New function.
729 (do_store_flag): Use it.
730 * cfgexpand.c (expand_gimple_cond): Likewise.
731
732 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
733 Julian Brown <julian@codesourcery.com>
734
735 PR middle-end/86336
736 * gimplify.c (gimplify_scan_omp_clauses): Set
737 target_firstprivatize_array_bases in OpenACC parallel and kernels
738 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
739 OpenACC data regions.
740
741 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
742
743 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
744 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
745
746 2018-09-12 Richard Biener <rguenther@suse.de>
747
748 PR tree-optimization/87280
749 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
750 edge but unreachable target.
751 (do_rpo_vn): For conservatively handling a PHI only mark
752 the backedge executable but not the block reachable.
753
754 2018-09-12 Richard Biener <rguenther@suse.de>
755
756 PR tree-optimization/87266
757 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
758 visited blocks.
759
760 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
761
762 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
763 constants.
764 ("trunc<BFP:mode><DFP_ALL:mode>2")
765 ("trunc<DFP_ALL:mode><BFP:mode>2")
766 ("extend<BFP:mode><DFP_ALL:mode>2")
767 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
768 according to the target operand type.
769
770 2018-09-12 Jakub Jelinek <jakub@redhat.com>
771 Andreas Krebbel <krebbel@linux.ibm.com>
772
773 PR tree-optimization/86844
774 * gimple-ssa-store-merging.c
775 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
776 there are any overlapping stores in between them, make sure they are
777 also coalesced or we give up completely.
778
779 2018-09-12 Jakub Jelinek <jakub@redhat.com>
780
781 PR middle-end/87248
782 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
783 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
784
785 2018-09-12 Tom de Vries <tdevries@suse.de>
786
787 * common.opt (gdescribe-dies): Add option.
788 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
789 attribute for artifical and nameless decls.
790 (dwarf2out_register_external_die): Add description attribute to
791 external reference die.
792 (add_desc_attribute): New functions.
793 (gen_subprogram_die): Add description attribute to
794 DW_TAG_call_site_parameter.
795 * tree-pretty-print.c (print_generic_expr_to_str): New function.
796 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
797 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
798 -gno-describe-dies.
799 (@item -gdescribe-dies): Add.
800
801 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
802
803 * tree-vrp.c (vrp_shift_undefined_p): Remove.
804 (extract_range_from_binary_expr_1: Call
805 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
806 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
807 depend on sign.
808
809 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
810
811 * gimple-ssa-warn-alloca.c
812 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
813 field for ALLOCA_BOUND_*_LARGE.
814
815 2018-09-11 Nathan Sidwell <nathan@acm.org>
816
817 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
818
819 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
820
821 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
822 for clobbers. Remove obsolete comment.
823
824 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
825
826 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
827 mpxchk, mpxld and mpxst types.
828 (define_attr length_immediate): Remove all processing of mpx types.
829 (define_attr prefix_0f): Ditto.
830 (define_attr memory): Ditto.
831
832 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
833
834 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
835 (log<mode>2): Change operand 1 predicate to general_operand.
836 Extend operand 1 to XFmode and generate logxf3 insn.
837 (log10<mode>2): Change operand 1 predicate to general_operand.
838 Extend operand 1 to XFmode and generate log10xf3 insn.
839 (log2<mode>2): Change operand 1 predicate to general_operand.
840 Extend operand 1 to XFmode and generate log2xf3 insn.
841 (fyl2xp1_extend<mode>xf3_i387): Remove.
842 (log1p<mode>2): Change operand 1 predicate to general_operand.
843 Extend operand 1 to XFmode and generate log1pxf3 insn.
844 (fxtract_extend<mode>xf3_i387): Remove.
845 (logb<mode>2): Change operand 1 predicate to general_operand.
846 Extend operand 1 to XFmode and generate logbxf3 insn.
847 (ilogb<mode>2): Change operand 1 predicate to general_operand.
848 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
849 (significand<mode>2): Change operand 1 predicate to general_operand.
850 Extend operand 1 to XFmode and generate significandxf3 insn.
851
852 2018-09-11 Nathan Sidwell <nathan@acm.org>
853
854 * gcc.c (perror_with_name, pfatal_with_name): Delete.
855 (load_specs): Use fatal_error.
856 (DELETE_IF_ORDINARY, process_command): Use error.
857 (execute, run_attempt): Use fatal_error.
858
859 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
860
861 * diagnostic-core.h (sorry_at): New prototype.
862 * diagnostic.c (sorry_at): New function.
863
864 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
865
866 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
867 by zero as VR_UNDEFINED.
868
869 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
870
871 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
872 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
873 (<sincos>mode2): New expander.
874 (sincos_extend<mode>xf3_i387): Remove insn pattern.
875 (sincos -> sin, cos splitters): Remove splitter patterns.
876 (sincos<mode>3): Change operand 2 predicate to general_operand.
877 Extend operand 2 to XFmode and generate sincosxf3 insn.
878 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
879 Change operand 3 predicate to const1_operand.
880 (fptan_extend<mode>xf4_i387): Remove insn pattern.
881 (tanxf2): Update operands in the call to fptanxf4_i387.
882 (tan<mode>2): Change operand 1 predicate to general_operand.
883 Extend operand 1 to XFmode and generate tanxf3 insn.
884 (atan2xf3): Rename from *fpatanxf3_i387.
885 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
886 (atan2xf3): Remove expander.
887 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
888 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
889 (atan<mode>2): Change operand 1 predicate to general_operand.
890 Extend operand 1 to XFmode and generate atanxf3 insn.
891
892 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
893
894 * config/i386/i386.md (x87/SSE constant load splitter): Use
895 memory_operand instead of nonimmediate_operand for input operand
896 predicate.
897
898 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
899
900 * config/i386/i386.md (float partial SSE register stall splitter): Move
901 splitter near its instruction pattern.
902 (float_extend partial SSE register stall splitter): Ditto.
903 (float_truncate partial SSE register stall splitter): Ditto.
904
905 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
906
907 PR target/86794
908 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
909 to speculation_safe_value_not_needed.
910
911 PR target/85666
912 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
913 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
914 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
915 leaf_function_p, instead use has_hard_reg_initial_val.
916
917 2018-09-09 Nathan Sidwell <nathan@acm.org>
918
919 * gcc.h (pfatal_with_name): Don't declare here.
920 * gcc.c (pfatal_with_name): Make static.
921
922 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
923
924 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
925 earlyclobber.
926
927 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
928
929 PR rtl-optimization/85458
930 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
931 priority hook to reduce the priority of EXPR.
932
933 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
934
935 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
936 DImode for x87 on 32bit targets. Conditionally disable x87 modes
937 with X87_ENABLE_FLOAT. Remove preparation code.
938 (*float<SWI48:mode><MODEF:mode>2): Rename from
939 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
940 math using "enabled" attribute.
941 (*floatdi<MODEF:mode>2_i387): Rename from
942 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
943 enable for 32bit targets only.
944 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
945 splitter.
946 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
947 as operand 1 predicate. Rewrite as define_insn_and_split.
948 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
949
950 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
951
952 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
953 to fallthru to FLOAT case.
954
955 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
956
957 PR target/86731
958 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
959 around folding of vec_sl to handle out of range shift values.
960
961 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
962
963 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
964 Update callers to gen_fix_trunc<mode>_i387_fisttp
965 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
966 nonimmediate_operand.
967 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
968 and corresponding splitters.
969 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
970 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
971 (fix_truncdi_i387_with_temp): Remove insn pattern
972 and corresponding splitters.
973 (fix_trunc<mode>_i387): Change operand 0 predicate to
974 nonimmediate_operand.
975 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
976 and corresponding splitters.
977 (*fistdi2_1): Remove.
978 (fistdi2): Ditto.
979 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
980 (lrintxfdi2): Remove expander. Reimplement as define_insn.
981 (*fist<mode>2_1): Remove.
982 (fist<mode>2): Ditto.
983 (fist<mode>2_with_temp): Remove insn pattern and corresponding
984 splitters.
985 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
986 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
987 (fistdi2_<rounding>): Change operand 0 predicate to
988 nonimmediate_operand.
989 (fistdi2_<rounding>_with_temp): Remove insn pattern
990 and corresponding splitters.
991 (fist<mode>2_<rounding>): Change operand 0 predicate to
992 nonimmediate_operand.
993 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
994 and corresponding splitters.
995
996 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
997
998 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
999
1000 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
1001 the init value.
1002
1003 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1004
1005 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
1006 early gimple folding of vec_splat().
1007 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
1008 * gimple-fold.h: Add an extern define for tree_vec_extract().
1009
1010 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
1011
1012 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
1013 wrappers around TREE_TYPE comparisons.
1014
1015 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1016
1017 PR target/80080
1018 * config/s390/predicates.md: Add nonsym_memory_operand.
1019 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
1020 contains a SYMBOL_REF, load it into an intermediate pseudo.
1021 (s390_emit_compare_and_swap): Legitimize operand.
1022 * config/s390/s390.md: Use the new nonsym_memory_operand
1023 with UNSPECV_CAS patterns.
1024
1025 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1026
1027 PR target/80080
1028 * config/s390/s390-passes.def: New file.
1029 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
1030 declaration.
1031 (make_pass_s390_early_mach): Add declaration.
1032 * config/s390/s390.c (make_pass_s390_early_mach):
1033 (s390_option_override): Remove dynamic registration.
1034 * config/s390/t-s390: Add s390-passes.def.
1035
1036 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
1037
1038 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1039 Remove UNSPEC_LTREL_BASE check.
1040 (annotate_constant_pool_refs): Likewise.
1041 (find_constant_pool_ref): Likewise.
1042 (find_ltrel_base): Removed.
1043 (replace_ltrel_base): Removed.
1044 (s390_mainpool_finish): Remove replace_ltrel_base call.
1045 (s390_chunkify_start): Remove pending LTREL_BASE logic.
1046 (s390_chunkify_finish): Remove replace_ltrel_base call.
1047 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
1048
1049 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
1050
1051 PR target/86779
1052 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1053 to speculation_safe_value_not_needed.
1054
1055 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
1056 Bernd Schmidt <bernds_cb1@t-online.de>
1057
1058 * config/nvptx/nvptx-opts.h: New file.
1059 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
1060 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
1061 (ASM_SPEC): Define.
1062 (TARGET_SM35): New macro.
1063 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
1064 correct predicate.
1065 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
1066 values.
1067 (misa=): New option.
1068 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
1069
1070 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
1071
1072 * config/i386/i386.md (truncdfsf2): Remove expander.
1073 (truncdfsf2_with_temp): Ditto.
1074 (truncxf<mode>2): Ditto.
1075 (*truncdfsf_fast_mixed): Remove insn pattern.
1076 (*truncdfsf_fast_i387): Ditto.
1077 (*truncdfsf_mixed): Ditto.
1078 (*truncdfsf_i387): Ditto.
1079 (*truncdfsf2_i387_1): Ditto.
1080 (*truncxfsf2_mixed): Ditto.
1081 (*truncxfdf2_mixed): Ditto.
1082 (*truncxf<mode>2_i387_noop): Ditto. Update callers
1083 to call gen_truncxf<mode>2 instead.
1084 (*truncxf<mode>2_i387): Remove.
1085 (reg->reg splitters): Remove splitter pattern.
1086 (reg->mem splitters): Ditto.
1087
1088 (truncdfsf2): New insn pattern.
1089 (truncxf<mode>2): Ditto.
1090
1091 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1092
1093 * tree-ssa-math-opts.c (is_mult_by): New function.
1094 (is_square_of): Use the above.
1095 (optimize_recip_sqrt): New function.
1096 (pass_cse_reciprocals::execute): Use the above.
1097
1098 2018-09-05 Richard Biener <rguenther@suse.de>
1099
1100 PR bootstrap/87134
1101 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
1102 to zero-init the emplaced vec.
1103
1104 2018-09-05 Martin Liska <mliska@suse.cz>
1105
1106 PR tree-optimization/87205
1107 * tree-switch-conversion.c (pass_lower_switch::execute):
1108 Group cases for switch statements.
1109
1110 2018-09-05 Richard Biener <rguenther@suse.de>
1111
1112 PR tree-optimization/87217
1113 * tree-ssa-sccvn.c (vuse_valueize): New.
1114 (vn_reference_lookup_pieces): Use it.
1115 (vn_reference_lookup): Likewise.
1116
1117 2018-09-05 Nathan Sidwell <nathan@acm.org>
1118
1119 PR c++/87137
1120 * stor-layout.c (place_field): Scan forwards to check last
1121 bitfield when ms_bitfield_placement is in effect.
1122
1123 2018-09-05 Richard Biener <rguenther@suse.de>
1124
1125 PR bootstrap/87225
1126 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
1127 return.
1128
1129 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
1130 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1131
1132 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
1133 * config.gcc (extra_objs): Build it.
1134 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
1135 Likewise.
1136 * config/aarch64/aarch64-passes.def
1137 (pass_tag_collision_avoidance): New pass.
1138 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
1139 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
1140 (aarch64_classify_address): Remove static qualifier.
1141 (aarch64_address_info, aarch64_address_type): Move to...
1142 * config/aarch64/aarch64-protos.h: ... here.
1143 (make_pass_tag_collision_avoidance): New function.
1144 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
1145 New tuning flag.
1146
1147 2018-09-05 Martin Liska <mliska@suse.cz>
1148
1149 * doc/gcov.texi: Update documentation of humar
1150 readable mode.
1151 * gcov.c (format_count): Print one decimal place, it provides
1152 more fine number of situations like '1G' vs. '1.4G'.
1153
1154 2018-09-05 Martin Liska <mliska@suse.cz>
1155
1156 PR target/87164
1157 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
1158 * optc-gen.awk: Allow 'Var' for Deprecated options in order
1159 to generate a MASK value.
1160
1161 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
1162
1163 PR debug/86593
1164 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
1165 if frame pointer isn't used.
1166 (compute_frame_pointer_to_fb_displacement): Likewise.
1167
1168 2018-09-04 Jakub Jelinek <jakub@redhat.com>
1169
1170 PR target/87198
1171 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
1172 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
1173 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
1174 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
1175 and OPTION_MASK_ISA_XSAVEC_UNSET.
1176
1177 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
1178
1179 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
1180 XOR operations in NAND case.
1181
1182 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1183
1184 * wide-int-range.cc (wide_int_range_convert): New.
1185 * wide-int-range.h (wide_int_range_convert): New.
1186 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
1187 code into wide_int_range_convert.
1188 (extract_range_into_wide_ints): Do not munge anti range constants
1189 into the entire domain. Just return the range back.
1190
1191 2018-09-04 Martin Liska <mliska@suse.cz>
1192
1193 * genmatch.c (output_line_directive): Add new argument
1194 fnargs.
1195 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
1196
1197 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1198
1199 * doc/invoke.texi (Option Summary): Add whitespace.
1200
1201 * doc/invoke.texi (Option Summary): Add -Waligned-new.
1202
1203 2018-09-04 Richard Biener <rguenther@suse.de>
1204
1205 PR tree-optimization/87211
1206 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
1207 backedge value we're supposed to treat as VARYING also number
1208 the PHI to VARYING in case it got a different value-number already.
1209
1210 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
1211
1212 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
1213 (extract_range_from_binary_expr_1): Do not call
1214 vrp_can_optimize_bit_op.
1215 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
1216 static.
1217 (wide_int_range_get_mask_and_bounds): New.
1218 (wide_int_range_optimize_bit_op): New.
1219 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
1220 (wide_int_range_bit_and): Same.
1221 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
1222 (wide_int_range_optimize_bit_op): New.
1223 (wide_int_range_get_mask_and_bounds): New.
1224
1225 2018-09-04 Richard Biener <rguenther@suse.de>
1226
1227 PR tree-optimization/87176
1228 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
1229 variable. When value-numbering a virtual PHI node make sure
1230 to not value-number to the backedge value.
1231
1232 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
1233
1234 * doc/extend.texi (Long Long, Hex Floats): Document support for
1235 long long and hex floats in more recent versions of ISO C++.
1236
1237 2018-09-03 Richard Biener <rguenther@suse.de>
1238
1239 PR tree-optimization/87177
1240 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
1241 cleanup.
1242
1243 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1244
1245 * bb-reorder.c (edge_order): Convert to C-qsort-style
1246 tri-state comparator.
1247 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
1248
1249 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1250
1251 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
1252 tri-state comparator.
1253 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
1254
1255 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1256
1257 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
1258 (mergesort): ... here as maximum count for using netsort.
1259 (gcc_qsort): Set nlim to 3 if stable sort is requested.
1260 (gcc_stablesort): New.
1261 * system.h (gcc_stablesort): Declare.
1262
1263 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
1264
1265 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
1266 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
1267 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
1268
1269 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
1270
1271 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
1272 lxsdx and stxsdx alternatives.
1273 (*mov<mode>_hardfloat64): Ditto.
1274 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
1275
1276 2018-09-03 Richard Biener <rguenther@suse.de>
1277
1278 PR tree-optimization/87200
1279 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
1280 simplify result.
1281
1282 2018-09-03 Martin Liska <mliska@suse.cz>
1283
1284 PR tree-optimization/87201
1285 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1286 Fix parenthesis in an expression.
1287
1288 2018-09-03 Richard Biener <rguenther@suse.de>
1289
1290 PR tree-optimization/87197
1291 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
1292 visited. CSE the VN_INFO hashtable lookup.
1293
1294 PR tree-optimization/87169
1295 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
1296 iterating make sure there's no extra backedges from irreducible
1297 regions feeding the header. Mark the destination block
1298 executable.
1299
1300 2018-09-03 Martin Liska <mliska@suse.cz>
1301
1302 PR driver/83193
1303 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
1304 * common/common-targhooks.c (default_get_valid_option_values):
1305 New function.
1306 * common/common-targhooks.h (default_get_valid_option_values):
1307 Likewise.
1308 * common/config/i386/i386-common.c: Move processor_target_table
1309 from i386.c.
1310 (ix86_get_valid_option_values): New function.
1311 (TARGET_GET_VALID_OPTION_VALUES): New macro.
1312 * config/i386/i386.c (struct ptt): Move to i386-common.c.
1313 (PTA_*): Move all defined masks into i386-common.c.
1314 (ix86_function_specific_restore): Use new processor_cost_table.
1315 * config/i386/i386.h (struct ptt): Moved from i386.c.
1316 (struct pta): Likewise.
1317 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
1318 * doc/tm.texi.in: Likewise.
1319 * opt-suggestions.c (option_proposer::suggest_option):
1320 Pass prefix to build_option_suggestions.
1321 (option_proposer::get_completions): Likewise.
1322 (option_proposer::build_option_suggestions): Use the new target
1323 hook.
1324 * opts.c (struct option_help_tuple): New struct.
1325 (print_filtered_help): Use the new target hook.
1326
1327 2018-09-03 Martin Liska <mliska@suse.cz>
1328
1329 PR middle-end/59521
1330 * predict.c (set_even_probabilities): Add likely_edges
1331 argument and handle cases where we have precisely one
1332 likely edge.
1333 (combine_predictions_for_bb): Catch also likely_edges.
1334 (tree_predict_by_opcode): Handle gswitch statements.
1335 * tree-cfg.h (find_case_label_for_value): New declaration.
1336 (find_taken_edge_switch_expr): Likewise.
1337 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
1338 Find pivot in decision tree based on probabily, not by number of
1339 nodes.
1340
1341 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
1342
1343 * doc/standards.texi (Standards): Update Objective-C reference.
1344
1345 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1346
1347 * doc/install.texi (Prerequisites): Update link for MPC.
1348
1349 2018-09-01 Michael Matz <matz@suse.de>
1350
1351 PR tree-optimization/87074
1352 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1353 PHIs for outer-loop uses.
1354
1355 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1356
1357 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1358 * doc/invoke.texi (C Dialect Options): Ditto.
1359
1360 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1361
1362 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1363
1364 2018-08-31 Richard Biener <rguenther@suse.de>
1365
1366 PR tree-optimization/87168
1367 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1368 (rpo_elim::eliminate_avail): When OP was not visited it must
1369 be available.
1370
1371 2018-08-31 David Malcolm <dmalcolm@redhat.com>
1372
1373 * tree-vrp.c (copy_value_range): Convert param "from" from
1374 "value_range *" to "const value_range *".
1375 (range_is_null): Likewise for param "vr".
1376 (range_int_cst_p): Likewise.
1377 (range_int_cst_singleton_p): Likewise.
1378 (symbolic_range_p): Likewise.
1379 (value_ranges_intersect_p): Likewise for both params.
1380 (value_range_nonnegative_p): Likewise for param "vr".
1381 (value_range_constant_singleton): Likewise.
1382 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1383 (extract_range_into_wide_ints): Likewise for param "vr".
1384 (extract_range_from_multiplicative_op): Likewise for params "vr0"
1385 and "vr1".
1386 (vrp_can_optimize_bit_op): Likewise.
1387 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1388 "vr1_".
1389 (extract_range_from_unary_expr): Likewise.
1390 (debug_value_range): Likewise for param "vr".
1391 (value_range::dump): Add "const" qualifier.
1392 (vrp_prop::check_array_ref): Convert local "vr" from
1393 "value_range *" to "const value_range *".
1394 (vrp_prop::check_mem_ref): Likewise.
1395 (vrp_prop::visit_stmt): Likewise for local "old_vr".
1396 (vrp_intersect_ranges_1): Likewise for param "vr_1".
1397 (vrp_intersect_ranges): Likewise.
1398 (simplify_stmt_for_jump_threading): Likewise for local "vr".
1399 (vrp_prop::vrp_finalize): Likewise.
1400 * tree-vrp.h (value_range::dump): Add "const" qualifier.
1401 (vrp_intersect_ranges): Add "const" qualifier to params as above.
1402 (extract_range_from_unary_expr): Likewise.
1403 (value_range_constant_singleton): Likewise.
1404 (symbolic_range_p): Likewise.
1405 (copy_value_range): Likewise.
1406 (extract_range_from_binary_expr_1): Likewise.
1407 (range_int_cst_p): Likewise.
1408 (vrp_set_zero_nonzero_bits): Likewise.
1409 (range_int_cst_singleton_p): Likewise.
1410
1411 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
1412
1413 * config/aarch64/arm_neon.h (vabsd_s64): New.
1414 (vnegd_s64): Likewise.
1415
1416 2018-08-31 Martin Jambor <mjambor@suse.cz>
1417
1418 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1419
1420 2018-08-31 Martin Liska <mliska@suse.cz>
1421
1422 * ipa-icf.c (sem_item::add_type): Use
1423 sem_item::m_type_hash_cache.
1424 * ipa-icf.h: Move the cache from sem_item_optimizer
1425 to sem_item.
1426
1427 2018-08-31 Nathan Sidwell <nathan@acm.org>
1428
1429 * doc/extend.texi (Backwards Compatibility): Remove implicit
1430 extern C leeway of () being (...).
1431
1432 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1433
1434 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1435
1436 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
1437
1438 PR target/86684
1439 PR target/87149
1440 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1441
1442 2018-08-31 Jakub Jelinek <jakub@redhat.com>
1443
1444 PR middle-end/87138
1445 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1446 gen_int_mode. Formatting fixes.
1447
1448 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
1449
1450 * target.def (custom_function_descriptors): Improve documentation.
1451 * doc/tm.texi.in (Trampolines): Expand discussion of function
1452 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1453 beginning of the section.
1454 * doc/tm.texi: Regenerated.
1455
1456 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
1457
1458 * cfg.h (class auto_edge_flag): Spell out the template-id of the
1459 base class in the initializer list. This is a workaround for
1460 building with older GCC.
1461 (class auto_bb_flag): Likewise.
1462
1463 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1464
1465 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1466 (altivec_vcmpequ<VI_char>_p): Remove star.
1467 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1468 vector load modes.
1469 (expand_strncmp_vec_sequence): New function.
1470 (emit_final_str_compare_vec): New function.
1471 (expand_strn_compare): Add support for vector strncmp.
1472 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1473 length specification to bytes.
1474 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1475 (vcmpnezb_p): New pattern.
1476 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1477 for option -mstring-compare-inline-limit.
1478
1479 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
1480
1481 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1482 (PTA_SKYLAKE): Add PTA_AES.
1483 (PTA_GOLDMONT): Likewise.
1484
1485 2018-08-29 Jan Hubicka <jh@suse.cz>
1486
1487 PR lto/86517
1488 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1489 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1490
1491 2018-08-29 Jan Hubicka <jh@suse.cz>
1492
1493 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1494 TYPE_STUB_DECL.
1495 (hash_tree): Do not visit TYPE_STUB_DECL.
1496 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1497 stream TYPE_STUB_DECL.
1498 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1499 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1500 after free_lang_data.
1501 (type_in_anonymous_namespace_p): Likewise.
1502
1503 2018-08-29 Jan Hubicka <jh@suse.cz>
1504
1505 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1506 comment that it has to be even number.
1507 (class sreal): Change m_sig type to int32_t.
1508 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1509 int64_t for temporary calculations.
1510 (sreal_verify_basics): Drop one bit from minimum and maximum.
1511
1512 2018-08-30 Richard Biener <rguenther@suse.de>
1513
1514 PR tree-optimization/87147
1515 * tree-ssa-sccvn.c (SSA_VISITED): New function.
1516 (visit_phi): When the degenerate result is from the backedge and
1517 we didn't visit its definition yet drop to VARYING.
1518 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1519
1520 2018-08-29 Jan Hubicka <jh@suse.cz>
1521
1522 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1523 DECL_VINDEX.
1524 (hash_tree): Likewise.
1525
1526 2018-08-29 Jan Hubicka <jh@suse.cz>
1527
1528 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1529 and TYPE_NEXT_REF_TO.
1530
1531 2018-08-29 Jan Hubicka <jh@suse.cz>
1532
1533 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1534 comment that it has to be even number.
1535 (class sreal): Change m_sig type to int32_t.
1536 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1537 int64_t for temporary calculations.
1538 (sreal_verify_basics): Drop one bit from minimum and maximum.
1539
1540 2018-08-30 Tamar Christina <tamar.christina@arm.com>
1541
1542 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1543
1544 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1545
1546 PR middle-end/86995
1547 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1548 if to_add is negative.
1549
1550 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1551
1552 PR middle-end/87053
1553 * builtins.c (c_strlen): Improve range checks.
1554
1555 2018-08-29 Martin Sebor <msebor@redhat.com>
1556 Jeff Law <law@redhat.com>
1557
1558 PR tree-optimization/86714
1559 PR tree-optimization/86711
1560 * builtins.c (c_strlen): Add arguments to call to string_constant.
1561 * expr.c (string_constant): Add argument. Detect missing nul
1562 terminator and outermost declaration it's missing in.
1563 * expr.h (string_constant): Add argument.
1564 * fold-const.c (read_from_constant_string): Add arguments to call to
1565 string_constant.
1566 (c_getstr): Likewise.
1567 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1568 to string_constant.
1569 * tree-ssa-strlen.c (get_stridx): Likewise.
1570
1571 2018-08-29 Jan Hubicka <jh@suse.cz>
1572
1573 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1574 Do not stream DECL_VINDEX.
1575 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1576 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1577 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1578
1579 2018-08-29 Richard Biener <rguenther@suse.de>
1580
1581 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1582 virtual operands that are not default defs to honor region
1583 boundaries.
1584 (rpo_vn_valueize): Remove ineffective code here.
1585
1586 2018-08-29 Richard Biener <rguenther@suse.de>
1587
1588 PR tree-optimization/87132
1589 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1590 when skipping defs reachable over backedges.
1591
1592 2018-08-29 Richard Biener <rguenther@suse.de>
1593
1594 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1595 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1596 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1597 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1598 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1599 (vn_reference_lookup_3): Remove use of const_parms.
1600 (free_rpo_vn): Do not free const_parms.
1601 (do_rpo_vn): Do not call init_const_parms.
1602 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1603 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1604 (call_may_clobber_ref_p_1): Likewise.
1605
1606 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1607
1608 PR other/86726
1609 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1610 (-O): Ditto.
1611 (-ftree-scev-cprop): Document.
1612
1613 2018-08-29 Jan Hubicka <jh@suse.cz>
1614
1615 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1616 parameters.
1617 (sreal constructor): Update.
1618 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1619 sreal:operator/): Update.
1620
1621 2018-08-29 Martin Liska <mliska@suse.cz>
1622
1623 * tree-switch-conversion.c (switch_conversion::expand):
1624 Strenghten assumption about gswitch statements.
1625
1626 2018-08-29 Richard Biener <rguenther@suse.de>
1627
1628 PR tree-optimization/87117
1629 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1630 re-value-number released SSA VDEFs.
1631
1632 2018-08-29 Richard Biener <rguenther@suse.de>
1633
1634 PR tree-optimization/87126
1635 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1636
1637 2018-08-28 Jim Wilson <jimw@sifive.com>
1638
1639 * config/riscv/pic.md: Rewrite.
1640 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1641 invalid address.
1642 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1643 (SOFTF, default_load, softload, softstore): New.
1644
1645 2018-08-28 Jeff Law <law@redhat.com>
1646
1647 * fold-const.c (fold_binary_loc): Remove recently added assert.
1648
1649 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1650
1651 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1652 to OP parmeter of generated function.
1653
1654 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1655
1656 PR tree-optimization/87009
1657 * match.pd: Add boolean optimizations.
1658
1659 2018-08-28 Martin Sebor <msebor@redhat.com>
1660
1661 PR middle-end/86631
1662 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1663 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1664 (pass_walloca::gate): Use it.
1665 (alloca_call_type): Same.
1666 (pass_walloca::execute): Same.
1667 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1668
1669 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1670
1671 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1672 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1673 >= 3005 to >= 9000.
1674
1675 2018-08-28 Richard Biener <rguenther@suse.de>
1676
1677 PR tree-optimization/87124
1678 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1679 constants before looking up avail.
1680
1681 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1682
1683 PR middle-end/87099
1684 * calls.c (maybe_warn_nonstring_arg): Punt early if
1685 warn_stringop_overflow is zero. Don't call get_range_strlen
1686 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1687 Swap comparison operands to have constants on rhs. Only use
1688 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1689 increment lenrng[0].
1690
1691 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1692
1693 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1694 use of tree_to_shwi. Remove duplicated test for the size being
1695 a whole number of bytes.
1696
1697 2018-08-28 Richard Biener <rguenther@suse.de>
1698
1699 PR tree-optimization/87117
1700 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1701 Handle removed stmt without LHS (GIMPLE_NOP).
1702
1703 2018-08-28 Richard Biener <rguenther@suse.de>
1704
1705 PR tree-optimization/87117
1706 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1707 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1708
1709 2018-08-28 Richard Biener <rguenther@suse.de>
1710
1711 PR tree-optimization/87117
1712 * tree-ssa-pre.c (compute_avail): Do not make expressions
1713 with predicated values available.
1714 (get_expr_value_id): Assert we do not run into predicated value
1715 expressions.
1716
1717 2018-08-28 Richard Biener <rguenther@suse.de>
1718
1719 PR tree-optimization/87117
1720 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1721 get virtual operands.
1722 (get_expr_operands): Handle STRING_CST like other decls.
1723
1724 2018-08-28 Martin Liska <mliska@suse.cz>
1725
1726 * tree.h: Update documentation of fndecl_built_in_p
1727 functions.
1728
1729
1730 2018-08-27 Jeff Law <law@redhat.com>
1731 PR tree-optimization/87110
1732 * tree-ssa-dse.c (compute_trims): Handle non-constant
1733 TYPE_SIZE_UNIT.
1734
1735 2018-08-27 Martin Sebor <msebor@redhat.com>
1736
1737 PR tree-optimization/86914
1738 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1739
1740 2018-08-27 Martin Sebor <msebor@redhat.com>
1741
1742 PR tree-optimization/87112
1743 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1744 the type of the bound argument.
1745
1746 2018-08-27 Jeff Law <law@redhat.com>
1747
1748 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1749 type does not have a TYPE_SIZE_UNIT.
1750
1751 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1752
1753 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1754 with include of backend.h.
1755
1756 2018-08-27 Richard Biener <rguenther@suse.de>
1757
1758 PR tree-optimization/86927
1759 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1760 use const cond reduction code.
1761
1762 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1763
1764 PR tree-optimization/85758
1765 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1766
1767 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1768
1769 PR c++/87091
1770 * diagnostic-show-locus.c (class layout_range): Update for
1771 conversion of show_caret_p to a tri-state.
1772 (layout_range::layout_range): Likewise.
1773 (make_range): Likewise.
1774 (layout::maybe_add_location_range): Likewise.
1775 (layout::should_print_annotation_line_p): Don't show annotation
1776 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1777 (layout::get_state_at_point): Update for conversion of
1778 show_caret_p to a tri-state. Bail out early for
1779 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1780 underlining or source colorization.
1781 (gcc_rich_location::add_location_if_nearby): Update for conversion
1782 of show_caret_p to a tri-state.
1783 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1784 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1785 Likewise.
1786 (selftest::test_one_liner_labels): Likewise.
1787 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1788 conversion of show_caret_p to a tri-state.
1789 * pretty-print.c (text_info::set_location): Likewise.
1790 * pretty-print.h (text_info::set_location): Likewise.
1791 * substring-locations.c (format_warning_n_va): Likewise.
1792 * tree-diagnostic.c (default_tree_printer): Likewise.
1793 * tree-pretty-print.c (newline_and_indent): Likewise.
1794
1795 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1796
1797 PR c++/87091
1798 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1799 line above for line-insertion fix-it hints.
1800 (selftest::test_fixit_insert_containing_newline): Update the
1801 expected results, and add a test with line-numbering enabled.
1802
1803 2018-08-27 Martin Liska <mliska@suse.cz>
1804
1805 PR sanitizer/86962
1806 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1807 params with DECL_HAS_VALUE_EXPR_P.
1808
1809 2018-08-27 Martin Liska <mliska@suse.cz>
1810
1811 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1812 selected expansion strategy.
1813
1814 2018-08-27 Martin Liska <mliska@suse.cz>
1815
1816 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1817 * builtins.c (is_builtin_fn): Likewise.
1818 * attribs.c (diag_attr_exclusions): Use new function
1819 fndecl_built_in_p and remove check for FUNCTION_DECL if
1820 possible.
1821 (builtin_mathfn_code): Likewise.
1822 (fold_builtin_expect): Likewise.
1823 (fold_call_expr): Likewise.
1824 (fold_builtin_call_array): Likewise.
1825 (fold_call_stmt): Likewise.
1826 (set_builtin_user_assembler_name): Likewise.
1827 (is_simple_builtin): Likewise.
1828 * calls.c (gimple_alloca_call_p): Likewise.
1829 (maybe_warn_nonstring_arg): Likewise.
1830 * cfgexpand.c (expand_call_stmt): Likewise.
1831 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1832 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1833 (cgraph_node::verify_node): Likewise.
1834 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1835 (cgraph_node::create_clone): Likewise.
1836 * config/arm/arm.c (arm_insert_attributes): Likewise.
1837 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1838 * dse.c (scan_insn): Likewise.
1839 * expr.c (expand_expr_real_1): Likewise.
1840 * fold-const.c (operand_equal_p): Likewise.
1841 (fold_binary_loc): Likewise.
1842 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1843 * gimple-low.c (lower_stmt): Likewise.
1844 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1845 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1846 * gimple.c (gimple_build_call_from_tree): Likewise.
1847 (gimple_call_builtin_p): Likewise.
1848 (gimple_call_combined_fn): Likewise.
1849 * gimplify.c (gimplify_call_expr): Likewise.
1850 (gimple_boolify): Likewise.
1851 (gimplify_modify_expr): Likewise.
1852 (gimplify_addr_expr): Likewise.
1853 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1854 * ipa-cp.c (determine_versionability): Likewise.
1855 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1856 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1857 * ipa-split.c (visit_bb): Likewise.
1858 (split_function): Likewise.
1859 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1860 * lto-cgraph.c (input_node): Likewise.
1861 * lto-streamer-out.c (write_symbol): Likewise.
1862 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1863 (lower_omp_1): Likewise.
1864 * predict.c (strip_predict_hints): Likewise.
1865 * print-tree.c (print_node): Likewise.
1866 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1867 * trans-mem.c (is_tm_irrevocable): Likewise.
1868 (is_tm_load): Likewise.
1869 (is_tm_simple_load): Likewise.
1870 (is_tm_store): Likewise.
1871 (is_tm_simple_store): Likewise.
1872 (is_tm_abort): Likewise.
1873 (tm_region_init_1): Likewise.
1874 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1875 * tree-cfg.c (verify_gimple_call): Likewise.
1876 (move_stmt_r): Likewise.
1877 (stmt_can_terminate_bb_p): Likewise.
1878 * tree-eh.c (lower_eh_constructs_2): Likewise.
1879 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1880 * tree-inline.c (remap_gimple_stmt): Likewise.
1881 (copy_bb): Likewise.
1882 (estimate_num_insns): Likewise.
1883 (fold_marked_statements): Likewise.
1884 * tree-sra.c (scan_function): Likewise.
1885 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1886 (optimize_stack_restore): Likewise.
1887 (pass_fold_builtins::execute): Likewise.
1888 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1889 (mark_all_reaching_defs_necessary_1): Likewise.
1890 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1891 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1892 (pass_forwprop::execute): Likewise.
1893 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1894 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1895 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1896 * tree-ssa-strlen.c (get_string_length): Likewise.
1897 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1898 (find_func_aliases_for_call): Likewise.
1899 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1900 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1901 * tree-tailcall.c (find_tail_calls): Likewise.
1902 * tree.c (need_assembler_name_p): Likewise.
1903 (free_lang_data_in_decl): Likewise.
1904 (get_call_combined_fn): Likewise.
1905 * ubsan.c (is_ubsan_builtin_p): Likewise.
1906 * varasm.c (incorporeal_function_p): Likewise.
1907 * tree.h (DECL_BUILT_IN): Remove and replace with
1908 fndecl_built_in_p.
1909 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1910 (fndecl_built_in_p): New.
1911
1912 2018-08-27 Martin Liska <mliska@suse.cz>
1913
1914 PR tree-optimization/86847
1915 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1916 Dump also subtree probability.
1917 (switch_decision_tree::do_jump_if_equal): New function.
1918 (switch_decision_tree::emit_case_nodes): Handle special
1919 situations in balanced tree that can be emitted much simpler.
1920 Fix calculation of probabilities that happen in tree expansion.
1921 * tree-switch-conversion.h (struct cluster): Add
1922 is_single_value_p.
1923 (struct simple_cluster): Likewise.
1924 (struct case_tree_node): Add new function has_child.
1925 (do_jump_if_equal): New.
1926
1927 2018-08-27 Martin Liska <mliska@suse.cz>
1928
1929 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1930 Add new argument to bit_test_cluster constructor.
1931 (bit_test_cluster::emit): Set bits really number of values
1932 handlel by a test.
1933 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1934 probability argument.
1935 * tree-switch-conversion.h (struct bit_test_cluster):
1936 Add m_handles_entire_switch.
1937
1938 2018-08-27 Martin Liska <mliska@suse.cz>
1939
1940 PR tree-optimization/86702
1941 * tree-switch-conversion.c (jump_table_cluster::emit):
1942 Make probabilities even for values in jump table
1943 according to number of cases handled.
1944 (switch_decision_tree::compute_cases_per_edge): Pass
1945 argument to reset_out_edges_aux function.
1946 (switch_decision_tree::analyze_switch_statement): Likewise.
1947 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1948 Make it static.
1949
1950 2018-08-27 Martin Liska <mliska@suse.cz>
1951
1952 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1953 cfun argument explicitly.
1954 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1955 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1956 function gimple_switch_default_bb.
1957 (convert_switch_statements):
1958 (expand_builtins):
1959 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1960 * stmt.c (label_to_block_fn): Use label_to_block and pass
1961 cfun argument explicitly and use gimple_switch_label_bb.
1962 (expand_case): Likewise.
1963 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1964 cfun argument explicitly. Likewise.
1965 (make_edges_bb): Likewise.
1966 (make_cond_expr_edges): Likewise.
1967 (get_cases_for_edge): Likewise.
1968 (make_gimple_switch_edges): Likewise.
1969 (label_to_block_fn): Likewise.
1970 (label_to_block): Likewise.
1971 (make_goto_expr_edges): Likewise.
1972 (make_gimple_asm_edges): Likewise.
1973 (main_block_label): Likewise.
1974 (group_case_labels_stmt): Likewise.
1975 (find_taken_edge_computed_goto): Likewise.
1976 (find_taken_edge_switch_expr): Likewise.
1977 (gimple_verify_flow_info): Likewise.
1978 (gimple_redirect_edge_and_branch): Likewise.
1979 (gimple_switch_label_bb): New function.
1980 (gimple_switch_default_bb): Likewise.
1981 (gimple_switch_edge): Likewise.
1982 (gimple_switch_default_edge): Likewise.
1983 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1984 (label_to_block): ... with this.
1985 (gimple_switch_label_bb): New.
1986 (gimple_switch_default_bb): Likewise.
1987 (gimple_switch_edge): Likewise.
1988 (gimple_switch_default_edge): Likewise.
1989 * tree-cfgcleanup.c (convert_single_case_switch): Use
1990 new gimple functions and pass new argument to label_to_block.
1991 (cleanup_control_flow_bb):
1992 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1993 cfun argument explicitly.
1994 (make_eh_edges): Likewise.
1995 (redirect_eh_dispatch_edge): Likewise.
1996 (lower_resx): Likewise.
1997 (lower_eh_dispatch): Likewise.
1998 (maybe_remove_unreachable_handlers): Likewise.
1999 (unsplit_eh): Likewise.
2000 (cleanup_empty_eh): Likewise.
2001 (verify_eh_edges): Likewise.
2002 (verify_eh_dispatch_edge): Likewise.
2003 * tree-ssa-dom.c (record_edge_info): Likewise.
2004 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
2005 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
2006 (thread_through_normal_block): Likewise.
2007 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
2008 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
2009 * tree-switch-conversion.c (switch_conversion::collect): Use new
2010 gimple functions.
2011 (switch_conversion::check_final_bb): Likewise.
2012 (switch_conversion::gather_default_values): Pass new argument
2013 to label_to_block.
2014 (switch_conversion::build_constructors): Likewise.
2015 (switch_decision_tree::compute_cases_per_edge): Use new
2016 gimple_switch_edge function.
2017 (switch_decision_tree::analyze_switch_statement): Pass new argument
2018 to label_to_block.
2019 (switch_decision_tree::try_switch_expansion): Use
2020 gimple_switch_default_edge.
2021 * tree-vrp.c (find_switch_asserts): Pass new argument
2022 to label_to_block.
2023 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
2024 (vr_values::simplify_switch_using_ranges): Likewise.
2025
2026 2018-08-27 Richard Biener <rguenther@suse.de>
2027
2028 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
2029 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
2030
2031 * tree-ssa-sccvn.h (struct vn_pval): New structure.
2032 (struct vn_nary_op_s): Add unwind_to member. Add
2033 predicated_values flag and put result into a union together
2034 with a linked list of vn_pval.
2035 (struct vn_ssa_aux): Add name member to make maintaining
2036 a map of SSA name to vn_ssa_aux possible. Remove no longer
2037 needed info, dfsnum, low, visited, on_sccstack, use_processed
2038 and range_info_anti_range_p members.
2039 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
2040 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
2041 New functions.
2042 (vn_valueize): New global.
2043 (vn_context_bb): Likewise.
2044 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
2045 VN_INFO_PTR_INFO): Remove.
2046 * tree-ssa-sccvn.c: ... (rewrite)
2047 (pass_fre::execute): For -O2+ initialize loops and run
2048 RPO VN in optimistic mode (iterating). For -O1 and -Og
2049 run RPO VN in non-optimistic mode.
2050 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
2051 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
2052 * doc/invoke.texi (sccvn-max-scc-size): Remove.
2053 (rpo-vn-max-loop-depth): Document.
2054 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
2055 when valuezing the VUSE signals we walked out of the region.
2056 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
2057 (phi_translate): Set VN context block to use for availability
2058 lookup.
2059 (compute_avail): Likewise.
2060 (pre_valueize): New function.
2061 (pass_pre::execute): Adjust to the RPO VN API.
2062
2063 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
2064 (propagate_constants_for_unrolling): Remove.
2065 (tree_unroll_loops_completely): Perform value-numbering
2066 on the unrolled bodies loop parent.
2067
2068 2018-08-27 Richard Biener <rguenther@suse.de>
2069
2070 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
2071 for partial antic compute.
2072
2073 2018-08-27 Jakub Jelinek <jakub@redhat.com>
2074
2075 PR rtl-optimization/87065
2076 * combine.c (simplify_if_then_else): Formatting fix.
2077 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
2078 check.
2079 (known_cond): Don't return const_true_rtx for vector modes. Use
2080 CONST0_RTX instead of const0_rtx. Formatting fixes.
2081
2082 2018-08-27 Martin Liska <mliska@suse.cz>
2083
2084 PR gcov-profile/87069
2085 * gcov.c (process_file): Record files already processed
2086 and warn about a file being processed multiple times.
2087
2088 2018-08-27 Martin Liska <mliska@suse.cz>
2089
2090 PR driver/83193
2091 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2092 Set default values for x_aarch64_*_string strings.
2093 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
2094 prefix. For -mabi do not print '=ABI' in help and use
2095 <option_value> format for -msve-vector-bits and -moverride
2096 options.
2097
2098 2018-08-26 Jeff Law <law@redhat.com>
2099
2100 * config/mips/frame-header-opt.c: Include "backend.h" rather than
2101 "cfg.h"
2102
2103 2018-08-26 Marek Polacek <polacek@redhat.com>
2104
2105 PR c++/87029, Implement -Wredundant-move.
2106 * doc/invoke.texi: Document -Wredundant-move.
2107
2108 2018-08-25 Martin Sebor <msebor@redhat.com>
2109
2110 PR tree-optimization/87059
2111 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
2112 to the same type as the other.
2113 * fold-const.c (fold_binary_loc): Assert expectation.
2114
2115 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
2116
2117 * config/darwin.c (machopic_legitimize_pic_address): Clean up
2118 extraneous parentheses, dead code section and formatting.
2119
2120 2018-08-24 David Malcolm <dmalcolm@redhat.com>
2121
2122 PR c++/87091
2123 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
2124 wide enough for jumps in the line-numbering to be visible.
2125 (layout::print_gap_in_line_numbering): New member function.
2126 (layout::calculate_line_spans): When using line numbering, merge
2127 line spans that are only 1 line apart.
2128 (diagnostic_show_locus): When printing line numbers, show gaps in
2129 line numbering directly, rather than printing headers.
2130 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
2131 line-numbering with multiple line spans.
2132 (selftest::test_fixit_insert_containing_newline_2): Add test of
2133 line-numbering, in which the spans are close enough to be merged.
2134
2135 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2136
2137 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
2138 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
2139 * tree-vrp.c (range_is_nonnull): Remove.
2140 (range_includes_zero_p): Accept value_range instead of min/max.
2141 (extract_range_from_binary_expr_1): Do not early bail on
2142 POINTER_PLUS_EXPR.
2143 Use range_includes_zero_p instead of range_is_nonnull.
2144 (extract_range_from_unary_expr): Use range_includes_zero_p instead
2145 of range_is_nonnull.
2146 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
2147 special case VR_ANTI_RANGE.
2148 (vrp_finalize): Same.
2149 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
2150 instead of min/max.
2151 (range_is_nonnull): Remove.
2152 * vr-values.c (vrp_stmt_computes_nonzero): Use
2153 range_includes_zero_p instead of range_is_nonnull.
2154 (extract_range_basic): Pass value_range to range_includes_zero_p
2155 instead of range_is_nonnull.
2156
2157 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
2158
2159 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
2160 * emit-rtl.h (rtl_data): Remove return_bnd.
2161 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
2162 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
2163 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
2164 (POINTER_BOUNDS_MODE): Remove definition.
2165 (make_pointer_bounds_mode): Remove.
2166 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
2167 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
2168 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
2169 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
2170 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
2171 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
2172 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
2173
2174 * config/i386/i386-modes.def (BND32, BND64): Remove.
2175 * config/i386/i386.c (dbx_register_map): Remove bound registers.
2176 (dbx64_register_map): Ditto.
2177 (svr4_dbx_register_map): Ditto.
2178 (indirect_thunk_bnd_needed): Remove.
2179 (indirect_thunks_bnd_used): Ditto.
2180 (indirect_return_bnd_needed): Ditto.
2181 (indirect_return_via_cx_bnd): Ditto.
2182 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
2183 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
2184 (output_indirect_thunk): Ditto. Remove need_prefix argument.
2185 (output_indirect_thunk_function): Remove handling of
2186 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
2187 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
2188 (ix86_save_reg): Remove handling of crtl->return_bnd.
2189 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
2190 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
2191 and UNSPEC_BNDLX_ADDR.
2192 (ix86_output_indirect_branch_via_reg): Remove handling of
2193 indirect_thunk_prefix_bnd.
2194 (ix86_output_indirect_branch_via_push): Ditto.
2195 (ix86_output_function_return): Ditto.
2196 (ix86_output_indirect_function_return): Ditto.
2197 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
2198 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
2199 (CALL_USED_REGISTERS): Ditto.
2200 (REG_ALLOC_ORDER): Update for removal of bound registers.
2201 (HI_REGISTER_NAMES): Ditto.
2202 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
2203 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
2204 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
2205 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
2206 (FIRST_PSEUDO_REG): Update.
2207 (BND): Remove mode iterator.
2208 * config/i386/predicates.md (bnd_mem_operator): Remove.
2209
2210 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2211
2212 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
2213 vectors.
2214
2215 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
2216
2217 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
2218 the case in which the permute needs only a single element and
2219 repeats for every vector of the result. Extend that case to
2220 handle variable-length vectors.
2221 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2222
2223 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
2224
2225 PR debug/79342
2226 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
2227 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2228
2229 2018-08-24 Richard Biener <rguenther@suse.de>
2230
2231 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
2232 bb_flags_allocated members.
2233 (auto_flag): New RAII class for allocating flags.
2234 (auto_edge_flag): New RAII class for allocating edge flags.
2235 (auto_bb_flag): New RAII class for allocating bb flags.
2236 * cfgloop.c (verify_loop_structure): Allocate temporary edge
2237 flag dynamically.
2238 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
2239 in favor of temporarily allocated BB flag.
2240 * hsa-brig.c: Re-order includes.
2241 * hsa-dump.c: Likewise.
2242 * hsa-regalloc.c: Likewise.
2243 * print-rtl.c: Likewise.
2244 * profile-count.c: Likewise.
2245
2246 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
2247
2248 PR target/86989
2249 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2250 the TOC register.
2251
2252 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
2253
2254 PR 87073/bootstrap
2255 * wide-int-range.cc (wide_int_range_div): Do not ignore result
2256 from wide_int_range_multiplicative_op.
2257
2258 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2259
2260 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
2261 "permutaion".
2262
2263 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
2264
2265 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
2266 to 'expanded'.
2267
2268 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
2269
2270 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
2271 full GENERIC expression used for replacement.
2272
2273 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
2274
2275 * tree-vrp.c (abs_extent_range): Remove.
2276 (extract_range_into_wide_ints): Pass wide ints by reference.
2277 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
2278 Pass wide ints by reference in all calls to
2279 extract_range_into_wide_ints.
2280 * wide-int-range.cc (wide_int_range_div): New.
2281 * wide-int-range.h (wide_int_range_div): New.
2282 (wide_int_range_includes_zero_p): New.
2283 (wide_int_range_zero_p): New.
2284
2285 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
2286
2287 * config/aarch64/aarch64.md (arches): New enum.
2288 (arch): New enum attr.
2289 (arch_enabled): New attr.
2290 (enabled): Now uses arch_enabled only.
2291 (simd, sve, fp16): Removed attribute.
2292 (fp): Attr now defined in terms of 'arch'.
2293 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
2294 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
2295 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
2296 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
2297 attributes into 'arch'.
2298 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
2299 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
2300 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
2301 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
2302 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
2303 'simd' attribute into 'arch'.
2304 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
2305 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
2306 Convert use of 'fp' attribute to 'arch'.
2307 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
2308 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
2309 into 'arch'.
2310 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
2311 (different modes) Merge 'fp' and 'simd' into 'arch'.
2312 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
2313 'simd' into 'arch'.
2314
2315 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
2316
2317 PR rtl-optimization/87026
2318 * expmed.c (canonicalize_comparison): If we can no longer create
2319 pseudoregisters, don't.
2320
2321 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
2322
2323 PR target/86951
2324 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
2325 prototype.
2326 * config/arm/arm.c (speculation_barrier_libfunc): New static
2327 variable.
2328 (arm_init_libfuncs): Initialize it.
2329 (arm_emit_speculation_barrier): New function.
2330 * config/arm/arm.md (speculation_barrier): Call
2331 arm_emit_speculation_barrier for architectures that do not have
2332 DSB or ISB.
2333 (speculation_barrier_insn): Only match on Armv7 or later.
2334
2335 2018-08-23 Richard Biener <rguenther@suse.de>
2336
2337 PR middle-end/87024
2338 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2339 calls.
2340
2341 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2342
2343 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2344 of single-vector TBLs.
2345 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2346 one input is given.
2347
2348 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2349
2350 PR target/85910
2351 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2352 aarch64_evpc_tbl guard.
2353
2354 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
2355
2356 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2357 behaviour.
2358
2359 2018-08-22 Martin Sebor <msebor@redhat.com>
2360
2361 PR middle-end/87052
2362 * tree-pretty-print.c (pretty_print_string): Add argument.
2363 (dump_generic_node): Call to pretty_print_string with string size.
2364
2365 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
2366
2367 PR rtl-optimization/86771
2368 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2369 of two SETs into those two SETs, one to be placed at i2, if that SETs
2370 destination is modified between i2 and i3.
2371
2372 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2373
2374 PR tree-optimization/86725
2375 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2376 function.
2377 (vect_analyze_scalar_cycles_1): Check it.
2378
2379 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2380
2381 PR tree-optimization/86725
2382 * tree-vect-loop.c (vect_is_simple_reduction): When treating
2383 an outer loop phi as a double reduction, make sure that the
2384 single user of the phi result is an inner loop phi.
2385
2386 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2387
2388 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2389 grouped stores with gaps to a strided group.
2390
2391 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2392
2393 * tree-vect-stmts.c (get_group_load_store_type)
2394 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2395 first statement in a group.
2396
2397 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2398
2399 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2400 the sequence used in gcc/gcc.c.
2401
2402 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2403
2404 PR other/704
2405 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2406 building it.
2407
2408 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2409
2410 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2411 Darwin10-specific unwinder-shim.
2412 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2413 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
2414 New to cater for Darwin10 Rosetta.
2415
2416 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2417
2418 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2419 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2420
2421 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2422
2423 PR bootstrap/81033
2424 PR target/81733
2425 PR target/52795
2426 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2427 (dwarf2out_switch_text_section): Generate a local label for the
2428 second function sub-section and apply it as the second FDE start
2429 label.
2430 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2431 second sub-section start.
2432
2433 2018-08-22 Richard Biener <rguenther@suse.de>
2434
2435 PR tree-optimization/86988
2436 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2437
2438 2018-08-22 Richard Biener <rguenther@suse.de>
2439
2440 PR tree-optimization/86945
2441 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2442
2443 2018-08-22 Alexandre Oliva <oliva@adacore.com>
2444
2445 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2446 a comment about how uses of r2 for .sdata2 come about.
2447
2448 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
2449
2450 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2451
2452 2018-08-21 Marek Polacek <polacek@redhat.com>
2453
2454 PR c++/86981, Implement -Wpessimizing-move.
2455 * doc/invoke.texi: Document -Wpessimizing-move.
2456
2457 2018-08-21 Jan Hubicka <jh@suse.cz>
2458
2459 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2460 * tree.h (is_redundant_typedef): Remove.
2461 * dwarf2out.c (is_redundant_typedef): Turn into static function.
2462
2463 2018-08-21 Jan Hubicka <jh@suse.cz>
2464
2465 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2466 when possible.
2467
2468 2018-08-21 Tamar Christina <tamar.christina@arm.com>
2469
2470 * expmed.c (extract_low_bits): Reject invalid subregs early.
2471
2472 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2473
2474 PR middle-end/86121
2475 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2476 behaviour.
2477
2478 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2479
2480 * config/vxworks.h: Guard vxworks_asm_out_constructor and
2481 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2482 * config/vxworks.c: Likewise.
2483
2484 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2485
2486 * config/vxworks.c: Set targetm.have_ctors_dtors
2487 if HAVE_INITFINI_ARRAY_SUPPORT.
2488 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2489 if HAVE_INITFINI_ARRAY_SUPPORT.
2490
2491 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2492
2493 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2494 default search path for VxWorks < 7.
2495
2496 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2497
2498 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2499 (get_format_string): Refer to c_getstr.
2500
2501 2018-08-21 Tom de Vries <tdevries@suse.de>
2502
2503 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2504 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2505 (debuginfo_early_stop): Declare.
2506 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2507 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2508 (debuginfo_early_stop): New function.
2509 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2510 and debuginfo_early_stop.
2511 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2512 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2513 (general_init): Call debuginfo_early_init.
2514 (finalize): Call debuginfo_fini.
2515 (do_compile): Call debuginfo_init.
2516 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2517 -fdump-early-debug.
2518 (@item -fdump-debug, @item -fdump-earlydebug): Add.
2519
2520 2018-08-21 Tom de Vries <tdevries@suse.de>
2521
2522 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2523 flag_dump_noaddr and flag_dump_unnumbered.
2524
2525 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
2526
2527 * wide-int-range.cc (wide_int_range_abs): New.
2528 (wide_int_range_order_set): Rename from wide_int_range_min_max.
2529 * wide-int-range.h (wide_int_range_abs): New.
2530 (wide_int_range_min_max): New.
2531 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2532 case to call wide_int_range_abs.
2533 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2534 (extract_range_from_abs_expr): Delete.
2535
2536 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2537
2538 PR target/87033
2539 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2540 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2541 for indexed loads.
2542
2543 2018-08-20 Nathan Sidwell <nathan@acm.org>
2544 Jeff Law <law@redhat.com>
2545
2546 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2547 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2548
2549 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2550
2551 PR other/84889
2552 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2553 (decl_attributes): Likewise.
2554 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2555 instance.
2556 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2557 * diagnostic-core.h (class auto_diagnostic_group): New class.
2558 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2559 (diagnostic_report_diagnostic): Handle the first diagnostics within
2560 a group.
2561 (emit_diagnostic): Add auto_diagnostic_group instance.
2562 (inform): Likewise.
2563 (inform_n): Likewise.
2564 (warning): Likewise.
2565 (warning_at): Likewise.
2566 (warning_n): Likewise.
2567 (pedwarn): Likewise.
2568 (permerror): Likewise.
2569 (error): Likewise.
2570 (error_n): Likewise.
2571 (error_at): Likewise.
2572 (sorry): Likewise.
2573 (fatal_error): Likewise.
2574 (internal_error): Likewise.
2575 (internal_error_no_backtrace): Likewise.
2576 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2577 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2578 * diagnostic.h (struct diagnostic_context): Add fields
2579 "diagnostic_group_nesting_depth",
2580 "diagnostic_group_emission_count", "begin_group_cb",
2581 "end_group_cb".
2582 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2583 Add auto_diagnostic_group instance(s).
2584 (find_explicit_erroneous_behavior): Likewise.
2585 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2586 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2587 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2588 (gimplify_va_arg_expr): Likewise.
2589 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2590 (HSA_SORRY_AT): Likewise.
2591 * ipa-devirt.c (compare_virtual_tables): Likewise.
2592 (warn_odr): Likewise.
2593 * multiple_target.c (expand_target_clones): Likewise.
2594 * opts-common.c (cmdline_handle_error): Likewise.
2595 * reginfo.c (globalize_reg): Likewise.
2596 * substring-locations.c (format_warning_n_va): Likewise.
2597 * tree-inline.c (expand_call_inline): Likewise.
2598 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2599 * tree-ssa-loop-niter.c
2600 (do_warn_aggressive_loop_optimizations): Likewise.
2601 * tree-ssa-uninit.c (warn_uninit): Likewise.
2602 * tree.c (warn_deprecated_use): Likewise.
2603
2604 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2605
2606 PR target/87014
2607 * config/i386/i386.md (eh_return): Always update EH return
2608 address in word_mode.
2609
2610 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2611
2612 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2613 TARGET_SPLIT_COMPLEX_ARG is defined.
2614
2615 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2616
2617 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2618
2619 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2620
2621 PR target/86984
2622 * expr.c (expand_assignment): Assert that bitpos is positive.
2623 (store_field): Likewise
2624 (expand_expr_real_1): Make sure that bitpos is positive.
2625 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2626 integer overflow.
2627
2628 2018-08-20 Nathan Sidwell <nathan@acm.org>
2629
2630 * Makefile.in (CPP_ID_DATA_H): Delete.
2631 (CPP_INTERNAL_H): Don't add it.
2632 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2633 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2634
2635 2018-08-20 Richard Biener <rguenther@suse.de>
2636
2637 PR tree-optimization/78655
2638 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2639 pointer + offset nonnull if either operand is nonnull work.
2640
2641 2018-08-20 Tom de Vries <tdevries@suse.de>
2642
2643 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2644 unless the referenced die describes the added property using
2645 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2646 Otherwise, add a DW_AT_location to the referenced die.
2647
2648 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2649
2650 PR target/86994
2651 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2652 register_operand when calling ix86_set_reg_reg_cost.
2653 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2654 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2655 predicate and to 1 otherwise.
2656
2657 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2658
2659 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2660 emit a diagnostic that it is not supported and reset the option.
2661 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2662 supported and consume the option. (ASM_FINAL_SPEC): New.
2663
2664 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2665
2666 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2667 a sentence.
2668
2669 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2670
2671 C-SKY port: Documentation
2672
2673 * doc/extend.texi (C-SKY Function Attributes): New section.
2674 * doc/invoke.texi (Option Summary): Add C-SKY options.
2675 (C-SKY Options): New section.
2676 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2677
2678 2018-08-17 Jojo <jijie_rong@c-sky.com>
2679 Huibin Wang <huibin_wang@c-sky.com>
2680 Sandra Loosemore <sandra@codesourcery.com>
2681 Chung-Lin Tang <cltang@codesourcery.com>
2682
2683 C-SKY port: Backend implementation
2684
2685 * config/csky/*: New.
2686 * common/config/csky/*: New.
2687
2688 2018-08-17 Jojo <jijie_rong@c-sky.com>
2689 Huibin Wang <huibin_wang@c-sky.com>
2690 Sandra Loosemore <sandra@codesourcery.com>
2691 Chung-Lin Tang <cltang@codesourcery.com>
2692 Andrew Jenner <andrew@codesourcery.com>
2693
2694 C-SKY port: Configury
2695
2696 * config.gcc (csky-*-*): New.
2697 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2698 * configure: Regenerated.
2699
2700 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2701
2702 * dump-context.h: Include "dumpfile.h".
2703 (dump_context::dump_printf_va): Convert final param from va_list
2704 to va_list *. Convert from ATTRIBUTE_PRINTF to
2705 ATTRIBUTE_GCC_DUMP_PRINTF.
2706 (dump_context::dump_printf_loc_va): Likewise.
2707 * dumpfile.c: Include "stringpool.h".
2708 (make_item_for_dump_printf_va): Delete.
2709 (make_item_for_dump_printf): Delete.
2710 (class dump_pretty_printer): New class.
2711 (dump_pretty_printer::dump_pretty_printer): New ctor.
2712 (dump_pretty_printer::emit_items): New member function.
2713 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2714 function.
2715 (dump_pretty_printer::emit_item): New member function.
2716 (dump_pretty_printer::stash_item): New member function.
2717 (dump_pretty_printer::format_decoder_cb): New member function.
2718 (dump_pretty_printer::decode_format): New member function.
2719 (dump_context::dump_printf_va): Reimplement in terms of
2720 dump_pretty_printer.
2721 (dump_context::dump_printf_loc_va): Convert final param from va_list
2722 to va_list *.
2723 (dump_context::begin_scope): Reimplement call to
2724 make_item_for_dump_printf.
2725 (dump_printf): Update for change to dump_printf_va.
2726 (dump_printf_loc): Likewise.
2727 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2728 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2729 with %T, %E, and %G.
2730 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2731 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2732 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2733 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2734 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2735 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2736 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2737 within a dump_printf_loc call to "%wu".
2738 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2739 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2740 missing space after "=".
2741 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2742 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2743 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2744 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2745 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2746 duplicate "vectorized" from message.
2747
2748 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2749
2750 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2751 polyNxK_t element's TYPE_STRING_FLAG.
2752
2753 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2754
2755 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2756 (they were unnamed before). Fix comments.
2757
2758 2018-08-17 Nathan Sidwell <nathan@acm.org>
2759
2760 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2761
2762 2018-08-17 Richard Biener <rguenther@suse.de>
2763
2764 PR tree-optimization/86841
2765 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2766
2767 2018-08-17 Martin Liska <mliska@suse.cz>
2768
2769 * common.opt: Remove Warn, Init and Report for options with
2770 Ignore/Deprecated flag. Warning is done automatically for
2771 Deprecated flags.
2772 * config/i386/i386.opt: Likewise.
2773 * config/ia64/ia64.opt: Likewise.
2774 * config/rs6000/rs6000.opt: Likewise.
2775 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2776 Remove usage of flag_check_pointer_bounds.
2777 * lto-wrapper.c (merge_and_complain): Do not handle
2778 OPT_fcheck_pointer_bounds.
2779 (append_compiler_options): Likewise.
2780 * opt-functions.awk: Do not handle Deprecated.
2781 * optc-gen.awk: Check that Var, Report and Init are not
2782 used for an option with Ignore/Deprecated flag.
2783 * opts-common.c (decode_cmdline_option): Do not report
2784 CL_ERR_DEPRECATED.
2785 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2786 options.
2787 * opts.h (struct cl_option): Remove cl_deprecated flag.
2788 (CL_ERR_DEPRECATED): Remove error enum value.
2789
2790 2018-08-17 Richard Biener <rguenther@suse.de>
2791
2792 PR middle-end/86505
2793 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2794 across a va-arg-pack using call adjust its return value accordingly.
2795
2796 2018-08-16 Martin Sebor <msebor@redhat.com>
2797
2798 PR tree-optimization/86853
2799 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2800 (struct fmtresult): Add member and initialize it in ctors.
2801 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2802 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2803 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2804 (parse_directive): Handle %C same as %c.
2805 (sprintf_dom_walker::compute_format_length): Adjust.
2806 (is_call_safe): Adjust.
2807
2808 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2809
2810 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2811 for determining how to count the elements.
2812 * builtins.h (c_strlen): Adjust prototype.
2813 * expr.c (string_constant): Add new parameter mem_size.
2814 Set *mem_size appropriately.
2815 * expr.h (string_constant): Adjust protoype.
2816 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2817 * gimple-fold.h (get_range_strlen): Adjust prototype.
2818 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2819 (format_string): Call get_string_length with eltsize.
2820
2821 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2822
2823 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2824 to emit the span, rather than setting it as the prefix.
2825
2826 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2827
2828 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2829 "margin_char" parameter, defaulting to space. Use it in place
2830 of pp_space for the initial part of the margin.
2831 (layout::print_leading_fixits): Use '+' when filling the margin
2832 of line-insertion fix-it hints.
2833
2834 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2835
2836 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2837 Delete.
2838
2839 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2840
2841 * config/rs6000/altivec.md: Don't set length attribute to the default
2842 value.
2843 * config/rs6000/darwin.md: Ditto.
2844 * config/rs6000/dfp.md: Ditto.
2845 * config/rs6000/htm.md: Ditto.
2846 * config/rs6000/rs6000.md: Ditto.
2847 * config/rs6000/sync.md: Ditto.
2848 * config/rs6000/vsx.md: Ditto.
2849
2850 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2851
2852 * config/rs6000/altivec.md: Don't set length attribute to the default
2853 value, for branch instructions.
2854 * config/rs6000/darwin.md: Ditto.
2855 * config/rs6000/rs6000.md: Ditto.
2856
2857 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2858
2859 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2860 (unnamed conditional branch define_insn): Set length to 4 or 8
2861 depending on offset.
2862 (<bd>_<mode>): Similar, for alternative 0.
2863 (<bd>tf_<mode>): Ditto.
2864
2865 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2866
2867 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2868
2869 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2870
2871 * doc/rtl.texi: Replace old RTX class names with new names.
2872
2873
2874 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2875
2876 * expmed.h (canonicalize_comparison): New declaration.
2877 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2878 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2879 * optabs.c (prepare_cmp_insn): Likewise.
2880 * rtl.h (unsigned_condition_p): New function which checks if a
2881 comparison operator is unsigned.
2882
2883 2018-08-16 Nathan Sidwell <nathan@acm.org>
2884
2885 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2886 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2887
2888 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2889
2890 PR target/84711
2891 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2892 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2893 (mov<mov>): ..this and enable unconditionally.
2894
2895 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2896
2897 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2898
2899 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2900
2901 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2902 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2903 "Common" with "Target".
2904
2905 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2906
2907 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2908 * doc/invoke.texi (mmitigate-rop): Remove.
2909 * config/i386/i386.c: Do not include "regrename.h".
2910 (ix86_rop_should_change_byte_p, reg_encoded_number)
2911 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2912 Remove.
2913 (ix86_reorg): Remove call to ix86_mitigate_rop.
2914 * config/i386/i386.md (attr "modrm_class"): Remove.
2915 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2916 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2917 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2918
2919 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2920
2921 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2922 allow folding of mergeh() and mergel() for the float and double types.
2923 (fold_mergehl_helper): Rework to handle building a permute tree
2924 for float vectors.
2925
2926 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2927
2928 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2929 for TARGET_SSE.
2930
2931 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2932
2933 * common.opt (fdiagnostics-show-labels): New option.
2934 * diagnostic-show-locus.c (class layout_range): Add field
2935 "m_label".
2936 (class layout): Add field "m_show_labels_p".
2937 (layout_range::layout_range): Add param "label" and use it to
2938 initialize m_label.
2939 (make_range): Pass in NULL for new "label" param of layout_range's
2940 ctor.
2941 (layout::layout): Initialize m_show_labels_p.
2942 (layout::maybe_add_location_range): Pass in loc_range->m_label
2943 when constructing layout_range instances.
2944 (struct line_label): New struct.
2945 (layout::print_any_labels): New member function.
2946 (layout::print_line): Call it if label-printing is enabled.
2947 (selftest::test_one_liner_labels): New test.
2948 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2949 * diagnostic.c (diagnostic_initialize): Initialize
2950 context->show_labels_p.
2951 * diagnostic.h (struct diagnostic_context): Add field
2952 "show_labels_p".
2953 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2954 -fno-diagnostics-show-labels.
2955 * dwarf2out.c (gen_producer_string): Add
2956 OPT_fdiagnostics_show_labels to the ignored options.
2957 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2958 param.
2959 (gcc_rich_location::maybe_add_expr): Likewise.
2960 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2961 label" param, defaulting to NULL.
2962 (gcc_rich_location::add_expr): Add "label" param.
2963 (gcc_rich_location::maybe_add_expr): Likewise.
2964 (class text_range_label): New class.
2965 (class range_label_for_type_mismatch): New class.
2966 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2967 of format_warning_va.
2968 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2969 * lto-wrapper.c (merge_and_complain): Add
2970 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2971 (append_compiler_options): Likewise to the dropped options.
2972 (append_diag_options): Likewise to the passed-on options.
2973 * opts.c (common_handle_option): Handle the new option.
2974 * selftest-diagnostic.c
2975 (test_diagnostic_context::test_diagnostic_context): Enable
2976 show_labels_p.
2977 * substring-locations.c: Include "gcc-rich-location.h".
2978 (format_warning_n_va): Add "fmt_label" and "param_label" params
2979 and use them as appropriate.
2980 (format_warning_va): Add "fmt_label" and "param_label" params,
2981 passing them on to format_warning_n_va.
2982 (format_warning_at_substring): Likewise.
2983 (format_warning_at_substring_n): Likewise.
2984 * substring-locations.h (format_warning_va): Add "fmt_label" and
2985 "param_label" params.
2986 (format_warning_n_va): Likewise.
2987 (format_warning_at_substring): Likewise.
2988 (format_warning_at_substring_n): Likewise.
2989 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2990
2991 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2992
2993 PR testsuite/86519
2994 * builtins.c (expand_builtin_memcmp): Do not expand the call
2995 when overflow is detected.
2996
2997 2018-08-15 Martin Sebor <msebor@redhat.com>
2998
2999 PR tree-optimization/71625
3000 * config/aarch64/aarch64-builtins.c
3001 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
3002
3003 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
3004
3005 * config/s390/s390.c (s390_reorg): Remove loop.
3006
3007 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3008
3009 * config/darwin.c
3010 (darwin_function_switched_text_sections): Delete.
3011 * gcc/config/darwin.h
3012 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
3013
3014 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3015
3016 PR target/81685
3017 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
3018 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
3019 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
3020
3021 2018-08-15 Martin Liska <mliska@suse.cz>
3022
3023 PR tree-optimization/86925
3024 * predict.c (expr_expected_value_1): When taking
3025 later predictor, assign also probability.
3026 Use fold_build2_initializer_loc in order to fold
3027 the expression in -frounding-math.
3028
3029 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
3030
3031 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
3032 patterns.
3033 (expand_vec_perm_1): Try the new method.
3034
3035 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
3036
3037 PR target/86547
3038 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
3039 Check whether lra_live_max_point is 0 before dividing.
3040
3041 2018-08-14 Martin Sebor <msebor@redhat.com>
3042
3043 PR tree-optimization/86650
3044 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
3045 (vrp_prop::check_mem_ref): Same.
3046
3047 2018-08-13 Liu Hao <lh_mouse@126.com>
3048
3049 * pretty-print.c (eat_esc_sequence): Swap the foreground and
3050 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3051 and clear it thereafter, as it only works for DBCS.
3052
3053 2018-08-13 Liu Hao <lh_mouse@126.com>
3054
3055 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3056 handle returned by _get_osf_handle().
3057
3058 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3059
3060 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
3061 for folding vec_perm.
3062
3063 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3064
3065 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
3066 Add support for gimple-folding of vec_pack() and vec_unpack()
3067 intrinsics.
3068
3069 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
3070
3071 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
3072 vec_xst variants to the list.
3073 (rs6000_gimple_fold_builtin): Add support for folding unaligned
3074 vector loads and stores.
3075
3076 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
3077
3078 * config.gcc (rs6000-ibm-aix4.x): Delete.
3079 (rs6000-ibm-aix5.1): Delete.
3080 (rs6000-ibm-aix5.2): Delete.
3081 (rs6000-ibm-aix5.3): Delete.
3082 * config/rs6000/aix43.h: Delete.
3083 * config/rs6000/aix51.h: Delete.
3084 * config/rs6000/aix52.h: Delete.
3085 * config/rs6000/t-aix43: Delete.
3086
3087 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
3088
3089 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3090 New function.
3091 (s390_decompose_address): Factor out constant pool ref
3092 decomposition.
3093
3094 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3095
3096 * config/nds32/nds32-predicates.c
3097 (nds32_can_use_bclr_p): Change return type as bool.
3098 (nds32_can_use_bset_p): Ditto.
3099 (nds32_can_use_btgl_p): Ditto.
3100 (nds32_can_use_bitci_p): Ditto.
3101 * config/nds32/nds32-protos.h
3102 (nds32_can_use_bclr_p): Change declaration.
3103 (nds32_can_use_bset_p): Ditto.
3104 (nds32_can_use_btgl_p): Ditto.
3105 (nds32_can_use_bitci_p): Ditto.
3106
3107 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3108
3109 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
3110 Support -msched-prolog-epilog option.
3111 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
3112
3113 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3114
3115 * common/config/nds32/nds32-common.c
3116 (nds32_option_optimization_table): Enalbe -malways-align.
3117
3118 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
3119
3120 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
3121 extra_headers.
3122 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
3123 OPT_misr_secure_ case.
3124 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
3125 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
3126 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
3127 secure attribute.
3128 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
3129 (nds32_isr_info): New field security_level.
3130 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
3131 * config/nds32/nds32.md (return_internal): Consider critical attribute.
3132 * config/nds32/nds32.opt (misr-secure): New option.
3133 * config/nds32/nds32_init.inc: New file.
3134 * config/nds32/nds32_isr.h: New file.
3135
3136 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
3137
3138 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3139 Update comment for atomic instructions.
3140 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3141 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3142 Remove.
3143 (atomic_loaddi): Revise fence expansion to only emit fence prior to
3144 load for __ATOMIC_SEQ_CST model.
3145 (atomic_loaddi_1): Remove float register target.
3146 (atomic_storedi): Handle CONST_INT values.
3147 (atomic_storedi_1): Remove float register source. Add special case
3148 for zero value.
3149 (memory_barrier): New expander and insn.
3150
3151 2018-08-11 Jakub Jelinek <jakub@redhat.com>
3152
3153 PR tree-optimization/86835
3154 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3155 new_stmt after def_gsi, make sure to insert new_square_stmt after
3156 that stmt, not 2 stmts before it.
3157
3158 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
3159
3160 PR target/82418
3161 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
3162 instead of SWI48.
3163
3164 2018-08-10 Martin Liska <mliska@suse.cz>
3165
3166 PR target/83610
3167 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
3168 function type.
3169 * builtins.c (expand_builtin_expect_with_probability):
3170 New function.
3171 (expand_builtin_expect_with_probability): New function.
3172 (build_builtin_expect_predicate): Add new argumnet probability
3173 for BUILT_IN_EXPECT_WITH_PROBABILITY.
3174 (fold_builtin_expect):
3175 (fold_builtin_2):
3176 (fold_builtin_3):
3177 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
3178 * builtins.h (fold_builtin_expect): Set new argument.
3179 * doc/extend.texi: Document __builtin_expect_with_probability.
3180 * doc/invoke.texi: Likewise.
3181 * gimple-fold.c (gimple_fold_call): Pass new argument.
3182 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
3183 also BUILT_IN_EXPECT_WITH_PROBABILITY.
3184 * predict.c (get_predictor_value): New function.
3185 (expr_expected_value): Add new argument probability. Assume
3186 that predictor and probability are always non-null.
3187 (expr_expected_value_1): Likewise. For __builtin_expect and
3188 __builtin_expect_with_probability set probability. Handle
3189 combination in binary expressions.
3190 (tree_predict_by_opcode): Simplify code by simply calling
3191 get_predictor_value.
3192 (pass_strip_predict_hints::execute): Add handling of
3193 BUILT_IN_EXPECT_WITH_PROBABILITY.
3194 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
3195 new predictor.
3196 * tree.h (DECL_BUILT_IN_P): New function.
3197
3198 2018-08-10 Martin Liska <mliska@suse.cz>
3199
3200 PR tree-optimization/85799
3201 * passes.def: Add argument for pass_strip_predict_hints.
3202 * predict.c (class pass_strip_predict_hints): Add new argument
3203 early_p.
3204 (strip_predictor_early): New function.
3205 (pass_strip_predict_hints::execute): Call the function to
3206 strip predictors.
3207 (strip_predict_hints): New function.
3208 * predict.def: Fix comment.
3209
3210 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3211
3212 * Makefile.in: Clarify which tm.texi to copy over to assert the
3213 right to grant a GFDL license for all.
3214
3215 2018-08-09 Jeff Law <law@redhat.com>
3216
3217 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
3218 unused variable.
3219
3220 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
3221
3222 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
3223 prototype.
3224
3225 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3226
3227 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
3228 reductions for variable-length vectors.
3229
3230 2018-08-09 David Malcolm <dmalcolm@redhat.com>
3231
3232 PR other/84889
3233 * common.opt (fdiagnostics-show-line-numbers): New option.
3234 * diagnostic-show-locus.c (class layout): Add fields
3235 "m_show_line_numbers_p" and "m_linenum_width";
3236 (num_digits): New function.
3237 (test_num_digits): New function.
3238 (layout::layout): Initialize new fields. Update m_x_offset
3239 logic to handle any left margin.
3240 (layout::print_source_line): Print line number when requested.
3241 (layout::start_annotation_line): New member function.
3242 (layout::print_annotation_line): Call it.
3243 (layout::print_leading_fixits): Likewise.
3244 (layout::print_trailing_fixits): Likewise. Update calls to
3245 move_to_column for new parameter.
3246 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
3247 it to potentially call start_annotation_line.
3248 (layout::show_ruler): Call start_annotation_line.
3249 (selftest::test_line_numbers_multiline_range): New selftest.
3250 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
3251 and selftest::test_line_numbers_multiline_range.
3252 * diagnostic.c (diagnostic_initialize): Initialize
3253 show_line_numbers_p.
3254 * diagnostic.h (struct diagnostic_context): Add field
3255 "show_line_numbers_p".
3256 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
3257 -fno-diagnostics-show-line-numbers.
3258 * dwarf2out.c (gen_producer_string): Add
3259 OPT_fdiagnostics_show_line_numbers to the ignored options.
3260 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
3261 one setting" options.
3262 (append_compiler_options): Likewise to the dropped options.
3263 (append_diag_options): Likewise to the passed-on options.
3264 * opts.c (common_handle_option): Handle the new option.
3265 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
3266
3267 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
3268
3269 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
3270 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
3271 third argument of type "const signed char" to descriptions of
3272 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
3273 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
3274 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
3275 __builtin_bcdsub_ov functions.
3276
3277 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3278
3279 PR tree-optimization/86858
3280 * tree-vect-loop.c (vect_is_simple_reduction): Restore
3281 flow_bb_inside_loop_p calls.
3282
3283 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3284
3285 PR tree-optimization/86871
3286 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3287 instead of gimple_assign_lhs.
3288
3289 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
3290
3291 PR target/86887
3292 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
3293 register constraint to operand 0.
3294 (add<mode>3_carryinC): Likewise.
3295 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
3296
3297 2018-08-09 Martin Liska <mliska@suse.cz>
3298
3299 PR c/86895
3300 * common.opt: Remove extra line.
3301
3302 2018-08-09 Martin Liska <mliska@suse.cz>
3303
3304 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
3305 at the end of a line, make first letter capital and end up
3306 a sentence with a dot.
3307 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
3308 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
3309 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
3310 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
3311 (PARAM_MAX_ISL_OPERATIONS): Likewise.
3312 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
3313 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
3314 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
3315 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
3316 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
3317 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
3318 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
3319 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
3320 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
3321 (PARAM_TREE_REASSOC_WIDTH): Likewise.
3322 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
3323 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
3324 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
3325
3326 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
3327
3328 PR target/84332
3329 * config/s390/s390.c (s390_option_override_internal): Reduce the
3330 stack-clash-protection-probe-interval param if it would be too big
3331 for z900.
3332
3333 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
3334
3335 PR target/46179
3336 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
3337 * config/m68k/m68k.c (handle_move_double): Don't call
3338 m68k_final_prescan_insn.
3339 (m68k_adjust_decorated_operand): Renamed from
3340 m68k_final_prescan_insn, remove first and third operand and
3341 simplify.
3342 (print_operand): Call it.
3343 (print_operand_address): Call it.
3344
3345 2018-08-08 Nathan Sidwell <nathan@acm.org>
3346
3347 * diagnostic.c (diagnostic_report_current_module): Use
3348 linemap_included_from & linemap_included_from_linemap.
3349
3350 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
3351
3352 * config/aarch64/aarch64-cores.def: Add phecda core.
3353 * config/aarch64/aarch64-tune.md: Regenerate.
3354 * doc/invoke.texi: Add phecda core.
3355
3356 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3357
3358 PR target/85295
3359 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3360 definitions.
3361 * config/s390/s390.md ("movti"): Add more alternatives for
3362 constant to GPR copies.
3363
3364 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3365
3366 * config/s390/s390.c: Fix whitespace damage throughout the file.
3367 * config/s390/s390.h: Likewise.
3368 * config/s390/tpf.h: Likewise.
3369
3370 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3371
3372 * config/s390/s390.c (s390_loadrelative_operand_p):
3373 Remove TARGET_CPU_ZARCH usages.
3374 (s390_rtx_costs): Likewise.
3375 (s390_legitimate_constant_p): Likewise.
3376 (s390_cannot_force_const_mem): Likewise.
3377 (legitimate_reload_constant_p): Likewise.
3378 (s390_preferred_reload_class): Likewise.
3379 (legitimize_pic_address): Likewise.
3380 (legitimize_tls_address): Likewise.
3381 (s390_split_branches): Removed.
3382 (s390_add_execute): Removed.
3383 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3384 (s390_mainpool_start): Likewise.
3385 (s390_mainpool_finish): Likewise.
3386 (s390_mainpool_cancel): Removed.
3387 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3388 (s390_chunkify_cancel): Likewise.
3389 (s390_return_addr_rtx): Likewise.
3390 (s390_register_info): Remove split_branches_pending_p uages.
3391 (s390_optimize_register_info): Likewise.
3392 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3393 split_branches_pending_p usages.
3394 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3395 (s390_load_got): Likewise.
3396 (s390_expand_split_stack_prologue): Likewise.
3397 (output_asm_nops): Likewise.
3398 (s390_function_profiler): Likewise.
3399 (s390_emit_call): Likewise.
3400 (s390_conditional_register_usage): Likewise.
3401 (s390_optimize_prologue): Likewise.
3402 (s390_reorg): Remove TARGET_CPU_ZARCH and
3403 split_branches_pending_p usages.
3404 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3405 usages.
3406 (s390_output_indirect_thunk_function): Likewise.
3407 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3408 (TARGET_CPU_ZARCH_P): Removed.
3409 (struct machine_function): Remove split_branches_pending_p.
3410 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3411
3412 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3413
3414 * common/config/s390/s390-common.c (processor_flags_table):
3415 Remove flags.
3416 * config.gcc: Remove with_arch/with_tune support.
3417 * config/s390/2064.md: Remove cpu attribute comparisons.
3418 * config/s390/driver-native.c (s390_host_detect_local_cpu):
3419 Remove MTN.
3420 * config/s390/linux.h (ASM_SPEC):
3421 Remove -march support.
3422 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3423 Use a table to get an arch level.
3424 * config/s390/s390-opts.h (enum processor_type):
3425 Remove enum values.
3426 * config/s390/s390.c
3427 (processor_table): Remove entries, add arch_level values.
3428 (s390_issue_rate): Remove cases.
3429 (s390_option_override): Adjust
3430 s390_option_override_internal() call.
3431 (s390_option_override_internal): Remove deprecation warning.
3432 (s390_valid_target_attribute_tree): Adjust
3433 s390_option_override_internal() call.
3434 * config/s390/s390.h (struct s390_processor):
3435 Share with s390-c.c, add arch_level field.
3436 * config/s390/s390.md:
3437 Remove occurrences in cpu attribute.
3438 * config/s390/s390.opt: Remove -march/-mtune support.
3439 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3440 * doc/invoke.texi: Remove deprecation warning.
3441
3442 2018-08-08 Luis Machado <luis.machado@linaro.org>
3443
3444 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3445 global.
3446 (qdf24xx_tunings): Set vector cost structure to
3447 qdf24xx_vector_cost.
3448
3449 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3450 <register_sextend>: Set to 3.
3451
3452 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
3453
3454 PR target/86838
3455 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3456 * config/aarch64/aarch64-simd.md
3457 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3458 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3459 (aarch64_frecpx<mode>): ...this new pattern.
3460 * config/aarch64/aarch64-simd-builtins.def: Remove comment
3461 about aarch64_frecp<FRECP:frecp_suffix><mode>.
3462
3463 2018-08-07 Martin Liska <mliska@suse.cz>
3464
3465 PR middle-end/83023
3466 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3467 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3468 * predict.def (PRED_MALLOC_NONNULL): New predictor.
3469 * doc/extend.texi: Document that malloc attribute adds
3470 hit to compiler.
3471
3472 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
3473
3474 PR target/86785
3475 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3476 Define to speculation_safe_value_not_needed.
3477
3478 2018-08-06 Jeff Law <law@redhat.com>
3479
3480 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3481 the vr_values instance to cprop_into_stmt.
3482 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3483 (cprop_operand): Also query EVRP to determine if OP is a constant.
3484
3485 2018-08-06 Nathan Sidwell <nathan@acm.org>
3486
3487 * diagnostic.c (diagnostic_report_current_module): Reroll
3488 included-at loop. Translate text.
3489
3490 2018-08-06 David Malcolm <dmalcolm@redhat.com>
3491
3492 * function-tests.c (selftest::test_expansion_to_rtl): Call
3493 free_after_compilation.
3494
3495 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3496
3497 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3498
3499 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
3500
3501 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3502 loops with memory block operations from getting unrolled.
3503
3504 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
3505
3506 PR target/86807
3507 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3508 Define to speculation_safe_value_not_needed.
3509
3510 2018-08-06 Jeff Law <law@redhat.com>
3511
3512 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3513 assert.
3514
3515 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3516
3517 PR target/86662
3518 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3519 with all enabled __intN types.
3520
3521 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3522
3523 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3524
3525 * alias.c (record_set): Check for clobber high.
3526 * cfgexpand.c (expand_gimple_stmt): Likewise.
3527 * combine-stack-adj.c (single_set_for_csa): Likewise.
3528 * combine.c (find_single_use_1): Likewise.
3529 (set_nonzero_bits_and_sign_copies): Likewise.
3530 (get_combine_src_dest): Likewise.
3531 (is_parallel_of_n_reg_sets): Likewise.
3532 (try_combine): Likewise.
3533 (record_dead_and_set_regs_1): Likewise.
3534 (reg_dead_at_p_1): Likewise.
3535 (reg_dead_at_p): Likewise.
3536 * dce.c (deletable_insn_p): Likewise.
3537 (mark_nonreg_stores_1): Likewise.
3538 (mark_nonreg_stores_2): Likewise.
3539 * df-scan.c (df_find_hard_reg_defs): Likewise.
3540 (df_uses_record): Likewise.
3541 (df_get_call_refs): Likewise.
3542 * dwarf2out.c (mem_loc_descriptor): Likewise.
3543 * haifa-sched.c (haifa_classify_rtx): Likewise.
3544 * ira-build.c (create_insn_allocnos): Likewise.
3545 * ira-costs.c (scan_one_insn): Likewise.
3546 * ira.c (equiv_init_movable_p): Likewise.
3547 (rtx_moveable_p): Likewise.
3548 (interesting_dest_for_shprep): Likewise.
3549 * jump.c (mark_jump_label_1): Likewise.
3550 * postreload-gcse.c (record_opr_changes): Likewise.
3551 * postreload.c (reload_cse_simplify): Likewise.
3552 (struct reg_use): Add source expr.
3553 (reload_combine): Check for clobber high.
3554 (reload_combine_note_use): Likewise.
3555 (reload_cse_move2add): Likewise.
3556 (move2add_note_store): Likewise.
3557 * print-rtl.c (print_pattern): Likewise.
3558 * recog.c (decode_asm_operands): Likewise.
3559 (store_data_bypass_p): Likewise.
3560 (if_test_bypass_p): Likewise.
3561 * regcprop.c (kill_clobbered_value): Likewise.
3562 (kill_set_value): Likewise.
3563 * reginfo.c (reg_scan_mark_refs): Likewise.
3564 * reload1.c (maybe_fix_stack_asms): Likewise.
3565 (eliminate_regs_1): Likewise.
3566 (elimination_effects): Likewise.
3567 (mark_not_eliminable): Likewise.
3568 (scan_paradoxical_subregs): Likewise.
3569 (forget_old_reloads_1): Likewise.
3570 * reorg.c (find_end_label): Likewise.
3571 (try_merge_delay_insns): Likewise.
3572 (redundant_insn): Likewise.
3573 (own_thread_p): Likewise.
3574 (fill_simple_delay_slots): Likewise.
3575 (fill_slots_from_thread): Likewise.
3576 (dbr_schedule): Likewise.
3577 * resource.c (update_live_status): Likewise.
3578 (mark_referenced_resources): Likewise.
3579 (mark_set_resources): Likewise.
3580 * rtl.c (copy_rtx): Likewise.
3581 * rtlanal.c (reg_referenced_p): Likewise.
3582 (single_set_2): Likewise.
3583 (noop_move_p): Likewise.
3584 (note_stores): Likewise.
3585 * sched-deps.c (sched_analyze_reg): Likewise.
3586 (sched_analyze_insn): Likewise.
3587
3588 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3589
3590 * cse.c (invalidate_reg): New function extracted from...
3591 (invalidate): ...here.
3592 (canonicalize_insn): Check for clobber high.
3593 (invalidate_from_clobbers): invalidate clobber highs.
3594 (invalidate_from_sets_and_clobbers): Likewise.
3595 (count_reg_usage): Check for clobber high.
3596 (insn_live_p): Likewise.
3597 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3598 (cselib_invalidate_regno): Check for clobber in setter.
3599 (cselib_invalidate_rtx): Pass through setter.
3600 (cselib_invalidate_rtx_note_stores):
3601 (cselib_process_insn): Check for clobber high.
3602 * cselib.h (cselib_invalidate_rtx): Add operand.
3603
3604 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3605
3606 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3607 (mark_not_eliminable): Likewise.
3608 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3609 * lra-lives.c (process_bb_lives): Check for clobber high.
3610 * lra.c (new_insn_reg): Remember clobber highs.
3611 (collect_non_operand_hard_regs): Check for clobber high.
3612 (lra_set_insn_recog_data): Likewise.
3613 (add_regs_to_insn_regno_info): Likewise.
3614 (lra_update_insn_regno_info): Likewise.
3615
3616 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3617
3618 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3619 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3620
3621 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3622
3623 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3624 (copy_insn_1): Likewise.
3625 (gen_hard_reg_clobber_high): New gen function.
3626 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3627 * genemit.c (gen_exp): Likewise.
3628 (gen_emit_seq): Pass through info.
3629 (gen_insn): Check for CLOBBER_HIGH.
3630 (gen_expand): Pass through info.
3631 (gen_split): Likewise.
3632 (output_add_clobbers): Likewise.
3633 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3634 (remove_clobbers): Likewise.
3635 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3636
3637 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3638
3639 * doc/rtl.texi (clobber_high): Add.
3640 (parallel): Add in clobber high
3641 * rtl.c (rtl_check_failed_code3): Add function.
3642 * rtl.def (CLOBBER_HIGH): Add expression.
3643 * rtl.h (RTL_CHECKC3): Add macro.
3644 (rtl_check_failed_code3): Add declaration.
3645 (XC3EXP): Add macro.
3646
3647 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3648
3649 PR target/86386
3650 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3651 cfun->machine->max_used_stack_alignment if needed.
3652
3653 2018-08-04 Martin Sebor <msebor@redhat.com>
3654
3655 PR tree-optimization/86571
3656 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3657 NaN output to 4.
3658
3659 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3660
3661 PR target/86799
3662 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3663 Define.
3664
3665 2018-08-03 Jeff Law <law@redhat.com>
3666
3667 PR target/86795
3668 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3669 Define to speculation_safe_value_not_needed.
3670
3671 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3672
3673 * doc/gcov.texi (-x): Remove duplicate "to".
3674 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3675 (-Wif-not-aligned): Remove duplicate "is".
3676 (-flto): Remove duplicate "the".
3677 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3678 duplicate "v5.00.b".
3679 (MSP430 Options): Remove duplicate "and" from the description
3680 of "-mgprel-sec=regexp".
3681 (x86 Options): Remove duplicate copies of "vmldLog102" and
3682 vmlsLog104 from description of "-mveclibabi=type".
3683
3684 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3685
3686 * internal-fn.h (first_commutative_argument): Declare.
3687 * internal-fn.c (first_commutative_argument): New function.
3688 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3689 restrictions for pattern statements. Use first_commutative_argument
3690 to look for commutative operands in calls to internal functions.
3691
3692 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3693
3694 * Makefile.in (wide-int-range.o): New.
3695 * tree-vrp.c: Move all the wide_int_* functions to...
3696 * wide-int-range.cc: ...here.
3697 * tree-vrp.h: Move all the wide_int_* prototypes to...
3698 * wide-int-range.h: ...here.
3699
3700 2018-08-03 Tom de Vries <tdevries@suse.de>
3701
3702 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3703 UI_NONE.
3704 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3705 * except.c (output_function_exception_table): Do early exit if
3706 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3707
3708 2018-08-03 Martin Liska <mliska@suse.cz>
3709
3710 * predict.c (dump_prediction): Change to 2 digits
3711 in fraction part.
3712
3713 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3714
3715 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3716 neon_dup_q to...
3717 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3718
3719 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3720
3721 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3722 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3723 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3724 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3725 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3726
3727 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3728
3729 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3730 pp_take_prefix when saving the existing prefix.
3731 * diagnostic.c (diagnostic_append_note): Likewise.
3732 * langhooks.c (lhd_print_error_function): Likewise.
3733 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3734 param's type. Free the existing prefix.
3735 (pp_take_prefix): New function.
3736 (pretty_printer::pretty_printer): Drop the prefix parameter.
3737 Rename the length parameter to match the comment.
3738 (pretty_printer::~pretty_printer): Free the prefix.
3739 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3740 parameter.
3741 (struct pretty_printer): Drop the "const" from "prefix" field's
3742 type and clarify memory management.
3743 (pp_set_prefix): Drop the "const" from the 2nd param.
3744 (pp_take_prefix): New decl.
3745
3746 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3747
3748 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3749 for word_mode_ok here instead of passing as argument.
3750 (expand_block_compare): Change select_block_compare_mode() call.
3751 (expand_strncmp_gpr_sequence): New function.
3752 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3753
3754 2018-08-02 Jeff Law <law@redhat.com>
3755
3756 PR target/86790
3757 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3758 Define to speculation_safe_value_not_needed.
3759
3760 PR target/86784
3761 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3762 Define to speculation_safe_value_not_needed.
3763
3764 2018-08-02 Tom de Vries <tdevries@suse.de>
3765
3766 PR target/86660
3767 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3768 function. Return UI_TARGET unconditionally.
3769 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3770 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3771
3772 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3773
3774 * genemit.c (print_overload_test): Fix typo.
3775
3776 2018-08-02 Richard Biener <rguenther@suse.de>
3777
3778 PR tree-optimization/86816
3779 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3780 which checks for value availability before querying it.
3781 (gvn_uses_equal): Use it.
3782 (same_succ_hash): Likewise.
3783 (gimple_equal_p): Likewise.
3784
3785 2018-08-02 Nick Clifton <nickc@redhat.com>
3786
3787 PR target/86813
3788 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3789 Define to speculation_safe_value_not_needed.
3790
3791 PR target/86810
3792 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3793 Define to speculation_safe_value_not_needed.
3794
3795 PR target/86810
3796 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3797 Define to speculation_safe_value_not_needed.
3798
3799 PR target/86803
3800 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3801 Define to speculation_safe_value_not_needed.
3802
3803 PR target/86797
3804 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3805 Define to speculation_safe_value_not_needed.
3806
3807 PR target/86791
3808 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3809 Define to speculation_safe_value_not_needed.
3810
3811 PR target/86789
3812 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3813 Define to speculation_safe_value_not_needed.
3814
3815 PR target/86787
3816 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3817 Define to speculation_safe_value_not_needed.
3818
3819 PR target/86782
3820 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3821 speculation_safe_value_not_needed.
3822
3823 PR target/86781
3824 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3825 to speculation_safe_value_not_needed.
3826
3827 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3828
3829 * doc/md.texi: Expand the documentation of instruction names
3830 to mention port-local uses. Document '@' in pattern names.
3831 * read-md.h (overloaded_instance, overloaded_name): New structs.
3832 (mapping): Declare.
3833 (md_reader::handle_overloaded_name): New member function.
3834 (md_reader::get_overloads): Likewise.
3835 (md_reader::m_first_overload): New member variable.
3836 (md_reader::m_next_overload_ptr): Likewise.
3837 (md_reader::m_overloads_htab): Likewise.
3838 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3839 m_next_overload_ptr and m_overloads_htab.
3840 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3841 (get_mode_token, get_code_token, get_int_token): New functions.
3842 (map_attr_string): Add an optional argument that passes back
3843 the associated iterator.
3844 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3845 (md_reader::handle_overloaded_name, add_overload_instance): New
3846 functions.
3847 (apply_iterators): Handle '@' names. Report an error if '@'
3848 is used without iterators.
3849 (initialize_iterators): Initialize the new iterator_group fields.
3850 * genopinit.c (handle_overloaded_code_for)
3851 (handle_overloaded_gen): New functions.
3852 (main): Use them to print declarations of maybe_code_for_* and
3853 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3854 * genemit.c (print_overload_arguments, print_overload_test)
3855 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3856 (main): Use it to print definitions of maybe_code_for_* and
3857 maybe_gen_* functions.
3858 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3859 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3860 instead of explicit mode checks.
3861 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3862 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3863 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3864 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3865 (aarch64_expand_compare_and_swap): Likewise
3866 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3867 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3868 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3869 (aarch64_constant_pool_reload_icode): Delete.
3870 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3871 instead of aarch64_constant_pool_reload_icode. Use
3872 code_for_aarch64_reload_mov instead of explicit mode checks.
3873 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3874 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3875 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3876 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3877 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3878 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3879 (aarch64_atomic_load_op_code): Delete.
3880 (aarch64_emit_atomic_load_op): Likewise.
3881 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3882 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3883 instead of aarch64_emit_atomic_load_op.
3884 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3885 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3886 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3887 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3888 character before the pattern name.
3889 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3890 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3891 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3892 (aarch64_frecps<mode>): Likewise.
3893 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3894 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3895 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3896 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3897 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3898
3899 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3900
3901 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3902 Allow HFmode constants if TARGET_FP_F16INST.
3903
3904 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3905
3906 PR target/86014
3907 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3908 No longer check last store for clobber of address register.
3909
3910 2018-08-02 Martin Liska <mliska@suse.cz>
3911
3912 PR gcov-profile/86817
3913 * gcov.c (process_all_functions): New function.
3914 (main): Call it.
3915 (process_file): Move functions processing to
3916 process_all_functions.
3917
3918 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3919
3920 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3921 "const" to the "gimple *" and "rtx_insn *" parameters.
3922 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3923 Likewise.
3924 (dump_location_t::dump_location_t): Likewise.
3925
3926 2018-08-01 Martin Sebor <msebor@redhat.com>
3927
3928 PR tree-optimization/86650
3929 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3930 rather than a "gcall *". Directly pass the data of interest
3931 to percent_K_format, rather than building a temporary CALL_EXPR
3932 to hold it.
3933 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3934 (gimple_fold_builtin_strncat): Adjust.
3935 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3936 gcall* argument with gimple*.
3937 * gimple-ssa-warn-restrict.c (check_call): Same.
3938 (wrestrict_dom_walker::before_dom_children): Same.
3939 (builtin_access::builtin_access): Same.
3940 (check_bounds_or_overlap): Same
3941 (maybe_diag_overlap): Same.
3942 (maybe_diag_offset_bounds): Same.
3943 * tree-diagnostic.c (default_tree_printer): Move usage of
3944 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3945 to this callsite.
3946 * tree-pretty-print.c (percent_K_format): Add argument.
3947 * tree-pretty-print.h: Add argument.
3948 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3949 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3950 (maybe_diag_stxncpy_trunc): Same.
3951 (handle_builtin_stxncpy): Same.
3952 (handle_builtin_strcat): Same.
3953
3954 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3955
3956 * match.pd: Optimise pointer range checks.
3957
3958 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3959
3960 PR tree-optimization/86758
3961 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3962 to remove pattern statements.
3963
3964 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3965
3966 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3967 result of dfs_enumerate_from when constructing stmt_vec_infos,
3968 instead of additionally calling get_loop_body.
3969
3970 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3971
3972 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3973 parameter.
3974 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3975 When creating an iv, assert that the step is not known to be zero.
3976 (vect_setup_realignment): Update call accordingly.
3977 * tree-vect-stmts.c (vectorizable_store): Likewise.
3978 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3979
3980 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3981
3982 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3983 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3984 (vectorizable_reduction): Likewise.
3985 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3986 (vect_detect_hybrid_slp_stmts): Likewise.
3987 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3988
3989 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3990
3991 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3992 (wide_int_set_zero_nonzero_bits): ...this.
3993 (zero_nonzero_bits_from_vr): Rename to...
3994 (vrp_set_zero_nonzero_bits): ...this.
3995 (extract_range_from_multiplicative_op_1): Abstract wide int
3996 code...
3997 (wide_int_range_multiplicative_op): ...here.
3998 (extract_range_from_binary_expr_1): Extract wide int binary
3999 operations into their own functions.
4000 (wide_int_range_lshift): New.
4001 (wide_int_range_can_optimize_bit_op): New.
4002 (wide_int_range_shift_undefined_p): New.
4003 (wide_int_range_bit_xor): New.
4004 (wide_int_range_bit_ior): New.
4005 (wide_int_range_bit_and): New.
4006 (wide_int_range_trunc_mod): New.
4007 (extract_range_into_wide_ints): New.
4008 (vrp_shift_undefined_p): New.
4009 (extract_range_from_multiplicative_op): New.
4010 (vrp_can_optimize_bit_op): New.
4011 * tree-vrp.h (value_range::dump): New.
4012 (wide_int_range_multiplicative_op): New.
4013 (wide_int_range_lshift):New.
4014 (wide_int_range_shift_undefined_p): New.
4015 (wide_int_range_bit_xor): New.
4016 (wide_int_range_bit_ior): New.
4017 (wide_int_range_bit_and): New.
4018 (wide_int_range_trunc_mod): New.
4019 (zero_nonzero_bits_from_bounds): Rename to...
4020 (wide_int_set_zero_nonzero_bits): ...this.
4021 (zero_nonzero_bits_from_vr): Rename to...
4022 (vrp_set_zero_nonzero_bits): ...this.
4023 (range_easy_mask_min_max): Rename to...
4024 (wide_int_range_can_optimize_bit_op): this.
4025 * vr-values.c (simplify_bit_ops_using_ranges): Rename
4026 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
4027
4028 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4029
4030 * tree-vectorizer.h (vect_orig_stmt): New function.
4031 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
4032 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
4033 (vect_create_epilog_for_reduction): Likewise.
4034 (vectorizable_live_operation): Likewise.
4035 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4036 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
4037 * tree-vect-stmts.c (vectorizable_call): Likewise.
4038 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
4039
4040 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4041
4042 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
4043 argument.
4044 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
4045 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
4046 (vect_transform_loop): Likewise.
4047 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4048
4049 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4050
4051 * tree-vectorizer.h (vect_schedule_slp): Return void.
4052 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
4053 (vect_schedule_slp): Likewise.
4054
4055 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4056
4057 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
4058 argument.
4059 (vect_transform_loop): Update calls accordingly. Schedule SLP
4060 instances before the main loop, if any exist.
4061
4062 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
4063
4064 PR tree-optimization/86749
4065 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
4066 If the lhs is used in a COND_EXPR, check that it is being used
4067 as the "then" or "else" value.
4068
4069 2018-08-01 Tom de Vries <tdevries@suse.de>
4070
4071 PR target/86800
4072 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4073 speculation_safe_value_not_needed.
4074
4075 2018-08-01 Richard Biener <rguenther@suse.de>
4076
4077 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
4078 as base and offset.
4079
4080 2018-08-01 Martin Liska <mliska@suse.cz>
4081
4082 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
4083 format how successful transformation is dumped.
4084 (gimple_mod_pow2_value_transform): Likewise.
4085 (gimple_mod_subtract_transform): Likewise.
4086 (gimple_stringops_transform): Likewise.
4087
4088 2018-08-01 Martin Liska <mliska@suse.cz>
4089
4090 PR value-prof/35543
4091 * value-prof.c (interesting_stringop_to_profile_p):
4092 Simplify the code and add BUILT_IN_MEMMOVE.
4093 (gimple_stringops_transform): Likewise.
4094
4095 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
4096
4097 * config/aarch64/aarch64-simd.md
4098 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
4099 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
4100 use GPI iterator instead of SI mode.
4101
4102 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4103
4104 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
4105 rs6000_speculation_barrier.
4106 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
4107 new barrier pattern name.
4108
4109 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
4110
4111 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
4112 (speculation_barrier): New insn.
4113
4114 2018-08-01 Richard Biener <rguenther@suse.de>
4115
4116 PR bootstrap/86724
4117 * graphite.h: Include isl/id.h and isl/space.h to allow build
4118 with ISL 0.20.
4119
4120 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
4121
4122 PR target/86651
4123 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4124 mode for COFF targets.
4125 * defaults.h (TARGET_COFF): Define.
4126 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
4127 TARGET_COFF): Define.
4128 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
4129 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
4130 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
4131
4132 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4133
4134 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
4135 * gimple-streamer-out.c (output_bb): Save it.
4136 * lto-streamer-in.c (input_struct_function_base): Restore
4137 instance discriminator if available. Create map on demand.
4138 * lto-streamer-out.c (output_struct_function_base): Save it if
4139 available.
4140 * final.c (decl_to_instance_map): Document LTO strategy.
4141
4142 2018-07-31 Alexandre Oliva <oliva@adacore.com>
4143 Olivier Hainque <hainque@adacore.com>
4144
4145 * debug.h (decl_to_instance_map_t): New type.
4146 (decl_to_instance_map): Declare.
4147 (maybe_create_decl_to_instance_map): New inline function.
4148 * final.c (bb_discriminator, last_bb_discriminator): New statics,
4149 to track basic block discriminators.
4150 (final_start_function_1): Initialize them.
4151 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
4152 bb_discriminator.
4153 (decl_to_instance_map): New variable.
4154 (map_decl_to_instance, maybe_set_discriminator): New functions.
4155 (notice_source_line): Set discriminator.
4156
4157 2018-07-31 Ian Lance Taylor <iant@golang.org>
4158
4159 * targhooks.c (default_have_speculation_safe_value): Add
4160 ATTRIBUTE_UNUSED.
4161
4162 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4163
4164 * dump-context.h: Include "pretty-print.h".
4165 (dump_context::refresh_dumps_are_enabled): New decl.
4166 (dump_context::emit_item): New decl.
4167 (class dump_context): Add fields "m_test_pp" and
4168 "m_test_pp_flags".
4169 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4170 (temp_dump_context::get_dumped_text): New decl.
4171 (class temp_dump_context): Add field "m_pp".
4172 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
4173 (dump_context::refresh_dumps_are_enabled): ...and add a test for
4174 m_test_pp.
4175 (set_dump_file): Update for above change.
4176 (set_alt_dump_file): Likewise.
4177 (dump_loc): New overload, taking a pretty_printer *.
4178 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
4179 to any test pretty-printer.
4180 (make_item_for_dump_gimple_stmt): New function, adapted from
4181 optinfo::add_gimple_stmt.
4182 (dump_context::dump_gimple_stmt): Call it, and use the result,
4183 eliminating the direct usage of dump_file and alt_dump_file in
4184 favor of indirectly using them via emit_item.
4185 (make_item_for_dump_gimple_expr): New function, adapted from
4186 optinfo::add_gimple_expr.
4187 (dump_context::dump_gimple_expr): Call it, and use the result,
4188 eliminating the direct usage of dump_file and alt_dump_file in
4189 favor of indirectly using them via emit_item.
4190 (make_item_for_dump_generic_expr): New function, adapted from
4191 optinfo::add_tree.
4192 (dump_context::dump_generic_expr): Call it, and use the result,
4193 eliminating the direct usage of dump_file and alt_dump_file in
4194 favor of indirectly using them via emit_item.
4195 (make_item_for_dump_printf_va): New function, adapted from
4196 optinfo::add_printf_va.
4197 (make_item_for_dump_printf): New function.
4198 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
4199 and use the result, eliminating the direct usage of dump_file and
4200 alt_dump_file in favor of indirectly using them via emit_item.
4201 (make_item_for_dump_dec): New function.
4202 (dump_context::dump_dec): Call it, and use the result,
4203 eliminating the direct usage of dump_file and alt_dump_file in
4204 favor of indirectly using them via emit_item.
4205 (make_item_for_dump_symtab_node): New function, adapted from
4206 optinfo::add_symtab_node.
4207 (dump_context::dump_symtab_node): Call it, and use the result,
4208 eliminating the direct usage of dump_file and alt_dump_file in
4209 favor of indirectly using them via emit_item.
4210 (dump_context::begin_scope): Reimplement, avoiding direct usage
4211 of dump_file and alt_dump_file in favor of indirectly using them
4212 via emit_item.
4213 (dump_context::emit_item): New member function.
4214 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
4215 Set up test pretty-printer on the underlying context. Call
4216 refresh_dumps_are_enabled.
4217 (temp_dump_context::~temp_dump_context): Call
4218 refresh_dumps_are_enabled.
4219 (temp_dump_context::get_dumped_text): New member function.
4220 (selftest::verify_dumped_text): New function.
4221 (ASSERT_DUMPED_TEXT_EQ): New macro.
4222 (selftest::test_capture_of_dump_calls): Run all tests twice, with
4223 and then without optinfo enabled. Add uses of
4224 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
4225 * dumpfile.h: Update comment for the dump_* API.
4226 * optinfo-emit-json.cc
4227 (selftest::test_building_json_from_dump_calls): Update for new
4228 param for temp_dump_context ctor.
4229 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
4230 and "m_owned" field.
4231 (optinfo_item::~optinfo_item): Likewise.
4232 (optinfo::add_item): New member function.
4233 (optinfo::emit): Update comment.
4234 (optinfo::add_string): Delete.
4235 (optinfo::add_printf): Delete.
4236 (optinfo::add_printf_va): Delete.
4237 (optinfo::add_gimple_stmt): Delete.
4238 (optinfo::add_gimple_expr): Delete.
4239 (optinfo::add_tree): Delete.
4240 (optinfo::add_symtab_node): Delete.
4241 (optinfo::add_dec): Delete.
4242 * optinfo.h (class dump_context): New forward decl.
4243 (optinfo::add_item): New decl.
4244 (optinfo::add_string): Delete.
4245 (optinfo::add_printf): Delete.
4246 (optinfo::add_printf_va): Delete.
4247 (optinfo::add_gimple_stmt): Delete.
4248 (optinfo::add_gimple_expr): Delete.
4249 (optinfo::add_tree): Delete.
4250 (optinfo::add_symtab_node): Delete.
4251 (optinfo::add_dec): Delete.
4252 (optinfo::add_poly_int): Delete.
4253 (optinfo_item::optinfo_item): Remove "owned" param.
4254 (class optinfo_item): Remove field "m_owned".
4255
4256 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4257
4258 PR middle-end/86705
4259 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
4260 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
4261 requested variable alignment.
4262 (expand_one_ssa_partition): Likewise.
4263 (expand_one_var): Likewise.
4264
4265 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4266
4267 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4268 to speculation_safe_value_not_needed.
4269
4270 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4271
4272 * targhooks.h (speculation_safe_value_not_needed): New prototype.
4273 * targhooks.c (speculation_safe_value_not_needed): New function.
4274 * target.def (have_speculation_safe_value): Update documentation.
4275 * doc/tm.texi: Regenerated.
4276
4277 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4278
4279 * config/aarch64/iterators.md (ALLI_TI): New iterator.
4280 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
4281 expand.
4282 (despeculate_copy<ALLI:mode>_insn): New insn.
4283 (despeculate_copyti_insn): New insn.
4284 (despeculate_simple<ALLI:mode>): New insn
4285 (despeculate_simpleti): New insn.
4286 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
4287 function.
4288 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
4289 aarch64_speculation_safe_value.
4290 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
4291
4292 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4293
4294 * config/aarch64/aarch64-speculation.cc: New file.
4295 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
4296 before pass_reorder_blocks.
4297 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
4298 prototype.
4299 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
4300 X14 and X15 when tracking speculation.
4301 * config/aarch64/aarch64.md (register name constants): Add
4302 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
4303 (unspec): Add UNSPEC_SPECULATION_TRACKER.
4304 (speculation_barrier): New insn attribute.
4305 (cmp<mode>): Allow SP in comparisons.
4306 (speculation_tracker): New insn.
4307 (speculation_barrier): Add speculation_barrier attribute.
4308 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
4309 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
4310 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
4311
4312 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4313
4314 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
4315 aarch64_track_speculation is true.
4316 (tb<optab><mode>1): Likewise.
4317 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
4318 generate CB[N]Z when tracking speculation.
4319 (aarch64_split_compare_and_swap): Likewise.
4320 (aarch64_split_atomic_op): Likewise.
4321
4322 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4323
4324 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
4325
4326 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4327
4328 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
4329 (speculation_barrier): New insn.
4330
4331 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4332
4333 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
4334 * config/arm/arm.md (speculation_barrier): New expand.
4335 (speculation_barrier_insn): New pattern.
4336
4337 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4338
4339 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4340 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4341 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4342 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4343 list.
4344 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4345 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4346 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4347 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4348 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4349 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4350 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4351 * builtins.c (expand_speculation_safe_value): New function.
4352 (expand_builtin): Call it.
4353 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4354 * doc/extend.texi: Document __builtin_speculation_safe_value.
4355 * doc/md.texi: Document "speculation_barrier" pattern.
4356 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4357 TARGET_HAVE_SPECULATION_SAFE_VALUE.
4358 * doc/tm.texi: Regenerated.
4359 * target.def (have_speculation_safe_value, speculation_safe_value): New
4360 hooks.
4361 * targhooks.c (default_have_speculation_safe_value): New function.
4362 (default_speculation_safe_value): New function.
4363 * targhooks.h (default_have_speculation_safe_value): Add prototype.
4364 (default_speculation_safe_value): Add prototype.
4365
4366 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4367
4368 * dump-context.h (dump_context::dump_loc): New decl.
4369 * dumpfile.c (dump_context::dump_loc): New member function.
4370 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4371 and dump_gimple_stmt.
4372 (dump_context::dump_gimple_expr_loc): Likewise, using
4373 dump_gimple_expr.
4374 (dump_context::dump_generic_expr_loc): Likewise, using
4375 dump_generic_expr.
4376 (dump_context::dump_printf_loc_va): Likewise, using
4377 dump_printf_va.
4378 (dump_context::begin_scope): Explicitly using the global function
4379 "dump_loc", rather than the member function.
4380
4381 2018-07-31 Martin Sebor <msebor@redhat.com>
4382
4383 PR tree-optimization/86741
4384 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4385
4386 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
4387
4388 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4389 depend on whether prefetch instructions will be emitted or not.
4390 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4391 will be emitted or not.
4392 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4393 (TARGET_SETMEM_PFD): New macros.
4394
4395 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4396
4397 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4398 (NULL_STMT_VEC_INFO): Delete.
4399 (stmt_vec_info::operator*): Likewise.
4400 (stmt_vec_info::operator gimple *): Likewise.
4401 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4402 of NULL_STMT_VEC_INFO.
4403 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4404 (vect_reassociating_reduction_p): Likewise.
4405 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4406 (vectorizable_store): Likewise.
4407 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4408 (vec_info::free_stmt_vec_infos): Likewise.
4409
4410 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4411
4412 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4413 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4414
4415 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4416
4417 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4418 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4419 (vec_info::free_stmt_vec_info): New private member functions.
4420 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4421 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4422 * tree-parloops.c (gather_scalar_reductions): Remove calls to
4423 set_stmt_vec_info_vec and free_stmt_vec_infos.
4424 * tree-vect-loop.c (_loop_vec_info): Remove call to
4425 set_stmt_vec_info_vec.
4426 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4427 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4428 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4429 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4430 (vec_info::free_stmt_vec_info): ...these new functions. Remove
4431 assignments in {vec_info::,}new_stmt_vec_info that are redundant
4432 with the clearing in the xcalloc.
4433 (stmt_vec_info_vec): Delete.
4434 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4435 (vectorize_loops): Likewise.
4436 (vec_info::~vec_info): Remove argument from call to
4437 free_stmt_vec_infos.
4438 (vec_info::add_stmt): Remove vinfo argument from call to
4439 new_stmt_vec_info.
4440
4441 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4442
4443 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4444 rather than a gimple stmt.
4445 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
4446 information for pattern statements when passed the original
4447 statement; instead wait to be passed the pattern statement itself.
4448 Don't call set_vinfo_for_stmt here.
4449 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4450 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4451 stmt_vec_infos here.
4452 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4453 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4454 stmt_vec_infos entry.
4455
4456 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4457
4458 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4459 * tree-vectorizer.c (vec_info::replace_stmt): New function.
4460 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4461 * tree-vect-stmts.c (vectorizable_call): Likewise.
4462 (vectorizable_simd_clone_call): Likewise.
4463
4464 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4465
4466 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4467 * tree-vectorizer.c (vec_info::remove_stmt): New function.
4468 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4469 * tree-vect-loop.c (vect_transform_loop): Likewise.
4470 * tree-vect-slp.c (vect_schedule_slp): Likewise.
4471 * tree-vect-stmts.c (vect_remove_stores): Likewise.
4472
4473 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4474
4475 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4476 (vect_dr_stmt): Delete.
4477 * tree-vectorizer.c (vec_info::lookup_dr): New function.
4478 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4479 of DR_VECT_AUX.
4480 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4481 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4482 (vect_verify_datarefs_alignment, vect_peeling_supportable)
4483 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4484 (vect_analyze_data_refs): Likewise.
4485 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
4486 argument.
4487 (vect_find_same_alignment_drs): Likewise.
4488 (vect_slp_analyze_node_dependences): Update calls accordingly.
4489 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4490 instead of DR_VECT_AUX.
4491 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4492 of a vector data references. Use vec_info::lookup_dr instead of
4493 DR_VECT_AUX.
4494 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4495 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4496 instead of DR_VECT_AUX.
4497
4498 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4499
4500 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4501 dr_vec_info.
4502 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4503 accordingly.
4504 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4505 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4506 (vect_gen_prolog_loop_niters): Likewise.
4507
4508 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4509
4510 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4511 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4512 (vect_known_alignment_in_bytes, vect_dr_behavior)
4513 (vect_get_scalar_dr_size): Take references as dr_vec_infos
4514 instead of data_references. Update calls to other routines for
4515 which the same change has been made.
4516 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4517 dr_vec_infos instead of stmt_vec_infos.
4518 (vect_analyze_data_ref_dependence): Update call accordingly.
4519 (vect_slp_analyze_data_ref_dependence)
4520 (vect_record_base_alignments): Use DR_VECT_AUX.
4521 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4522 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4523 (vector_alignment_reachable_p, vect_get_data_access_cost)
4524 (vect_peeling_supportable, vect_analyze_group_access_1)
4525 (vect_analyze_group_access, vect_analyze_data_ref_access)
4526 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4527 (vect_compile_time_alias, vect_small_gap_p)
4528 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4529 (vect_supportable_dr_alignment): Take references as dr_vec_infos
4530 instead of data_references. Update calls to other routines for
4531 which the same change has been made.
4532 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4533 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4534 (vect_slp_analyze_and_verify_node_alignment)
4535 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4536 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4537 (vect_setup_realignment): Use dr_vec_infos. Update calls after
4538 above changes.
4539 (_vect_peel_info::dr): Replace with...
4540 (_vect_peel_info::dr_info): ...this new field.
4541 (vect_peeling_hash_get_most_frequent)
4542 (vect_peeling_hash_choose_best_peeling): Update accordingly.
4543 (vect_peeling_hash_get_lowest_cost):
4544 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4545 routines for which the same change has been made.
4546 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4547 data_reference.
4548 * tree-vect-loop-manip.c (get_misalign_in_elems)
4549 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4550 above changes.
4551 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4552 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4553 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4554 (get_group_load_store_type, get_negative_load_store_type)
4555 (vect_get_data_ptr_increment, vectorizable_store)
4556 (vectorizable_load): Likewise.
4557 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4558 Update calls to other routines for which the same change has been made.
4559
4560 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4561
4562 * tree-vectorizer.h (vec_info::move_dr): New member function.
4563 (dataref_aux): Rename to...
4564 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4565 (_stmt_vec_info::dr_aux): Update accordingly.
4566 (_stmt_vec_info::data_ref_info): Delete.
4567 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4568 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4569 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4570 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4571 of data_ref.
4572 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4573 (STMT_VINFO_DR_INFO): New macro.
4574 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4575 (set_dr_misalignment): Update after rename of dataref_aux.
4576 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4577 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4578 initialization of STMT_VINFO_DATA_REF.
4579 * tree-vectorizer.c (vec_info::move_dr): New function.
4580 * tree-vect-patterns.c (vect_recog_bool_pattern)
4581 (vect_recog_mask_conversion_pattern)
4582 (vect_recog_gather_scatter_pattern): Use it.
4583 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4584 the "dr" and "stmt" fields of dr_vec_info instead of
4585 STMT_VINFO_DATA_REF.
4586
4587 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4588
4589 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4590 (is_pattern_stmt_p): Use it.
4591 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4592 on pattern statements.
4593
4594 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4595
4596 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4597 original stmt as a stmt_vec_info rather than a gimple stmt.
4598 (vect_pattern_recog_1): Take the statement directly as a
4599 stmt_vec_info, rather than via a gimple_stmt_iterator.
4600 Update call to vect_mark_pattern_stmts.
4601 (vect_pattern_recog): Update calls accordingly.
4602
4603 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4604
4605 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4606 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4607 a vect_def_type for the first argument.
4608 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4609 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4610 operand if it isn't defined by a vectorized statement.
4611 (vect_build_gather_load_calls): Remove the mask_dt argument and
4612 update calls to vect_get_vec_def_for_stmt_copy.
4613 (vectorizable_bswap): Likewise the dt argument.
4614 (vectorizable_call): Update calls to vectorizable_bswap and
4615 vect_get_vec_def_for_stmt_copy.
4616 (vectorizable_simd_clone_call, vectorizable_assignment)
4617 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4618 (vectorizable_comparison): Update calls to
4619 vect_get_vec_def_for_stmt_copy.
4620 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4621 vect_is_simple_use.
4622 (vect_get_loop_based_defs): Remove dt argument and update call
4623 to vect_get_vec_def_for_stmt_copy.
4624 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4625 and vect_get_vec_def_for_stmt_copy.
4626 (vectorizable_load): Update calls to vect_build_gather_load_calls
4627 and vect_get_vec_def_for_stmt_copy.
4628 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4629 (vectorizable_reduction, vectorizable_live_operation): Update calls
4630 to vect_get_vec_def_for_stmt_copy.
4631
4632 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4633
4634 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4635 and gimple stmt arguments with a stmt_vec_info.
4636 (vect_record_base_alignments): Update calls accordingly.
4637 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4638 and gimple stmt arguments with a stmt_vec_info.
4639 (vect_build_slp_tree_1): Remove vinfo argument and update call
4640 to vect_record_max_nunits.
4641 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4642 and vect_record_max_nunits.
4643
4644 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4645
4646 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4647 file and take a stmt_vec_info instead of a gimple stmt.
4648 (supportable_widening_operation, vect_finish_replace_stmt)
4649 (vect_finish_stmt_generation, vect_get_store_rhs)
4650 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4651 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4652 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4653 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4654 (vect_create_data_ref_ptr, bump_vector_ptr)
4655 (vect_permute_store_chain, vect_setup_realignment)
4656 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4657 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4658 (vectorizable_reduction, vectorizable_induction)
4659 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4660 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4661 than gimple stmts as arguments.
4662 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4663 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4664 (can_group_stmts_p, vect_check_gather_scatter)
4665 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4666 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4667 (vect_permute_load_chain, vect_shift_permute_load_chain)
4668 (vect_transform_grouped_load)
4669 (vect_record_grouped_load_vectors): Likewise.
4670 * tree-vect-loop.c (vect_fixup_reduc_chain)
4671 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4672 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4673 (vectorizable_reduction, vectorizable_induction)
4674 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4675 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4676 (vect_get_load_store_mask): Likewise.
4677 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4678 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4679 * tree-vect-stmts.c (vect_mark_relevant)
4680 (is_simple_and_all_uses_invariant)
4681 (exist_non_indexing_operands_for_use_p, process_use)
4682 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4683 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4684 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4685 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4686 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4687 (get_negative_load_store_type, get_load_store_type)
4688 (vect_check_load_store_mask, vect_check_store_rhs)
4689 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4690 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4691 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4692 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4693 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4694 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4695 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4696 (supportable_widening_operation): Likewise.
4697
4698 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4699
4700 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4701 a stmt_vec_info instead of a gcall.
4702 (vect_check_gather_scatter): Update call accordingly.
4703 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4704 of a gphi.
4705 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4706 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4707 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4708 instead of a gimple stmt.
4709 (vect_transform_loop): Update calls accordingly.
4710 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4711 stmt_vec_infos instead of gimple stmts.
4712 (vect_analyze_slp_instance): Update use accordingly.
4713 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4714 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4715 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4716 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4717 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4718 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4719 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4720 down to subroutines.
4721
4722 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4723
4724 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4725 of the worklist from a vector of gimple stmts to a vector of
4726 stmt_vec_infos.
4727 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4728 (vect_mark_stmts_to_be_vectorized): Likewise
4729
4730 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4731
4732 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4733 statement before passing it to vect_analyze_stmt.
4734 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4735 the chain of phi vector definitions. Track the exit phi via its
4736 stmt_vec_info.
4737 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4738 STMT_VINFO_REDUC_DEF.
4739 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4740 stmt_vec_infos to handle the statement chains.
4741 (vect_get_slp_defs): Record the first statement in the node
4742 using a stmt_vec_info.
4743 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4744 statements here and pass their stmt_vec_info down to subroutines.
4745 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4746 down to vect_finish_stmt_generation.
4747 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4748 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4749 stmt_vec_infos to subroutines.
4750 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4751 chains.
4752
4753 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4754
4755 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4756 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4757 (vect_permute_store_chain, vect_setup_realignment)
4758 (vect_permute_load_chain, vect_shift_permute_load_chain)
4759 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4760 stmts internally, and when passing values to other vectorizer routines.
4761 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4762 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4763 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4764 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4765 (vectorizable_reduction, vectorizable_induction)
4766 (vectorizable_live_operation, vect_transform_loop_stmt)
4767 (vect_transform_loop): Likewise.
4768 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4769 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4770 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4771 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4772 (vect_slp_analyze_node_operations_1): Likewise.
4773 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4774 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4775 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4776 (vect_finish_stmt_generation_1, get_group_load_store_type)
4777 (get_load_store_type, vect_build_gather_load_calls)
4778 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4779 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4780 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4781 (vectorizable_store, vectorizable_load, vectorizable_condition)
4782 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4783 (supportable_widening_operation): Likewise.
4784 (vect_get_vector_types_for_stmt): Likewise.
4785 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4786
4787 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4788
4789 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4790 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4791 (vect_permute_store_chain, vect_permute_load_chain)
4792 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4793 repeated stmt_vec_info lookups.
4794 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4795 (vect_update_ivs_after_vectorizer): Likewise.
4796 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4797 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4798 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4799 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4800 (vect_bb_slp_scalar_cost): Likewise.
4801 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4802
4803 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4804
4805 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4806 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4807 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4808 to get gassigns and gcalls, rather than operating on generc gimple
4809 stmts.
4810 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4811 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4812 (vectorizable_load, vect_analyze_stmt): Likewise.
4813 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4814
4815 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4816
4817 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4818 return stmt_vec_infos rather than gimple stmts. Do not accept
4819 null arguments.
4820 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4821 of a gimple stmt.
4822 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4823 Update use of get_later_stmt.
4824 (vect_get_constant_vectors): Update call accordingly.
4825 (vect_schedule_slp_instance): Likewise
4826 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4827 (vect_slp_analyze_instance_dependence): Likewise.
4828 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4829
4830 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4831
4832 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4833 (stmt_info_for_cost::stmt_info): ...this new field.
4834 (add_stmt_costs): Update accordingly.
4835 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4836 (vect_get_known_peeling_cost): Likewise.
4837 (vect_estimate_min_profitable_iters): Likewise.
4838 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4839
4840 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4841
4842 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4843 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4844 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4845 accordingly.
4846 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4847
4848 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4849
4850 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4851 a gimple stmt to a stmt_vec_info.
4852 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4853
4854 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4855
4856 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4857 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4858 (_loop_vec_info::reduction_chains): Likewise.
4859 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4860 accordingly.
4861 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4862
4863 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4864
4865 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4866 a gimple stmt to a stmt_vec_info.
4867 (_stmt_vec_info::next_element): Likewise.
4868 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4869 (vect_slp_analyze_and_verify_node_alignment)
4870 (vect_analyze_group_access_1, vect_analyze_group_access)
4871 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4872 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4873 (vect_supportable_dr_alignment): Update accordingly.
4874 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4875 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4876 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4877 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4878 * tree-vect-slp.c (vect_build_slp_tree_1)
4879 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4880 (vect_split_slp_store_group, vect_analyze_slp_instance)
4881 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4882 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4883 (get_group_load_store_type, get_load_store_type)
4884 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4885 (vect_transform_stmt, vect_remove_stores): Likewise.
4886
4887 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4888
4889 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4890 than a gimple stmt.
4891 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4892 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4893 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4894 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4895 (vector_alignment_reachable_p, vect_get_data_access_cost)
4896 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4897 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4898 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4899 (vect_analyze_group_access_1, vect_analyze_group_access)
4900 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4901 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4902 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4903 result of vect_dr_stmt and use the stmt_vec_info instead of
4904 the associated gimple stmt.
4905 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4906 (vect_gen_prolog_loop_niters): Likewise.
4907 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4908
4909 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4910
4911 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4912 to a vec<stmt_vec_info>.
4913 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4914 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4915 vec<stmt_vec_info>.
4916 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4917 to a vec<stmt_vec_info>.
4918 (bst_traits::value_type, bst_traits::value_type): Likewise.
4919 (bst_traits::hash): Update accordingly.
4920 (vect_get_and_check_slp_defs): Change the stmts parameter from
4921 a vec<gimple *> to a vec<stmt_vec_info>.
4922 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4923 (vect_build_slp_tree): Likewise.
4924 (vect_build_slp_tree_2): Likewise. Update uses of
4925 SLP_TREE_SCALAR_STMTS.
4926 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4927 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4928 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4929 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4930 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4931 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4932 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4933 (vect_get_constant_vectors, vect_get_slp_defs)
4934 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4935 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4936 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4937 instead of gimple stmts.
4938 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4939 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4940 (vect_slp_analyze_instance_dependence): Update uses of
4941 SLP_TREE_SCALAR_STMTS.
4942 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4943 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4944 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4945 (get_initial_defs_for_reduction): Likewise.
4946 (vect_create_epilog_for_reduction): Likewise.
4947 (vectorize_fold_left_reduction): Likewise.
4948 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4949 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4950 (can_vectorize_live_stmts): Likewise.
4951
4952 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4953
4954 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4955 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4956 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4957 than gimple stmts.
4958 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4959 of a gimple stmt.
4960 (gather_scalar_reductions): Update after above interface changes.
4961 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4962 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4963 than gimple stmts.
4964 (vect_force_simple_reduction): Likewise.
4965 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4966 LOOP_VINFO_REDUCTIONS.
4967 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4968
4969 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4970
4971 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4972 a gimple stmt to a stmt_vec_info.
4973 * tree-vect-loop.c (vect_active_double_reduction_p)
4974 (vect_force_simple_reduction, vectorizable_reduction): Update
4975 accordingly.
4976
4977 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4978
4979 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4980 vec<gimple *> to a vec<stmt_vec_info>.
4981 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4982 the reduction_phis argument from a vec<gimple *> to a
4983 vec<stmt_vec_info>.
4984 (vectorizable_reduction): Likewise the phis local variable that
4985 is passed to vect_create_epilog_for_reduction. Update for new type
4986 of SLP_TREE_VEC_STMTS.
4987 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4988 (vectorizable_live_operation): Likewise.
4989 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4990 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4991
4992 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4993
4994 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4995 a gimple stmt to a stmt_vec_info.
4996 (vectorizable_condition, vectorizable_live_operation)
4997 (vectorizable_reduction, vectorizable_induction): Pass back the
4998 vectorized statement as a stmt_vec_info.
4999 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
5000 use of STMT_VINFO_VEC_STMT.
5001 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
5002 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
5003 as stmt_vec_infos rather than gimple stmts.
5004 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
5005 to a stmt_vec_info.
5006 (vectorizable_live_operation): Likewise.
5007 (vectorizable_reduction, vectorizable_induction): Likewise,
5008 updating use of STMT_VINFO_VEC_STMT.
5009 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
5010 of STMT_VINFO_VEC_STMT.
5011 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
5012 (vectorizable_simd_clone_call, vectorizable_conversion)
5013 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5014 (vectorizable_store, vectorizable_load, vectorizable_condition)
5015 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
5016 from a gimple stmt to a stmt_vec_info.
5017 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
5018 pointer to a stmt_vec_info to the vectorizable_* routines.
5019
5020 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5021
5022 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
5023 a gimple stmt to a stmt_vec_info.
5024 (is_pattern_stmt_p): Update accordingly.
5025 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
5026 (vect_record_grouped_load_vectors): Likewise.
5027 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5028 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
5029 (vect_model_reduction_cost): Likewise.
5030 (vect_create_epilog_for_reduction): Likewise.
5031 (vectorizable_reduction, vectorizable_induction): Likewise.
5032 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5033 Return the stmt_vec_info for the pattern statement.
5034 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
5035 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
5036 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5037 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
5038 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5039 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
5040 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
5041 (free_stmt_vec_info, vect_is_simple_use): Likewise.
5042
5043 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5044
5045 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
5046 (vect_finish_stmt_generation): Likewise.
5047 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5048 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
5049 (vect_build_gather_load_calls): Use the return value of the above
5050 functions instead of a separate call to vinfo_for_stmt. Use narrow
5051 scopes for the input gimple stmt and wider scopes for the associated
5052 stmt_vec_info. Use vec_info::lookup_def when setting these
5053 stmt_vec_infos from an SSA_NAME definition.
5054 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5055 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5056 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5057 (vectorizable_store, vectorizable_load, vectorizable_condition)
5058 (vectorizable_comparison): Likewise.
5059 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
5060 (vectorizable_reduction): Likewise.
5061
5062 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5063
5064 * tree-vectorizer.h (vect_is_simple_use): Add an optional
5065 stmt_vec_info * parameter before the optional gimple **.
5066 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5067 (process_use, vect_get_vec_def_for_operand_1): Update callers.
5068 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
5069 * tree-vect-loop.c (vectorizable_reduction): Likewise.
5070 (vectorizable_live_operation): Likewise.
5071 * tree-vect-patterns.c (type_conversion_p): Likewise.
5072 (vect_look_through_possible_promotion): Likewise.
5073 (vect_recog_rotate_pattern): Likewise.
5074 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5075
5076 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5077
5078 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
5079 a typedef to a wrapper class.
5080 (NULL_STMT_VEC_INFO): New macro.
5081 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
5082 (stmt_vec_info::operator*): New function.
5083 (stmt_vec_info::operator gimple *): Likewise.
5084 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
5085 (add_stmt_costs): Likewise.
5086 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
5087 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5088 (vect_get_known_peeling_cost): Likewise.
5089 (vect_estimate_min_profitable_iters): Likewise.
5090 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5091 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
5092 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5093 (vectorizable_store, free_stmt_vec_infos): Likewise.
5094 (new_stmt_vec_info): Change return type of xcalloc to
5095 _stmt_vec_info *.
5096
5097 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5098
5099 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
5100 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
5101 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
5102 a single_imm_use-based sequence.
5103 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
5104
5105 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5106
5107 * tree-vectorizer.h (vec_info::lookup_def): Declare.
5108 * tree-vectorizer.c (vec_info::lookup_def): New function.
5109 * tree-vect-patterns.c (vect_get_internal_def): Use it.
5110 (vect_widened_op_tree): Likewise.
5111 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5112 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
5113 (vectorizable_reduction): Likewise.
5114 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
5115 of a gimple *.
5116 (vect_is_slp_reduction): Update calls accordingly. Use
5117 vec_info::lookup_def.
5118 (vect_is_simple_reduction): Likewise
5119 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
5120
5121 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5122
5123 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
5124 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
5125 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
5126 of vinfo_for_stmt.
5127 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
5128 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
5129 (vect_update_vf_for_slp, vect_analyze_loop_operations)
5130 (vect_is_slp_reduction, vectorizable_induction)
5131 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
5132 * tree-vect-patterns.c (vect_init_pattern_stmt):
5133 (vect_determine_min_output_precision_1, vect_determine_precisions)
5134 (vect_pattern_recog): Likewise.
5135 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
5136 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
5137 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
5138 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
5139 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
5140 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
5141 info field from a loop to a loop_vec_info.
5142
5143 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5144
5145 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
5146 (vec_info::add_stmt): Declare.
5147 * tree-vectorizer.c (vec_info::add_stmt): New function.
5148 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
5149 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
5150 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5151 (vectorizable_induction): Likewise.
5152 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
5153 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5154 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
5155 (vectorizable_load): Likewise.
5156 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5157 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
5158 (vect_recog_gather_scatter_pattern): Likewise.
5159 (append_pattern_def_seq): Likewise. Remove a check that is
5160 performed by add_stmt itself.
5161
5162 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5163
5164 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
5165 which make_ssa_name was called with new_stmt before new_stmt
5166 had been created.
5167
5168 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5169
5170 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
5171 split out from...
5172 (vect_is_slp_reduction): ...here...
5173 (vect_is_simple_reduction): ...and here. Remove repetition of tests
5174 that are already known to be false.
5175
5176 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5177
5178 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
5179 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
5180 STMT_VINFO_NUM_SLP_USES when it's true.
5181 (vect_free_slp_instance): Add a final_p parameter and pass it to
5182 vect_free_slp_tree.
5183 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
5184 (vect_analyze_slp_instance): Likewise.
5185 (vect_slp_analyze_operations): Likewise.
5186 (vect_slp_analyze_bb_1): Likewise.
5187 * tree-vectorizer.c (vec_info): Likewise.
5188 * tree-vect-loop.c (vect_transform_loop): Likewise.
5189
5190 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5191
5192 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5193 function is not called for second and subsequent members of
5194 a reduction group.
5195
5196 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
5197
5198 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
5199 cases for nested loops from here to ...
5200 (vect_create_epilog_for_reduction): ...here. Only call
5201 vect_is_simple_use for inner-loop reductions.
5202
5203 2018-07-31 Martin Liska <mliska@suse.cz>
5204
5205 PR gcov-profile/85338
5206 PR gcov-profile/85350
5207 PR gcov-profile/85372
5208 * profile.c (struct location_triplet): New.
5209 (struct location_triplet_hash): Likewise.
5210 (output_location): Do not output a BB that
5211 is already recorded for a line.
5212 (branch_prob): Use streamed_locations.
5213
5214 2018-07-31 Martin Liska <mliska@suse.cz>
5215
5216 PR gcov-profile/85370
5217 * coverage.c (coverage_begin_function): Do not mark target
5218 clones as artificial functions.
5219
5220 2018-07-31 Martin Liska <mliska@suse.cz>
5221
5222 PR gcov-profile/83813
5223 PR gcov-profile/84758
5224 PR gcov-profile/85217
5225 PR gcov-profile/85332
5226 * profile.c (branch_prob): Do not record GOTO expressions
5227 for GIMPLE statements which locations are already streamed.
5228
5229 2018-07-31 Olivier Hainque <hainque@adacore.com>
5230
5231 * gcc.c (handle_spec_function): Accept a soft_matched_part
5232 argument, as do_spec_1. Pass it down to ...
5233 (eval_spec_function): Accept a soft_matched_part argument,
5234 and pass it down to ...
5235 (do_spec_2): Accept a soft_matched_part argument, and pass
5236 it down to do_spec_1.
5237 (do_spec_1): Pass soft_matched_part to handle_spec_function.
5238 (handle_braces): Update call to handle_spec_function.
5239 (driver::set_up_specs): Update calls to do_spec_2.
5240 (compare_debug_dump_opt_spec_function): Likewise.
5241 (compare_debug_self_opt_spec_function): Likewise.
5242
5243 2018-07-31 Olivier Hainque <hainque@adacore.com>
5244
5245 * common.opt (nolibc): New option.
5246 * doc/invoke.texi (Link Options): Document it.
5247 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
5248 * config/alpha/linux.h: Likewise.
5249 * config/arc/elf.h: Likewise.
5250 * config/arm/uclinux-elf.h: Likewise.
5251 * config/arm/unknown-elf.h: Likewise.
5252 * config/avr/avrlibc.h: Likewise.
5253 * config/bfin/bfin.h: Likewise.
5254 * config/bfin/linux.h: Likewise.
5255 * config/bfin/uclinux.h: Likewise.
5256 * config/darwin.h: Likewise.
5257 * config/darwin10.h: Likewise.
5258 * config/darwin12.h: Likewise.
5259 * config/gnu-user.h: Likewise.
5260 * config/lm32/uclinux-elf.h: Likewise.
5261 * config/pa/pa-hpux11.h: Likewise.
5262 * config/pa/pa64-hpux.h: Likewise.
5263 * config/sparc/sparc.h: Likewise.
5264
5265 2018-07-31 Olivier Hainque <hainque@adacore.com>
5266
5267 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
5268 undefined variables.
5269
5270 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5271
5272 PR target/86640
5273 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
5274 instead of GEN_INT.
5275
5276 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5277
5278 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5279 terminated string literal.
5280
5281 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
5282
5283 PR rtl-optimization/85160
5284 * combine.c (is_just_move): New function.
5285 (try_combine): Allow combining two instructions into two if neither of
5286 the original instructions was a move.
5287
5288 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
5289
5290 PR target/86673
5291 * doc/extend.texi (Global Register Variables): Discourage use of type
5292 qualifiers.
5293 (Local Register Variables): Likewise.
5294
5295 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
5296
5297 PR tree-optimization/86506
5298 * hwint.h (ceil_log2): Resync with hwint.c implementation.
5299
5300 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
5301
5302 PR target/86547
5303 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
5304 hard_regno, make sure no insn between `from` and `to` clobbers it.
5305
5306 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
5307 Tom de Vries <tdevries@suse.de>
5308
5309 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
5310 (PTX_DEFAULT_RUNTIME_DIM): ... this.
5311 (nvptx_goacc_validate_dims): Set default worker and gang dims to
5312 PTX_DEFAULT_RUNTIME_DIM.
5313 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
5314
5315 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
5316
5317 * config/pa/pa.c (pa_output_addr_vec): Align address table.
5318 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
5319 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
5320
5321 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
5322
5323 * config/rs6000/constraints.md (wG constraint): Delete, no longer
5324 used.
5325 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
5326 predicate to reflect toc fusion has been deleted.
5327 (toc_fusion_mem_raw): Delete, no longer used.
5328 (toc_fusion_mem_wrapped): Likewise.
5329 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
5330 fusion mask bit.
5331 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
5332 Delete, no longer used.
5333 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
5334 meant to be used for toc fusion.
5335 (rs6000_debug_print_mode): Delete toc fusion debugging.
5336 (rs6000_debug_reg_global): Likewise.
5337 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
5338 fusion and secondary reload support that were never used.
5339 (rs6000_option_override_internal): Delete TOC fusion, that was only
5340 partially defined, and it did not work unless you also used the
5341 -mcmodel= switch.
5342 (rs6000_legitimate_address_p): Delete TOC fusion support.
5343 (rs6000_opt_masks): Likewise.
5344 (fusion_wrap_memory_address): Delete function, no longer used.
5345 (fusion_split_address); Delete TOC fusion support.
5346 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5347 longer used with toc fusion being deleted.
5348 (TARGET_TOC_FUSION_FP): Likewise.
5349 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5350 UNSPEC.
5351 (toc fusion spliter): Delete TOC fusion support.
5352 (toc_fusionload_<mode>): Likewise.
5353 (toc_fusionload_di): Likewise.
5354 (fusion_gpr_load_<mode>): Delete generator function, this insn no
5355 longer needs to be named. Rename predicate to delete TOC fusion.
5356 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5357 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5358 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5359 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5360 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5361
5362 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
5363
5364 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5365 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
5366 __int128 in built-in function prototypes.
5367 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5368 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5369
5370 2018-07-27 Martin Sebor <msebor@redhat.com>
5371
5372 PR tree-optimization/86696
5373 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5374 types, including enums.
5375 (handle_char_store): Be prepared for the above function to fail.
5376
5377 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
5378
5379 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5380 when optimization level is lower than 2 or optimize for size.
5381
5382 2018-07-26 Martin Sebor <msebor@redhat.com>
5383
5384 PR tree-optimization/86043
5385 PR tree-optimization/86042
5386 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5387 (get_string_cst_length): Rename...
5388 (get_min_string_length): ...to this. Add argument.
5389 (handle_char_store): Extend to handle multi-character stores by
5390 MEM_REF.
5391 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
5392 * tree.h (initializer_zerop): Add argument.
5393
5394 2018-07-26 Jakub Jelinek <jakub@redhat.com>
5395
5396 PR middle-end/86660
5397 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5398 declare target to variables if they have always,{to,from,tofrom} map
5399 kinds.
5400
5401 2018-07-26 Martin Liska <mliska@suse.cz>
5402
5403 PR lto/86548
5404 * lto-wrapper.c: Add linker_output as prefix
5405 for ltrans_output_file.
5406
5407 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
5408
5409 PR rtl-optimization/85805
5410 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5411 value for hard registers if that was written in the same mode.
5412
5413 2018-07-26 Martin Liska <mliska@suse.cz>
5414
5415 PR gcov-profile/86536
5416 * gcov.c (format_gcov): Use printf format %.*f directly
5417 and do not handle special values.
5418
5419 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5420
5421 * common/config/arc/arc-common.c (arc_option_optimization_table):
5422 Update default optimizations for size.
5423
5424 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5425
5426 * config/arc/arc.md (movsf_insn): Add short instruction selection.
5427 * config/arc/constraints.md (CfZ): New constraint.
5428 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5429 (subsf3_fpu): Likewise.
5430 (cmpsf_fpu): Likewise.
5431 (cmpsf_fpu_uneq): Likewise.
5432
5433 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5434
5435 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5436 accesses as well.
5437 (arc_is_uncached_mem_p): uncached applies to both the variable and
5438 the pointer.
5439
5440 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5441
5442 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5443 register names.
5444
5445 2018-07-25 David Malcolm <dmalcolm@redhat.com>
5446
5447 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5448 field "m_scopes" from vec to auto_vec.
5449
5450 2018-07-25 Martin Liska <mliska@suse.cz>
5451
5452 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5453 return type.
5454
5455 2018-07-25 Richard Biener <rguenther@suse.de>
5456
5457 PR debug/86654
5458 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5459 special wrt context_die late.
5460 (gen_subprogram_die): Re-use DIEs in local scope.
5461
5462 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
5463
5464 PR tree-optimization/86644
5465 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
5466
5467 2018-07-25 Martin Liska <mliska@suse.cz>
5468
5469 PR middle-end/86645
5470 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5471 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5472
5473 2018-07-25 Martin Liska <mliska@suse.cz>
5474
5475 PR sanitizer/79635
5476 * params.def: Explain ASan abbreviation and provide
5477 a documentation link.
5478
5479 2018-07-24 Martin Sebor <msebor@redhat.com>
5480
5481 PR tree-optimization/86622
5482 PR tree-optimization/86532
5483 * builtins.h (string_length): Declare.
5484 * builtins.c (c_strlen): Correct handling of non-constant offsets.
5485 (check_access): Be prepared for non-constant length ranges.
5486 (string_length): Make extern.
5487 * expr.c (string_constant): Only handle the minor non-constant
5488 array index. Use string_constant to compute the length of
5489 a generic string constant.
5490
5491 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
5492
5493 PR tree-optimization/86618
5494 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5495 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5496
5497 2018-07-24 David Malcolm <dmalcolm@redhat.com>
5498
5499 PR tree-optimization/86636
5500 * json.cc (json::object::set): Fix comment. Add assertions.
5501 (json::array::append): Move here from json.h. Add comment and an
5502 assertion.
5503 (json::string::string): Likewise.
5504 * json.h (json::array::append): Move to json.cc.
5505 (json::string::string): Likewise.
5506 * optinfo-emit-json.cc
5507 (optrecord_json_writer::impl_location_to_json): Assert that we
5508 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5509 wrapper around it. Expand the location once, rather than three
5510 times.
5511 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5512 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5513 wrappers.
5514 (optrecord_json_writer::optinfo_to_json): Likewise, in four
5515 places. Fix some overlong lines.
5516
5517 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
5518
5519 * config/aarch64/aarch64-simd.md
5520 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5521 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5522 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5523 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5524 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5525 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5526 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5527 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5528 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5529
5530 2018-07-24 Jakub Jelinek <jakub@redhat.com>
5531
5532 PR middle-end/86627
5533 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5534 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
5535 and abs_d == d, do the power of two handling if profitable.
5536
5537 2018-07-24 Richard Biener <rguenther@suse.de>
5538
5539 * match.pd: Add BIT_FIELD_REF canonicalizations.
5540
5541 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5542
5543 PR c/86617
5544 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5545
5546 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5547
5548 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5549 terminated STRING_CST object.
5550
5551 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5552
5553 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5554
5555 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5556
5557 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5558 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5559 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5560 the elements into a register.
5561 (rs6000_split_v4si_init_di_reg): Delete.
5562 (rs6000_split_v4si_init): Delete.
5563 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5564 (vsx_init_v4si): Rewrite as a define_expand.
5565
5566 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5567
5568 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5569 zero_extend argument from memory): New.
5570
5571 2018-07-22 Martin Sebor <msebor@redhat.com>
5572
5573 PR bootstrap/86621
5574 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5575 diagnosing calls with unknown arguments unless -Walloca-larger-than
5576 is restricted to less than PTRDIFF_MAX bytes.
5577
5578 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5579
5580 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5581
5582 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5583
5584 * pretty-print.c (text_info::set_location): Remove redundant
5585 "line_table" parameter from call to rich_location::set_range.
5586
5587 2018-07-20 Martin Sebor <msebor@redhat.com>
5588
5589 PR middle-end/82063
5590 * builtins.c (expand_builtin_alloca): Adjust.
5591 * calls.c (alloc_max_size): Simplify.
5592 * cgraphunit.c (cgraph_node::expand): Adjust.
5593 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5594 variables.
5595 (frame_larger_than_size): Same.
5596 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5597 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5598 Initialize.
5599 * doc/invoke.texi (GCC Command Options): Document option arguments.
5600 Explain byte-size arguments and suffixes.
5601 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5602 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5603 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5604 * doc/options.texi (UInteger): Expand.
5605 (Host_Wide_Int, ByteSize): Document new properties.
5606 * final.c (final_start_function_1): Include sizes in an error message.
5607 * function.c (frame_offset_overflow): Same.
5608 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5609 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5610 Diagnose unbounded alloca calls only for limits of less than
5611 PTRDIFF_MAX.
5612 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5613 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5614 for alloca(0).
5615 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5616 only for limits of less than PTRDIFF_MAX.
5617 * langhooks-def.h (lhd_handle_option): Change function argument
5618 to HOST_WIDE_INT.
5619 * langhooks.c (lhd_handle_option): Same.
5620 * langhooks.h (handle_option): Same.
5621 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5622 ByteSize flags.
5623 (var_type, var_type_struct): Same.
5624 (var_set): Handle ByteSize flag.
5625 * optc-gen.awk: Add comments to output to ease debugging. Make
5626 use of HOST_WIDE_INT where appropriate.
5627 * opts-gen-save.awk: Use %lx to format unsigned long.
5628 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5629 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5630 arguments. Parse bytes-size suffixes.
5631 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5632 (enum_value_to_arg): Same.
5633 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5634 (handle_option): Adjust.
5635 (generate_option): Change function argument to HOST_WIDE_INT.
5636 (cmdline_handle_error): Adjust.
5637 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5638 (set_option): Change function argument to HOST_WIDE_INT.
5639 (option_enabled): Handle cl_host_wide_int.
5640 (get_option_state): Handle CLVC_SIZE.
5641 (control_warning_option): Same.
5642 * opts.c (common_handle_option): Change function argument to
5643 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5644 OPT_Wvla_larger_than_.
5645 * opts.h (enum cl_var_type): Add an enumerator.
5646 * stor-layout.c (layout_decl): Print a more meaningful warning.
5647 * toplev.c (output_stack_usage): Adjust.
5648
5649 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5650
5651 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5652 call to inline_expand_builtin_string_cmp.
5653 (expand_builtin_strcmp): Likewise.
5654 (expand_builtin_strncmp): Likewise.
5655 (inline_string_cmp): Delete the last parameter, change char_type_node
5656 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5657 two operands.
5658 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5659 the inlining expansion on target where the type of the call has same or
5660 narrower precision than unsigned char.
5661
5662 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5663
5664 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5665 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5666 * common.opt (fsave-optimization-record): New option.
5667 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5668 * doc/invoke.texi (-fsave-optimization-record): New option.
5669 * dumpfile.c: Include "optinfo-emit-json.h".
5670 (struct kv_pair): Move to coretypes.h.
5671 (optgroup_options): Make non-static.
5672 (dump_context::end_scope): Call
5673 optimization_records_maybe_pop_dump_scope.
5674 * dumpfile.h (optgroup_options): New decl.
5675 * json.cc: New file.
5676 * json.h: New file.
5677 * optinfo-emit-json.cc: New file.
5678 * optinfo-emit-json.h: New file.
5679 * optinfo.cc: Include "optinfo-emit-json.h".
5680 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5681 (optinfo_enabled_p): Check optimization_records_enabled_p.
5682 (optinfo_wants_inlining_info_p): Likewise.
5683 * optinfo.h: Update comment.
5684 * profile-count.c (profile_quality_as_string): New function.
5685 * profile-count.h (profile_quality_as_string): New decl.
5686 (profile_count::quality): New accessor.
5687 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5688 and optinfo_emit_json_cc_tests.
5689 * selftest.h (selftest::json_cc_tests): New decl.
5690 (selftest::optinfo_emit_json_cc_tests): New decl.
5691 * toplev.c: Include "optinfo-emit-json.h".
5692 (compile_file): Call optimization_records_finish.
5693 (do_compile): Call optimization_records_start.
5694 * tree-ssa-live.c: Include optinfo.h.
5695 (remove_unused_scope_block_p): Retain inlining information if
5696 optinfo_wants_inlining_info_p returns true.
5697
5698 2018-07-20 Richard Biener <rguenther@suse.de>
5699
5700 PR debug/86585
5701 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5702 to cover -flto-partition=none.
5703
5704 2018-07-20 Martin Liska <mliska@suse.cz>
5705
5706 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5707 (get_decl_source_range): Remove unused function.
5708
5709 2018-07-20 Richard Biener <rguenther@suse.de>
5710
5711 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5712 (struct vn_phi_s): Likewise.
5713 (struct vn_reference_s): Likewise.
5714 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5715 for searching the slot of an entry known to be in the hash itself.
5716 (vn_phi_hasher::equal): Likewise.
5717 (vn_reference_hasher::equal): Likewise.
5718 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5719 globals.
5720 (optimistic_info, current_info): Remove, keeping only valid_info.
5721 (vn_reference_lookup_1): Remove fallback lookup.
5722 (vn_reference_lookup_2): Likewise.
5723 (vn_nary_op_lookup_1): Likewise.
5724 (vn_phi_lookup): Likewise.
5725 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5726 hash element.
5727 (vn_reference_insert): Adjust, chain the inserted hash element
5728 at last_inserted_ref.
5729 (vn_reference_insert_pieces): Likewise.
5730 (visit_reference_op_call): Likewise.
5731 (vn_nary_op_insert_into): Chain the inserted hash element at
5732 last_inserted_nary.
5733 (vn_nary_op_insert_pieces): Adjust.
5734 (vn_nary_op_insert): Likewise.
5735 (vn_nary_op_insert_stmt): Likewise.
5736 (vn_phi_insert): Adjust, chain the inserted hash element at
5737 last_inserted_phi.
5738 (process_scc): Remove clearing and copying the optimistic
5739 table. Instead remove elements inserted during an optimistic
5740 iteration from the single table we maintain.
5741 (init_scc_vn): Adjust.
5742 (free_scc_vn): Likewise.
5743 (sccvn_dom_walker::record_cond): Likewise.
5744 (sccvn_dom_walker::after_dom_children): Likewise.
5745
5746 2018-07-19 Martin Sebor <msebor@redhat.com>
5747
5748 PR tree-optimization/84047
5749 PR tree-optimization/83776
5750 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5751 (check_array_bounds): Call it.
5752
5753 2018-07-19 Martin Sebor <msebor@redhat.com>
5754
5755 * align.h (align_flags): Use member initialization.
5756
5757 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5758
5759 * Makefile.in (OBJS): Add optinfo.o.
5760 * coretypes.h (class symtab_node): New forward decl.
5761 (struct cgraph_node): New forward decl.
5762 (class varpool_node): New forward decl.
5763 * dump-context.h: New file.
5764 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5765 "tree-pass.h".
5766 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5767 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5768 (set_alt_dump_file): Likewise.
5769 (dump_context::~dump_context): New dtor.
5770 (dump_gimple_stmt): Move implementation to...
5771 (dump_context::dump_gimple_stmt): ...this new member function.
5772 Add the stmt to any pending optinfo, creating one if need be.
5773 (dump_gimple_stmt_loc): Move implementation to...
5774 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5775 Start a new optinfo and add the stmt to it.
5776 (dump_gimple_expr): Move implementation to...
5777 (dump_context::dump_gimple_expr): ...this new member function.
5778 Add the stmt to any pending optinfo, creating one if need be.
5779 (dump_gimple_expr_loc): Move implementation to...
5780 (dump_context::dump_gimple_expr_loc): ...this new member function.
5781 Start a new optinfo and add the stmt to it.
5782 (dump_generic_expr): Move implementation to...
5783 (dump_context::dump_generic_expr): ...this new member function.
5784 Add the tree to any pending optinfo, creating one if need be.
5785 (dump_generic_expr_loc): Move implementation to...
5786 (dump_context::dump_generic_expr_loc): ...this new member
5787 function. Add the tree to any pending optinfo, creating one if
5788 need be.
5789 (dump_printf): Move implementation to...
5790 (dump_context::dump_printf_va): ...this new member function. Add
5791 the text to any pending optinfo, creating one if need be.
5792 (dump_printf_loc): Move implementation to...
5793 (dump_context::dump_printf_loc_va): ...this new member function.
5794 Start a new optinfo and add the stmt to it.
5795 (dump_dec): Move implementation to...
5796 (dump_context::dump_dec): ...this new member function. Add the
5797 value to any pending optinfo, creating one if need be.
5798 (dump_context::dump_symtab_node): New member function.
5799 (dump_context::get_scope_depth): New member function.
5800 (dump_context::begin_scope): New member function.
5801 (dump_context::end_scope): New member function.
5802 (dump_context::ensure_pending_optinfo): New member function.
5803 (dump_context::begin_next_optinfo): New member function.
5804 (dump_context::end_any_optinfo): New member function.
5805 (dump_context::s_current): New global.
5806 (dump_context::s_default): New global.
5807 (dump_scope_depth): Delete global.
5808 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5809 (dump_symtab_node): New function.
5810 (get_dump_scope_depth): Reimplement in terms of dump_context.
5811 (dump_begin_scope): Likewise.
5812 (dump_end_scope): Likewise.
5813 (selftest::temp_dump_context::temp_dump_context): New ctor.
5814 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5815 (selftest::verify_item): New function.
5816 (ASSERT_IS_TEXT): New macro.
5817 (ASSERT_IS_TREE): New macro.
5818 (ASSERT_IS_GIMPLE): New macro.
5819 (selftest::test_capture_of_dump_calls): New test.
5820 (selftest::dumpfile_c_tests): Call it.
5821 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5822 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5823 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5824 descriptive comment.
5825 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5826 (dump_node, dump_bb): Move these unrelated decls.
5827 (class dump_manager): Add leading comment.
5828 * optinfo.cc: New file.
5829 * optinfo.h: New file.
5830
5831 2018-07-19 Michael Collison <michael.collison@arm.com>
5832 Richard Henderson <rth@redhat.com>
5833
5834 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5835 (subti): Handle op1 zero.
5836 (subvti4, usub4ti4): New.
5837 (*sub<GPI>3_compare1_imm): New.
5838 (sub<GPI>3_carryinCV): New.
5839 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5840 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5841
5842 2018-07-19 Michael Collison <michael.collison@arm.com>
5843 Richard Henderson <rth@redhat.com>
5844
5845 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5846 (addti3): Create simpler code if low part is already known to be 0.
5847 (addvti4, uaddvti4): New.
5848 (*add<GPI>3_compareC_cconly_imm): New.
5849 (*add<GPI>3_compareC_cconly): New.
5850 (*add<GPI>3_compareC_imm): New.
5851 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5852 handle constants within this pattern..
5853 (*add<GPI>3_compareV_cconly_imm): New.
5854 (*add<GPI>3_compareV_cconly): New.
5855 (*add<GPI>3_compareV_imm): New.
5856 (add<GPI>3_compareV): New.
5857 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5858 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5859 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5860 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5861 with 'comparison' operator.
5862 (*add<GPI>3_compareV_cconly_imm): Ditto.
5863 (*add<GPI>3_compareV_cconly): Ditto.
5864 (*add<GPI>3_compareV_imm): Ditto.
5865 (add<GPI>3_compareV): Ditto.
5866 (add<mode>3_carryinC): Ditto.
5867 (*add<mode>3_carryinC_zero): Ditto.
5868 (*add<mode>3_carryinC): Ditto.
5869 (add<mode>3_carryinV): Ditto.
5870 (*add<mode>3_carryinV_zero): Ditto.
5871 (*add<mode>3_carryinV): Ditto.
5872
5873 2018-07-19 Michael Collison <michael.collison@arm.com>
5874 Richard Henderson <rth@redhat.com>
5875
5876 * config/aarch64/aarch64-modes.def (CC_V): New.
5877 * config/aarch64/aarch64-protos.h
5878 (aarch64_addti_scratch_regs): Declare
5879 (aarch64_subvti_scratch_regs): Declare.
5880 (aarch64_expand_subvti): Declare.
5881 (aarch64_gen_unlikely_cbranch): Declare
5882 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5883 for signed overflow using CC_Vmode.
5884 (aarch64_get_condition_code_1): Handle CC_Vmode.
5885 (aarch64_gen_unlikely_cbranch): New function.
5886 (aarch64_addti_scratch_regs): New function.
5887 (aarch64_subvti_scratch_regs): New function.
5888 (aarch64_expand_subvti): New function.
5889
5890 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5891
5892 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5893 extension.
5894 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5895 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5896 extension.
5897
5898 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5899
5900 PR target/83009
5901 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5902 address check not strict.
5903
5904 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5905
5906 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5907 Umq with Umn.
5908 (store_pair_lanes<mode>): Likewise.
5909 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5910 enum value 'ADDR_QUERY_LDP_STP_N'.
5911 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5912 (aarch64_print_address_internal): Add declaration.
5913 (aarch64_print_ldpstp_address): Remove.
5914 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5915 (aarch64_print_operand): Change printing of 'y'.
5916 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5917 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5918 'true' rather than '1'.
5919 * config/aarch64/constraints.md (Uml): Likewise.
5920 (Uml): Rename to Umn.
5921 (Umq): Remove.
5922
5923 2018-07-19 Richard Biener <rguenther@suse.de>
5924
5925 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5926 a trailing array.
5927 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5928 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5929 (vn_reference_hasher): Likewise.
5930 (struct vn_tables_s): Remove obstack and alloc-pool members.
5931 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5932 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5933 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5934 (vn_reference_insert_pieces): Likewise.
5935 (alloc_vn_nary_op_noinit): Adjust.
5936 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5937 (vn_phi_eq): Adjust.
5938 (shared_lookup_phiargs): Remove.
5939 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5940 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5941 (visit_reference_op_call): Likewise.
5942 (copy_nary, copy_phi, copy_reference): Remove.
5943 (process_scc): Rewind the obstack when iterating. Do not
5944 copy the elements to valid_info but just move them from one
5945 hashtable to the other.
5946 (allocate_vn_table): Adjust.
5947 (free_vn_table): Likewise.
5948 (init_scc_vn): Likewise.
5949 (free_scc_vn): Likewise.
5950
5951 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5952
5953 PR target/86560
5954 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5955 indirect_return as function type attribute.
5956 (ix86_attribute_table): Change indirect_return to function
5957 type attribute.
5958 * doc/extend.texi: Update indirect_return attribute.
5959
5960 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5961
5962 * wide-int.h (widest2_int): New.
5963 * gimple-fold.c (arith_overflowed_p): Use it.
5964 * tree.h (widest2_int_cst): New.
5965 * tree-vrp.c (wide_int_binop_overflow): Rename from
5966 vrp_int_const_binop.
5967 Rewrite to work on trees.
5968 (extract_range_from_multiplicative_op_1): Abstract code to...
5969 (wide_int_range_min_max): ...here.
5970 (wide_int_range_cross_product): ...and here.
5971 (extract_range_from_binary_expr_1): Abstract overflow code to...
5972 (wide_int_range_mult_wrapping): ...here.
5973 * tree-vrp.h (wide_int_range_cross_product): New.
5974 (wide_int_range_mult_wrapping): New.
5975
5976 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5977 Julia Koval <julia.koval@intel.com>
5978
5979 * config/i386/x86-tune-costs.h (skylake_memcpy,
5980 skylake_memset): Replace rep_prefix with unrolling for size 512.
5981
5982 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5983
5984 PR middle-end/86544
5985 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5986 comparision with EQ_EXPR in last stmt.
5987
5988 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5989
5990 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5991 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5992 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5993 previously known as "PowerPC AltiVec Built-in Functions". Move
5994 some material to new subsubsections "PowerPC AltiVec Built-in
5995 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5996 ISA 2.07".
5997 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5998 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5999 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
6000 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
6001
6002 2018-07-18 Richard Biener <rguenther@suse.de>
6003
6004 PR tree-optimization/86557
6005 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
6006 EXACT_DIV_EXPR.
6007
6008 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
6009
6010 * config/s390/s390.c (s390_function_profiler): Generate CFI.
6011
6012 2018-07-17 Jeff Law <law@redhat.com>
6013
6014 * config/arm/arm.c (get_label_padding): Update for recent
6015 changes to label_to_alignment.
6016
6017 PR tree-optimization/86010
6018 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
6019
6020 * config/mips/mips.c (vr4130_align_insns): Update for recent
6021 changes to label_to_alignment.
6022
6023 * config/frv/frv.c (frv_label_align): Update for recent changes
6024 to label_to_alignment.
6025
6026 * config/nios2/nios2.c (nios2_label_align): Update for recent
6027 changes which dropped ALIGN_LABELS_LOG.
6028
6029 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
6030
6031 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
6032 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
6033
6034 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
6035
6036 * config/arc/arc.c (arc_label_align): Use align_labels instead of
6037 deprecated align_labels_log.
6038
6039 2018-07-17 Richard Biener <rguenther@suse.de>
6040
6041 PR lto/86456
6042 * dwarf2out.c (init_sections_and_labels): Always generate
6043 a debug_line_str_section for early LTO debug.
6044 (dwarf2out_finish): Reset debug_line_str_hash output early.
6045 Bump counter for extra dwarf5 .debug_loc labels to not conflict
6046 with fat LTO part.
6047 (dwarf2out_early_finish): Output debug_line_str.
6048
6049 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6050
6051 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
6052 index register on z196 or later.
6053
6054 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
6055
6056 * config/s390/s390.c (s390_default_align): Set default function
6057 alignment to 16.
6058 (s390_override_options_after_change): Call s390_default align.
6059 (s390_option_override_internal): Call s390_default_align.
6060 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
6061
6062 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6063
6064 PR middle-end/86542
6065 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
6066 to _looptemp_ clauses, other than the first two.
6067
6068 2018-07-17 Martin Liska <mliska@suse.cz>
6069
6070 * opts.c: Do not enable OPT_falign_* for -Os.
6071
6072 2018-07-17 Martin Liska <mliska@suse.cz>
6073
6074 * align.h (MAX_CODE_ALIGN): New.
6075 (MAX_CODE_ALIGN_VALUE): New.
6076 * common/config/i386/i386-common.c (ix86_handle_option):
6077 (MAX_CODE_ALIGN): Moved to align.h.
6078 * final.c (MAX_CODE_ALIGN): Likewise.
6079 * opts.c (parse_and_check_align_values):
6080 (MAX_CODE_ALIGN): Likewise.
6081 (MAX_CODE_ALIGN_VALUE): Likewise.
6082
6083 2018-07-17 Martin Liska <mliska@suse.cz>
6084
6085 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
6086 in order to fulfil coding style.
6087 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
6088 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6089 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6090 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
6091 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
6092 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
6093 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
6094 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
6095 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6096
6097 2018-07-17 Martin Liska <mliska@suse.cz>
6098
6099 * align.h: New file.
6100 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
6101 directly.
6102 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
6103 align_flags of label_to_alignment.
6104 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
6105 align_flags class.
6106 * config/m68k/m68k.c: Do not use removed align_labels_value and
6107 align_loops_value.
6108 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
6109 (LOOP_ALIGN): Likewise.
6110 (LABEL_ALIGN): Likewise.
6111 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6112 Remove not used macro.
6113 (rs6000_loop_align): Change return type to align_flags.
6114 (rs6000_loop_align_max_skip): Remove.
6115 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
6116 Change return type to align_flags.
6117 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
6118 Remove not used macro.
6119 (rs6000_loop_align): Change return type to align_flags.
6120 (rs6000_loop_align_max_skip): Remove.
6121 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
6122 * config/rx/rx-protos.h (rx_align_for_label): Make it
6123 static function.
6124 * config/rx/rx.c (rx_align_for_label): Change return type
6125 to align_flags.
6126 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
6127 macro definitions.
6128 into align_flags class.
6129 (LABEL_ALIGN): Likewise.
6130 (LOOP_ALIGN): Likewise.
6131 * config/s390/s390.c (s390_label_align): Use align_flags
6132 class member.
6133 (s390_asm_output_function_label): Likewise.
6134 * config/sh/sh.c (sh_override_options_after_change):
6135 Use align_flags class directly without macros.
6136 (find_barrier): Likewise.
6137 (barrier_align): Likewise.
6138 (sh_loop_align): Likewise.
6139 * config/spu/spu.c (spu_option_override):
6140 Use align_flags_tuple::get_value instead of removed macros.
6141 (spu_sched_init): Likewise.
6142 * config/spu/spu.h (GTY): Likewise.
6143 * config/visium/visium.c (visium_option_override):
6144 Set "8" as default secondary alignment.
6145 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
6146 in order to guarantee secondary alignment of 8.
6147 * coretypes.h: Include align.h header file.
6148 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
6149 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
6150 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
6151 * doc/tm.texi.in: Likewise.
6152 * final.c (struct label_alignment): Remove not used structure.
6153 (LABEL_ALIGN): Change type to align_flags.
6154 (LOOP_ALIGN): Likewise.
6155 (JUMP_ALIGN): Likewise.
6156 (default_loop_align_max_skip): Remove.
6157 (default_label_align_max_skip): Likewise.
6158 (default_jump_align_max_skip): Likewise.
6159 (default_label_align_after_barrier_max_skip):
6160 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
6161 (LABEL_TO_MAX_SKIP): Remove.
6162 (label_to_alignment): Return align_flags type instead of integer.
6163 (label_to_max_skip): Remove.
6164 (align_fuzz): Use align_flags type.
6165 (compute_alignments): Use align_flags type and use align_flags::max
6166 to combine multiple alignments.
6167 (grow_label_align): Grow vec instead of C array.
6168 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
6169 (shorten_branches): Use align_flags type and use align_flags::max
6170 to combine multiple alignments.
6171 (final_scan_insn_1): Remove usage of secondary alignment that comes
6172 from label alignment, but instead use proper secondary alignment
6173 which is computed in grow_label_align.
6174 * flags.h (struct align_flags_tuple): Move to align.h.
6175 (struct align_flags): Likewise.
6176 (state_align_loops): Rename to align_loops.
6177 (state_align_jumps): Rename to align_jumps.
6178 (state_align_labels): Rename to align_labels.
6179 (state_align_functions): Rename to align_functions.
6180 (align_loops_log): Remove.
6181 (align_jumps_log): Remove.
6182 (align_labels_log): Remove.
6183 (align_functions_log): Remove.
6184 (align_loops_max_skip): Remove.
6185 (align_jumps_max_skip): Remove.
6186 (align_labels_max_skip): Remove.
6187 (align_functions_max_skip): Remove.
6188 (align_loops_value): Remove.
6189 (align_jumps_value): Remove.
6190 (align_labels_value): Remove.
6191 (align_functions_value): Remove.
6192 * output.h (label_to_alignment): Change return type to align_flags.
6193 (label_to_max_skip): Remove.
6194 * target.def: Remove loop_align_max_skip, label_align_max_skip,
6195 jump_align_max_skip macros.
6196 * targhooks.h (default_loop_align_max_skip): Remove.
6197 (default_label_align_max_skip): Likewise.
6198 (default_jump_align_max_skip): Likewise.
6199 (default_label_align_after_barrier_max_skip): Remove.
6200 * toplev.c (read_log_maxskip): Use ::normalize function.
6201 (parse_N_M): Remove not used argument and also call ::normalize.
6202 (parse_alignment_opts): Do not pass unused arguments.
6203 * varasm.c (assemble_start_function): Use directly align_functions
6204 instead of removed macros.
6205 * system.h: Do not poison removed macros.
6206
6207 2018-07-17 Jakub Jelinek <jakub@redhat.com>
6208
6209 PR middle-end/86539
6210 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
6211 and cond temporaries don't have reference type if iterator has
6212 pointer type. For init use &for_pre_body instead of pre_p if
6213 for_pre_body is non-empty.
6214
6215 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6216
6217 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
6218 double-double modes to SFmode directly directly.
6219 (trunc<mode>sf2_fprs): Delete.
6220
6221 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6222
6223 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
6224 for conversions between IFmode and the decimal floating point modes.
6225 (init_float128_ieee): Use the correct names for conversions between
6226 KFmode and the decimal floating point modes.
6227
6228 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
6229
6230 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
6231 for the conversions between TDmode and IFmode.
6232 (init_float128_ieee): Use more correct names for the conversions
6233 between TDmode and KFmode.
6234
6235 2018-07-16 Jakub Jelinek <jakub@redhat.com>
6236
6237 PR tree-optimization/86526
6238 * builtins.c (expand_builtin_memcmp): Formatting fixes.
6239 (inline_expand_builtin_string_cmp): Likewise.
6240 (inline_string_cmp): Likewise. Use c_readstr instead of
6241 builtin_memcpy_read_str. Add unit_mode temporary.
6242
6243 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6244
6245 PR middle-end/86528
6246 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
6247 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
6248
6249 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
6250
6251 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
6252 Alphabetize prototypes of built-in functions, separating out
6253 built-in functions that are listed in this section but should be
6254 described elsewhere.
6255
6256 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
6257
6258 PR target/86511
6259 * expmed.c (emit_store_flag): Do not emit setcc followed by a
6260 conditional move when trapping comparison was split to a
6261 non-trapping one (and vice versa).
6262
6263 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6264
6265 * config/s390/s390.c (s390_function_profiler): Generate nops
6266 instead of profiler call sequences.
6267 * config/s390/s390.opt: Add the new option.
6268
6269 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6270
6271 * config/s390/s390.c (s390_function_profiler): Generate
6272 __mcount_loc section.
6273 * config/s390/s390.opt: Add the new option.
6274
6275 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
6276
6277 * common.opt: Add the new warning.
6278 * config/s390/s390.c (s390_function_profiler): Emit "brasl
6279 %r0,__fentry__" when -mfentry is specified.
6280 (s390_option_override_internal): Disallow -mfentry for 31-bit
6281 CPUs.
6282 * config/s390/s390.opt: Add the new option.
6283
6284 2018-07-16 Richard Biener <rguenther@suse.de>
6285
6286 PR lto/86523
6287 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
6288 for function-local FUNCTION_DECL and RESULT_DECL immediately.
6289
6290 2018-07-16 Martin Liska <mliska@suse.cz>
6291
6292 PR ipa/86529
6293 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
6294 to ::get_create.
6295
6296 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6297
6298 * config/arc/arcHS.md: Update ARCHS scheduling rules.
6299
6300 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
6301
6302 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
6303 for ARCHS4x.
6304 * config/arc/arc-cpus.def (hs4x): New cpu.
6305 (hs4xd): Likewise.
6306 * config/arc/arc-tables.opt: Regenerate.
6307 * config/arc/arc.c (arc_sched_issue_rate): New function.
6308 (TARGET_SCHED_ISSUE_RATE): Define.
6309 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
6310 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
6311 fpu_cvt.
6312 (attr tune): Add ARCHS4x tune values.
6313 (attr tune_dspmpy): Define.
6314 (*tst): Correct instruction type.
6315 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
6316 * config/arc/arcHS4x.md: New file.
6317 * config/arc/fpu.md: Update instruction type attributes.
6318 * config/arc/t-multilib: Regenerate.
6319
6320 2018-07-16 Tom de Vries <tdevries@suse.de>
6321
6322 PR debug/86455
6323 * var-tracking.c (vt_initialize): Fix pre_dec handling.
6324
6325 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6326
6327 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
6328 early clobber.
6329
6330 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
6331
6332 PR tree-optimization/86514
6333 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
6334 conversion to a boolean type from a type with greater precision.
6335
6336 2018-07-16 Tom de Vries <tdevries@suse.de>
6337
6338 * var-tracking.c (vt_initialize): Print adjusted insn slim if
6339 dump_flags request TDF_SLIM.
6340
6341 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
6342
6343 * fold-const.c (int_const_binop_1): Abstract...
6344 (wide_int_binop): ...wide int code here.
6345 (poly_int_binop): ...poly int code here.
6346 Abstract the rest of int_const_binop_1 into int_const_binop.
6347 * fold-const.h (wide_int_binop): New.
6348 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6349 Remove useless PLUS/MINUS_EXPR case.
6350 (zero_nonzero_bits_from_vr): Move wide int code...
6351 (zero_nonzero_bits_from_bounds): ...here.
6352 (extract_range_from_binary_expr_1): Move mask optimization code...
6353 (range_easy_mask_min_max): ...here.
6354 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6355 (range_easy_mask_min_max): New.
6356
6357 2018-07-15 Jeff Law <law@redhat.com>
6358
6359 PR target/85993
6360 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6361 block.
6362
6363 2018-07-14 Jim Wilson <jimw@sifive.com>
6364
6365 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6366
6367 2018-07-14 Paul Koning <ni1d@arrl.net>
6368
6369 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6370
6371 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
6372
6373 * lto-streamer-out.c (copy_function_or_variable): Dump info about
6374 copying section.
6375
6376 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
6377 Steve Munroe <munroesj52@gmail.com>
6378
6379 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6380 (_mm_andnot_si128): Likewise.
6381 (_mm_or_si128): Likewise.
6382 (_mm_xor_si128): Likewise.
6383
6384 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
6385
6386 PR middle-end/78809
6387 * builtins.c (expand_builtin_memcmp): Inline the calls first
6388 when result_eq is false.
6389 (expand_builtin_strcmp): Inline the calls first.
6390 (expand_builtin_strncmp): Likewise.
6391 (inline_string_cmp): New routine. Expand a string compare
6392 call by using a sequence of char comparison.
6393 (inline_expand_builtin_string_cmp): New routine. Inline expansion
6394 a call to str(n)cmp/memcmp.
6395 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6396 New option.
6397 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6398
6399 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
6400
6401 * config/arm/driver-arm.c: Include arm-native.h.
6402 (host_detect_local_cpu): Use auto-generated data tables.
6403 (vendors, arm_cpu_table): Delete. Move part information to ...
6404 * config/arm/arm-cpus.in: ... here.
6405 * config/arm/parsecpu.awk (gen_native): New function.
6406 (vendor, part): New CPU fields.
6407 (END): Add support for building the native CPU detection tables.
6408 * config/arm/t-arm (arm-native.h): Add build rule.
6409 (driver-arm.o): Add dependency on arm-native.h.
6410
6411 2018-07-13 Richard Biener <rguenther@suse.de>
6412
6413 PR middle-end/85974
6414 * match.pd (addr1 - addr2): Allow either of the operand to
6415 have a conversion.
6416
6417 2018-07-13 Tom de Vries <tdevries@suse.de>
6418
6419 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6420 in remap_ssa_name.
6421
6422 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
6423
6424 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6425 arrays instead of numbered variables.
6426
6427 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
6428
6429 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6430 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6431
6432 2018-07-13 Richard Biener <rguenther@suse.de>
6433
6434 PR debug/86452
6435 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6436 instead of get_context_die.
6437
6438 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
6439 Richard Biener <rguenther@suse.de>
6440
6441 PR middle-end/86489
6442 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6443 that the loop latch destination where phi is defined.
6444
6445 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
6446
6447 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6448 (riscv_expand_epilogue): Add assertion to check interrupt mode.
6449 (riscv_set_current_function): Extract getting interrupt type to new
6450 function.
6451 (riscv_get_interrupt_type): New function.
6452 (riscv_merge_decl_attributes): New function, checking interrupt type is
6453 same.
6454 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6455
6456 2018-07-12 Paul Koning <ni1d@arrl.net>
6457
6458 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6459 directive.
6460
6461 2018-07-12 Paul Koning <ni1d@arrl.net>
6462
6463 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6464 zero reference, add doloop_end instead.
6465 * doc/md.texi (decrement_and_branch_until_zero): Remove.
6466 (Looping patterns): Remove decrement_and_branch_until_zero. Add
6467 detail for doloop_end.
6468
6469 2018-07-12 Martin Sebor <msebor@redhat.com>
6470
6471 PR c/86453
6472 * attribs.c (decl_attributes): Reject conflicting attributes before
6473 calling attribute handlers.
6474
6475 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6476
6477 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6478 parameter.
6479 (gcc::dump_manager::get_dump_file_name): likewise.
6480 (dump_begin): Likewise.
6481 * dumpfile.h (dump_begin): Update prototype.
6482 (gcc::dump_manager::get_dump_file_name,
6483 gcc::dump_manager::get_dump_file_name): Update prototype.
6484
6485 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6486
6487 * internal-fn.h (vectorizable_internal_fn_p): New function.
6488 * tree-vect-slp.c (compatible_calls_p): Likewise.
6489 (vect_build_slp_tree_1): Remove nops argument. Handle calls
6490 to internal functions.
6491 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6492
6493 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6494
6495 * fold-const.h (inverse_conditions_p): Declare.
6496 * fold-const.c (inverse_conditions_p): New function.
6497 * match.pd: Use inverse_conditions_p. Add folds of view_converts
6498 that test the inverse condition of a conditional internal function.
6499 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6500 * internal-fn.c (internal_fn_mask_index): Handle conditional
6501 internal functions.
6502 (vectorized_internal_fn_supported_p): New function.
6503 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6504 (any_pred_load_store): Replace with...
6505 (need_to_predicate): ...this new variable.
6506 (redundant_ssa_names): New variable.
6507 (ifcvt_can_use_mask_load_store): Move initial checks to...
6508 (ifcvt_can_predicate): ...this new function. Handle tree codes
6509 for which a conditional internal function exists.
6510 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6511 instead of ifcvt_can_use_mask_load_store. Update after variable
6512 name change.
6513 (predicate_load_or_store): New function, split out from
6514 predicate_mem_writes.
6515 (check_redundant_cond_expr): New function.
6516 (value_available_p): Likewise.
6517 (predicate_rhs_code): Likewise.
6518 (predicate_mem_writes): Rename to...
6519 (predicate_statements): ...this. Use predicate_load_or_store
6520 and predicate_rhs_code.
6521 (combine_blocks, tree_if_conversion): Update after above name changes.
6522 (ifcvt_local_dce): Handle redundant_ssa_names.
6523 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6524 general conditional functions.
6525 * tree-vect-stmts.c (vectorizable_call): Likewise.
6526
6527 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6528 Alan Hayward <alan.hayward@arm.com>
6529 David Sherwood <david.sherwood@arm.com>
6530
6531 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6532 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6533 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6534 plus and minus and convert them into IFN_COND_FMA-based sequences.
6535 (convert_mult_to_fma): Handle conditional plus and minus.
6536
6537 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6538
6539 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6540 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6541 (cond_fnms_optab): New optabs.
6542 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6543 internal functions.
6544 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6545 * internal-fn.h (get_conditional_internal_fn): Declare.
6546 (get_unconditional_internal_fn): Likewise.
6547 * internal-fn.c (cond_ternary_direct): New macro.
6548 (expand_cond_ternary_optab_fn): Likewise.
6549 (direct_cond_ternary_optab_supported_p): Likewise.
6550 (FOR_EACH_COND_FN_PAIR): Likewise.
6551 (get_conditional_internal_fn): New function.
6552 (get_unconditional_internal_fn): Likewise.
6553 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6554 (gimple_match_op::gimple_match_op): Add a new overload for 5
6555 operands.
6556 (gimple_match_op::set_op): Likewise.
6557 (gimple_resimplify5): Declare.
6558 * genmatch.c (decision_tree::gen): Generate simplifications for
6559 5 operands.
6560 * gimple-match-head.c (gimple_simplify): Define an overload for
6561 5 operands. Handle calls with 5 arguments in the top-level overload.
6562 (convert_conditional_op): Handle conversions from unconditional
6563 internal functions to conditional ones.
6564 (gimple_resimplify5): New function.
6565 (build_call_internal): Pass a fifth operand.
6566 (maybe_push_res_to_seq): Likewise.
6567 (try_conditional_simplification): Try converting conditional
6568 internal functions to unconditional internal functions.
6569 Handle 3-operand unconditional forms.
6570 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6571 Define ternary equivalents of the current rules for binary conditional
6572 internal functions.
6573 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6574 ternary operations.
6575 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6576 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6577 (optab): Handle them.
6578 (SVE_COND_FP_TERNARY): New int iterator.
6579 (sve_fmla_op, sve_fmad_op): New int attributes.
6580 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6581 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6582 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6583
6584 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6585
6586 * target.def (preferred_else_value): New target hook.
6587 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6588 * doc/tm.texi: Regenerate.
6589 * targhooks.h (default_preferred_else_value): Declare.
6590 * targhooks.c (default_preferred_else_value): New function.
6591 * internal-fn.h (conditional_internal_fn_code): Declare.
6592 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6593 (get_conditional_internal_fn): Use it.
6594 (conditional_internal_fn_code): New function.
6595 * gimple-match.h (gimple_match_cond): New struct.
6596 (gimple_match_op): Add a cond member function.
6597 (gimple_match_op::gimple_match_op): Update all forms to take a
6598 gimple_match_cond.
6599 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6600 for the suboperation, but don't specify a particular else_value.
6601 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6602 (visit_nary_op, visit_reference_op_load): Pass
6603 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6604 * gimple-match-head.c: Include tree-eh.h
6605 (convert_conditional_op): New function.
6606 (maybe_resimplify_conditional_op): Likewise.
6607 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6608 (gimple_resimplify2): Likewise.
6609 (gimple_resimplify3): Likewise.
6610 (gimple_resimplify4): Likewise.
6611 (maybe_push_res_to_seq): Return null for conditional operations.
6612 (try_conditional_simplification): New function.
6613 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6614 constructor.
6615 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6616 IFN_COND_* call.
6617 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6618 function.
6619 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6620
6621 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6622
6623 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6624 DECL_FCONTEXT
6625 (hash_tree): Do not hash DECL_FCONTEXT
6626 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6627 Do not stream DECL_FCONTEXT.
6628 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6629 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6630
6631 2018-07-12 Richard Biener <rguenther@suse.de>
6632
6633 PR debug/86462
6634 * dwarf2out.c (gen_block_die): Only output blocks when they have
6635 at least one !DECL_IGNORED_P variable.
6636
6637 2018-07-12 Richard Biener <rguenther@suse.de>
6638
6639 PR target/84829
6640 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6641 Remove -mieee-fp handling.
6642
6643 2018-07-12 Richard Biener <rguenther@suse.de>
6644
6645 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6646 left-over from last patch.
6647
6648 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6649
6650 PR tree-optimization/86492
6651 * gimple-ssa-store-merging.c
6652 (imm_store_chain_info::coalesce_immediate_stores): Call
6653 check_no_overlap even for the merge_overlapping case. Formatting fix.
6654
6655 2018-07-12 Richard Biener <rguenther@suse.de>
6656
6657 PR middle-end/86479
6658 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6659 move possibly trapping operations into the conditional.
6660
6661 2018-07-12 Richard Biener <rguenther@suse.de>
6662
6663 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6664 (vn_lookup_simplify_result): Remove recursion limit applied
6665 here.
6666 (vn_nary_build_or_lookup_1): Adjust.
6667 (try_to_simplify): Likewise.
6668 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6669 here.
6670 (gimple_resimplify2): Likewise.
6671 (gimple_resimplify3): Likewise.
6672 (gimple_resimplify4): Likewise.
6673
6674 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6675
6676 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6677 Use __mmask64 type instead of __mmask8 for __M argument.
6678 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6679 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6680 __U argument.
6681 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6682 __mmask16 for __M argument.
6683 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6684 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6685 to __mmask16 instead of __mmask8.
6686 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6687 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6688 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6689 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6690 instead of __mmask16 for __U argument.
6691 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6692 __mmask16 instead of __mmask8 for __U argument.
6693 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6694 __U argument.
6695 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6696 __mmask16.
6697 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6698 argument.
6699 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6700 __U argument.
6701 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6702 __mmask16.
6703 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6704 of __mmask16.
6705 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6706 __U argument.
6707 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6708 __U argument.
6709 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6710 __U argument.
6711 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6712 __U argument.
6713 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6714 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6715 return type as well as __M argument type and all casts from __mmask8
6716 to __mmask32.
6717 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6718 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6719 return type as well as __M argument type and all casts from __mmask8
6720 to __mmask16.
6721 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6722 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6723 return type as well as __M argument type and all casts from __mmask8
6724 to __mmask32.
6725 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6726 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6727 return type as well as __M argument type and all casts from __mmask8
6728 to __mmask16.
6729 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6730 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6731 __mmask16.
6732
6733 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6734
6735 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6736 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6737 for __U argument.
6738
6739 2018-07-11 Paul Koning <ni1d@arrl.net>
6740
6741 * doc/md.texi (define_subst): Document how multiple occurrences of
6742 the same argument in the replacement pattern are handled.
6743
6744 2018-07-11 Paul Koning <ni1d@arrl.net>
6745
6746 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6747 alphabetical order.
6748 (Common Type Attributes): Add "mode" attribute.
6749
6750 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6751
6752 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6753 stream DECL_ORIGINAL_TYPE.
6754 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6755 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6756 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6757 Do not walk original type.
6758 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6759 external decls.
6760 (write_ts_decl_non_common_tree_pointers): Do not stream
6761 DECL_ORIGINAL_TYPE
6762 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6763 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6764
6765 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6766
6767 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6768 thread twice from the same starting edge.
6769
6770 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6771
6772 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6773 * gimple.c (gimple_call_nonnull_result_p): ...here...
6774 (gimple_call_nonnull_arg): ...and here.
6775 * gimple.h (gimple_call_nonnull_result_p): New.
6776 (gimple_call_nonnull_arg): New.
6777
6778 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6779
6780 * config/arm/arm-cpus.in: Move information from fpu field of each
6781 cpu definition to the isa field.
6782 * config/arm/parsecpu.awk (fpu): Delete match rule.
6783 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6784
6785 2018-07-11 Richard Biener <rguenther@suse.de>
6786
6787 PR debug/86457
6788 * dwarf2out.c (init_sections_and_labels): Use
6789 output_asm_line_debug_info consistently.
6790 (dwarf2out_early_finish): Likewise.
6791 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6792 type units.
6793
6794 2018-07-11 Richard Biener <rguenther@suse.de>
6795
6796 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6797 Rework father_bb setting in a way to avoid propagating constants
6798 multiple times on a loop body.
6799
6800 2018-07-10 Mark Wielaard <mark@klomp.org>
6801
6802 PR debug/86459
6803 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6804
6805 2018-07-10 Richard Biener <rguenther@suse.de>
6806
6807 * hash-map.h (hash_map::iterator::operator*): Return
6808 references to key and value.
6809
6810 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6811
6812 PR c++/86443
6813 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6814 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6815 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6816 (gimplify_omp_for): For composite loops, move outer
6817 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6818 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6819 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6820 TREE_LIST for both the original class iterator and the "last" helper
6821 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6822 loop, remember has_decl_expr from outer composite loops for the
6823 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6824
6825 2018-07-09 Martin Sebor <msebor@redhat.com>
6826
6827 PR middle-end/77357
6828 PR middle-end/86428
6829 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6830 accessing implicitly initialized array elements.
6831 * expr.c (string_constant): Handle string initializers of
6832 character arrays within aggregates.
6833 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6834 Store element offset. As a special case, handle zero size.
6835 (fold_nonarray_ctor_reference): Same.
6836 (fold_ctor_reference): Add argument. Store subobject offset.
6837 * gimple-fold.h (fold_ctor_reference): Add argument.
6838
6839 2018-07-09 Paul Koning <ni1d@arrl.net>
6840
6841 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6842 (pdp11_insn_cost): New function.
6843 (pdp11_md_asm_adjust): New function.
6844 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6845 (pdp11_rtx_costs): Update to match machine better.
6846 (output_addr_const_pdp11): Correct format mismatch warnings.
6847 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6848 * config/pdp11/pdp11.md: General change to add base_cost and/or
6849 length attributes for use by new pdp11_insn_cost function.
6850 (MIN_BRANCH): Correct definition.
6851 (MIN_SOB): Ditto.
6852 (doloop_end): Use standard pattern name for looping pattern.
6853 (doloop_end_nocc): New.
6854 (movsf): Add another constraint alternative.
6855 (zero_extendqihi2): Add constraint alternatives for not in place
6856 extend.
6857 (zero_extendhisi2): Remove.
6858 (shift patterns): Add CC handling variants.
6859 (bswaphi2): New.
6860 (bswapsi2): New.
6861 (rothi3): New.
6862 (define_peephole2): New peephole to recognize mov that sets CC for
6863 subsequent test.
6864
6865 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6866
6867 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6868 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6869 wi::add.
6870
6871 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6872
6873 PR c/86420
6874 * real.c (real_nextafter): Return true if result is denormal.
6875
6876 2018-07-09 Martin Liska <mliska@suse.cz>
6877
6878 * common.opt: Add back wrongly removed attribute.
6879
6880 2018-07-09 Richard Biener <rguenther@suse.de>
6881
6882 PR debug/86413
6883 * dwarf2out.c (gen_block_die): For an early generated DIE
6884 always output high/low PC attributes.
6885
6886 2018-07-09 Tom de Vries <tdevries@suse.de>
6887
6888 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6889 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6890 onto VAR_DECL with abstract origin.
6891
6892 2018-07-07 Jim Wilson <jimw@sifive.com>
6893
6894 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6895
6896 2018-07-07 Tom de Vries <tdevries@suse.de>
6897
6898 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6899
6900 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6901
6902 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6903 overflow_type.
6904 (combine_bound): Use wide-int overflow calculation instead of
6905 rolling our own.
6906 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6907 overflow_type.
6908 * fold-const.c (int_const_binop_2): Same.
6909 (extract_muldiv_1): Same.
6910 (fold_div_compare): Same.
6911 (fold_abs_const): Same.
6912 * match.pd: Same.
6913 * poly-int.h (add): Same.
6914 (sub): Same.
6915 (neg): Same.
6916 (mul): Same.
6917 * predict.c (predict_iv_comparison): Same.
6918 * profile-count.c (slow_safe_scale_64bit): Same.
6919 * simplify-rtx.c (simplify_const_binary_operation): Same.
6920 * tree-chrec.c (tree_fold_binomial): Same.
6921 * tree-data-ref.c (split_constant_offset_1): Same.
6922 * tree-if-conv.c (idx_within_array_bound): Same.
6923 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6924 * tree-ssa-phiopt.c (minmax_replacement): Same.
6925 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6926 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6927 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6928 * wide-int.cc (wi::add_large): Same.
6929 (wi::mul_internal): Same.
6930 (wi::sub_large): Same.
6931 (wi::divmod_internal): Same.
6932 * wide-int.h: Change overflow type to overflow_type for neg, add,
6933 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6934 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6935 mul_internal, divmod_internal.
6936 (overflow_type): New enum.
6937 (accumulate_overflow): New.
6938
6939 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6940
6941 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6942 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6943
6944 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6945
6946 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6947 argument is checked for zero before entering loop, avoid checking again.
6948
6949 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6950
6951 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6952 * gimplify.h (generic_expr_could_trap_p): Likwise.
6953 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6954
6955 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6956
6957 PR tree-optimization/86401
6958 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6959 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6960 (fold_bit_and_mask): ... here. New helper function for match.pd.
6961 * fold-const.h (fold_bit_and_mask): Declare.
6962 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6963
6964 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6965
6966 PR target/86324
6967 * target.def (translate_mode_attribute): New hook.
6968 * targhooks.h (default_translate_mode_attribute): Declare.
6969 * targhooks.c (default_translate_mode_attribute): New function.
6970 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6971 * doc/tm.texi: Regenerate.
6972 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6973 (rs6000_translate_mode_attribute): New function.
6974
6975 2018-07-06 Paul Koning <ni1d@arrl.net>
6976
6977 * doc/md.texi (define_split): Document DONE and FAIL.
6978 (define_peephole2): Ditto.
6979
6980 2018-07-05 Jeff Law <law@redhat.com>
6981
6982 PR tree-optimization/86010
6983 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6984 both the head and tail of mem* and str* calls.
6985
6986 2018-07-05 Jim Wilson <jimw@sifive.com>
6987
6988 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6989
6990 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6991
6992 * config/aarch64/aarch64-simd.md: correct flags text for
6993 MIN_EXPR replacement.
6994
6995 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6996
6997 * configure: Regenerated.
6998
6999 2018-07-05 Carl Love <cel@us.ibm.com>
7000
7001 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
7002 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
7003 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
7004 VSX_BUILTIN_DOUBLEL_V4SF.
7005
7006 2018-07-05 Martin Sebor <msebor@redhat.com>
7007
7008 PR c++/86400
7009 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
7010 than its domain to compute its the upper bound of a char array.
7011
7012 2018-07-05 Nathan Sidwell <nathan@acm.org>
7013
7014 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
7015 * doc/cpp.texi: Update comment.
7016 * doc/tm.texi: Rebuilt.
7017 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
7018 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
7019 * doc/extend.texi (Backwards Compatibility): Clarify it is system
7020 headers affected by extern "C".
7021 * system.h: Poison NO_IMPLICIT_EXTERN_C.
7022 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
7023 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
7024 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
7025 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
7026 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
7027 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
7028 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
7029 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
7030 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
7031 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
7032 config/sparc/sp64-elf.h, config/spu/spu.h,
7033 config/stormy16/stormy16.h, config/v850/v850.h,
7034 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
7035 define NO_IMPLICIT_EXTERN_C.
7036 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
7037
7038 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7039
7040 PR target/84711
7041 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7042 instead of GET_MODE_SIZE when comparing Units.
7043
7044 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7045
7046 PR target/84711
7047 * rtlanal.c (set_noop_p): Constrain on mode change,
7048 include hard-reg-set.h
7049
7050 2018-07-05 Tamar Christina <tamar.christina@arm.com>
7051
7052 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
7053
7054 2018-07-05 Jakub Jelinek <jakub@redhat.com>
7055
7056 Revert
7057 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7058
7059 PR sanitizer/84250
7060 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7061 libasan.
7062 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7063
7064 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
7065
7066 PR sanitizer/84250
7067 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
7068 libasan.
7069 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
7070
7071 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
7072
7073 PR middle-end/86380
7074 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
7075
7076 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
7077
7078 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
7079 neg_*_op* variables.
7080
7081 2018-07-04 Martin Liska <mliska@suse.cz>
7082
7083 * tree-switch-conversion.c: Define
7084 max_ratio_for_speed and max_ratio_for_size constants.
7085
7086 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7087 Martin Liska <mliska@suse.cz>
7088
7089 PR middle-end/66240
7090 PR target/45996
7091 PR c/84100
7092 * common.opt: Rename align options with 'str_' prefix.
7093 * common/config/i386/i386-common.c (set_malign_value): New
7094 function.
7095 (ix86_handle_option): Use it to set -falign-* options/
7096 * config/aarch64/aarch64-protos.h (struct tune_params): Change
7097 type from int to string.
7098 * config/aarch64/aarch64.c: Update default values from int
7099 to string.
7100 * config/alpha/alpha.c (alpha_override_options_after_change):
7101 Likewise.
7102 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
7103 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7104 max skip conditionally.
7105 * config/i386/freebsd.h (SUBALIGN_LOG): New.
7106 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7107 max skip conditionally.
7108 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7109 max skip conditionally.
7110 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
7111 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7112 max skip conditionally.
7113 * config/i386/i386.c (struct ptt): Change type from int to
7114 string.
7115 (ix86_default_align): Set default values.
7116 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
7117 max skip conditionally.
7118 * config/i386/iamcu.h (SUBALIGN_LOG): New.
7119 (ASM_OUTPUT_MAX_SKIP_ALIGN):
7120 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
7121 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7122 max skip conditionally.
7123 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
7124 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
7125 * config/i386/x86-64.h (SUBALIGN_LOG): New.
7126 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
7127 max skip conditionally.
7128 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7129 * config/ia64/ia64.c (ia64_option_override): Set default values
7130 for alignment options.
7131 * config/m68k/m68k.c: Handle new str_align_* options.
7132 * config/mips/mips.c (mips_set_compression_mode): Change
7133 type of constants.
7134 (mips_option_override): Set default values for options.
7135 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7136 Likewise.
7137 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7138 Likewise.
7139 * config/rx/rx.c (rx_option_override): Likewise.
7140 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
7141 (LABEL_ALIGN): Use align_labels_log.
7142 (LOOP_ALIGN): Use align_loops_align.
7143 * config/s390/s390.c (s390_asm_output_function_label): Use new
7144 macros.
7145 * config/sh/sh.c (sh_override_options_after_change):
7146 Change type of constants.
7147 * config/spu/spu.c (spu_sched_init): Likewise.
7148 * config/sparc/sparc.c (sparc_option_override): Set default
7149 values for options.
7150 * config/visium/visium.c (visium_option_override): Likewise.
7151 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
7152 emit p2align format with last argument if it's not needed.
7153 * doc/invoke.texi: Document extended format of -falign-*.
7154 * final.c: Use align_labels alignment.
7155 * flags.h (struct target_flag_state): Change type to use
7156 align_flags.
7157 (struct align_flags_tuple): New.
7158 (struct align_flags): Likewise.
7159 (align_loops_log): Redefine macro to use new types.
7160 (align_loops_max_skip): Redefine macro to use new types.
7161 (align_jumps_log): Redefine macro to use new types.
7162 (align_jumps_max_skip): Redefine macro to use new types.
7163 (align_labels_log): Redefine macro to use new types.
7164 (align_labels_max_skip): Redefine macro to use new types.
7165 (align_functions_log): Redefine macro to use new types.
7166 (align_loops): Redefine macro to use new types.
7167 (align_jumps): Redefine macro to use new types.
7168 (align_labels): Redefine macro to use new types.
7169 (align_functions): Redefine macro to use new types.
7170 (align_functions_max_skip): Redefine macro to use new types.
7171 (align_loops_value): New macro.
7172 (align_jumps_value): New macro.
7173 (align_labels_value): New macro.
7174 (align_functions_value): New macro.
7175 * function.c (invoke_set_current_function_hook): Propagate
7176 alignment values from flags to global variables default in
7177 topleev.h.
7178 * ipa-icf.c (sem_function::equals_wpa): Use
7179 cl_optimization_option_eq instead of memcmp.
7180 * lto-streamer.h (cl_optimization_stream_out): Support streaming
7181 of string types.
7182 (cl_optimization_stream_in): Likewise.
7183 * optc-save-gen.awk: Support strings in cl_optimization.
7184 * opth-gen.awk: Likewise.
7185 * opts.c (finish_options): Remove error checking of invalid
7186 value ranges.
7187 (MAX_CODE_ALIGN): Remove.
7188 (MAX_CODE_ALIGN_VALUE): Likewise.
7189 (parse_and_check_align_values): New function.
7190 (check_alignment_argument): Likewise.
7191 (common_handle_option): Use check_alignment_argument.
7192 * opts.h (parse_and_check_align_values): Declare.
7193 * toplev.c (init_alignments): Remove.
7194 (read_log_maxskip): New.
7195 (parse_N_M): Likewise.
7196 (parse_alignment_opts): Likewise.
7197 (backend_init_target): Remove usage of init_alignments.
7198 * toplev.h (parse_alignment_opts): Declare.
7199 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
7200 argument.
7201 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
7202 * tree.c (cl_option_hasher::equal): New.
7203 * varasm.c: Use new global macros.
7204
7205 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
7206
7207 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
7208 Use a simpler align directive also if MAXSKIP = ALIGN-1.
7209 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7210 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7211 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7212 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7213 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
7214 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
7215 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
7216 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7217 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7218 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7219 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7220
7221 2018-07-04 Martin Liska <mliska@suse.cz>
7222 Jonathan Wakely <jwakely@redhat.com>
7223
7224 * coverage.c: Use correct type.
7225 * doc/invoke.texi: Language correction.
7226
7227 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
7228
7229 PR target/85620
7230 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
7231 ENDBRANCH for non-tail call which may return via indirect branch.
7232 * doc/extend.texi: Document indirect_return attribute.
7233
7234 2018-07-03 Martin Sebor <msebor@redhat.com>
7235
7236 PR tree-optimization/86274
7237 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
7238 precondition.
7239 (format_floating): Correct handling of infinities and NaNs.
7240
7241 2018-07-03 Martin Sebor <msebor@redhat.com>
7242
7243 * print-tree.c (print_real_cst): New function.
7244 (print_node_brief): Call it.
7245 (print_node): Ditto.
7246
7247 2018-07-03 Jeff Law <law@redhat.com>
7248
7249 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
7250 into a single pattern.
7251
7252 * config/h8300/h8300.md (ors code_iterator): New.
7253 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
7254 a single pattern and single splitter.
7255 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
7256 (iorqi3_1, xorqi3_1): Likewise.
7257 (iorqi3, xorqi3 expanders): Similarly.
7258
7259 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
7260 (movmd_internal) into a single pattern using the P mode iterator.
7261 (movmd splitters): Similarly.
7262 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
7263 (movsd splitters): Similarly.
7264
7265 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
7266 ADDB, ADDW and ADDL into a single ADD attribute which selects the
7267 right table based on the size of the operand.
7268 * config/h8300/h8300.md (length_table): Corresponding changes. All
7269 references to "addb", "addw" and "addl" changed to "add".
7270 (btst patterns): Merge two variants into a single pattern.
7271 (tstqi, tsthi): Likewise.
7272 (addhi3_incdec, addsi3_incdec): Likewise.
7273 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
7274 (mulhi3, mulsi3): Likewise.
7275 (udivhi3, udivsi3): Likewise.
7276 (divhi3, divsi3): Likewise.
7277 (andorqi3, andorhi3, andorsi3): Likewise.
7278
7279 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
7280
7281 PR target/85694
7282 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
7283 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
7284
7285 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7286
7287 PR tree-optimization/85694
7288 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
7289 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
7290 UNSPEC_URHADD.
7291 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
7292 (<u>avg<mode>3_ceil): New patterns.
7293
7294 2018-07-03 David Malcolm <dmalcolm@redhat.com>
7295
7296 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
7297 scan-tree-dump directive.
7298 * gcc.dg/vect/slp-perm-2.c: Likewise.
7299 * gcc.dg/vect/slp-perm-3.c: Likewise.
7300 * gcc.dg/vect/slp-perm-5.c: Likewise.
7301 * gcc.dg/vect/slp-perm-6.c: Likewise.
7302 * gcc.dg/vect/slp-perm-7.c: Likewise.
7303 * gcc.dg/vect/slp-perm-8.c: Likewise.
7304
7305 2018-07-03 Marek Polacek <polacek@redhat.com>
7306
7307 PR middle-end/86202
7308 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
7309
7310 2018-07-03 Richard Biener <rguenther@suse.de>
7311
7312 PR ipa/86389
7313 * tree-ssa-structalias.c (find_func_clobbers): Properly
7314 handle indirect calls.
7315
7316 2018-07-03 Jeff Law <law@redhat.com>
7317
7318 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
7319 (shifts): New code iterator.
7320 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
7321 expander. Fix HImode handling on H8/SX.
7322 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
7323 (subqi3, subhi3, subsi3 expanders): Likewise.
7324 (andqi3, andhi3, andsi3 expanders): Likewise.
7325 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
7326 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
7327 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
7328 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
7329 (zero_extendqihi2, zero_extendqisi2): Likewise.
7330 (extendqihi2, extendqisi2): Likewise.
7331 (rotlqi3, rotlhi3, rotlsi3): Likewise.
7332 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
7333 (rotlqi3_1, rotlhi3_1): Likewise.
7334 (logicalhi3_sn, logicalsi3_sn): Likewise.
7335 (logicalhi3, logicalsi3): Likewise.
7336
7337 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7338
7339 * tree-vect-patterns.c (vect_recog_rotate_pattern)
7340 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7341 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7342 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7343 type to append_pattern_def_seq instead of creating a stmt_vec_info
7344 directly.
7345 (build_mask_conversion): Likewise. Remove vinfo argument.
7346 (vect_add_conversion_to_patterm): Likewise, renaming to...
7347 (vect_add_conversion_to_pattern): ...this.
7348 (vect_recog_mask_conversion_pattern): Update call to
7349 build_mask_conversion. Pass the vector type to
7350 append_pattern_def_seq here too.
7351 (vect_recog_gather_scatter_pattern): Update call to
7352 vect_add_conversion_to_pattern.
7353
7354 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7355
7356 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7357 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7358 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7359 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7360 STMT_VINFO_PATTERN_DEF_SEQ to null here.
7361 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7362 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7363 append_pattern_def_seq instead of new_pattern_def_seq.
7364 (vect_recog_divmod_pattern): Do both of the above.
7365 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7366 is null.
7367
7368 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7369
7370 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7371 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7372 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7373 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7374 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7375 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7376 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7377 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7378 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7379 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7380 parameter with a single stmt_vec_info.
7381 (vect_recog_func_ptr): Likewise.
7382 (vect_recog_gather_scatter_pattern): Likewise, folding in...
7383 (vect_try_gather_scatter_pattern): ...this.
7384 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7385 the stmt_vec_info of the statement to be matched. Don't clear
7386 STMT_VINFO_RELATED_STMT.
7387 (vect_pattern_recog): Update call accordingly.
7388
7389 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7390
7391 PR tree-optimization/85694
7392 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7393 (uavgM3_ceil): Document new optabs.
7394 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7395 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7396 functions.
7397 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7398 (savg_ceil_optab): New optabs.
7399 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7400 (vect_vect_recog_func_ptrs): Add it.
7401 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7402 constant directly from the associated lhs.
7403
7404 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7405
7406 * tree-vect-patterns.c (vect_split_statement): New function.
7407 (vect_convert_input): Use it to try to split an existing cast.
7408
7409 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7410
7411 * poly-int.h (print_hex): New function.
7412 * dumpfile.h (dump_dec, dump_hex): Declare.
7413 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7414 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7415 min_input_precision, operation_precision and operation_sign.
7416 * tree-vect-patterns.c (vect_get_range_info): New function.
7417 (vect_same_loop_or_bb_p, vect_single_imm_use)
7418 (vect_operation_fits_smaller_type): Delete.
7419 (vect_look_through_possible_promotion): Add an optional
7420 single_use_p parameter.
7421 (vect_recog_over_widening_pattern): Rewrite to use new
7422 stmt_vec_info infomration. Handle one operation at a time.
7423 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7424 (vect_truncatable_operation_p, vect_set_operation_type)
7425 (vect_set_min_input_precision): New functions.
7426 (vect_determine_min_output_precision_1): Likewise.
7427 (vect_determine_min_output_precision): Likewise.
7428 (vect_determine_precisions_from_range): Likewise.
7429 (vect_determine_precisions_from_users): Likewise.
7430 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7431 (vect_vect_recog_func_ptrs): Put over_widening first.
7432 Add cast_forwprop.
7433 (vect_pattern_recog): Call vect_determine_precisions.
7434
7435 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7436
7437 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7438 statements that have been replaced by further pattern statements.
7439 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7440
7441 2018-07-03 Richard Biener <rguenther@suse.de>
7442
7443 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7444 always set *dt. Dump vectype in vectype overload.
7445 * dumpfile.h (dump_gimple_expr): New function.
7446 (dump_gimple_expr_loc): Likewise.
7447 * dumpfile.c (dump_gimple_expr): New function.
7448 (dump_gimple_expr_loc): Likewise.
7449
7450 2018-07-02 Jeff Law <law@redhat.com>
7451
7452 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7453 the H8/300, H8/300H and H8/S variants into a single pattern.
7454 (movhi_h8300, movqi_h8300hs): Similarly.
7455 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7456 (QHI mode iterator): New.
7457
7458 * config/h8300/h8300.md: Remove trailing whitespace.
7459
7460 2018-07-02 Jim Wilson <jimw@sifive.com>
7461
7462 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7463 instead of emit_insn for interrupt returns.
7464 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7465 (riscv_sret, riscv_uret): Likewise.
7466
7467 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7468
7469 * pretty-print.c (selftest::test_pp_format): Move save and restore
7470 of quotes to class auto_fix_quotes, and add an instance.
7471 * selftest.c: Include "intl.h".
7472 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7473 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7474 * selftest.h (selftest::auto_fix_quotes): New class.
7475
7476 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
7477
7478 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7479 (aarch64_sve_prepare_conditional_op): Remove.
7480 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7481 Allow aarch64_simd_reg_or_zero as select operand; remove
7482 the aarch64_sve_prepare_conditional_op call.
7483 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7484 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7485 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7486 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7487 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7488 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7489 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7490 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7491 and a splitters to match all of the *_any patterns.
7492 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7493
7494 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7495 (SVE_COND_FP_BINARY_REV): Remove.
7496 (sve_int_op_rev, sve_fp_op_rev): New.
7497 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7498 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7499 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7500 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7501 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7502 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7503 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7504 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7505 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7506
7507 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7508 Remove match_dup 1 from the inner unspec.
7509 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7510
7511 * config/aarch64/aarch64.md (movprfx): New attr.
7512 (length): Default movprfx to 8.
7513 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7514 (*madd<SVE_I>, *msub<SVE_I): Likewise.
7515 (*<su>mul<SVE_I>3_highpart): Likewise.
7516 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7517 (*v<ASHIFT><SVE_I>3): Likewise.
7518 (*<su><MAXMIN><SVE_I>3): Likewise.
7519 (*<su><MAXMIN><SVE_F>3): Likewise.
7520 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7521 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7522 (*div<SVE_F>4): Likewise.
7523
7524 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
7525
7526 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7527 in dump string.
7528
7529 2018-07-02 Richard Biener <rguenther@suse.de>
7530
7531 PR tree-optimization/86363
7532 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7533 memset argument refers to a non-variable address.
7534
7535 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7536
7537 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7538 {PLUS,MINUS}_EXPR code to...
7539 (adjust_symbolic_bound): ...here,
7540 (combine_bound): ...here,
7541 (set_value_range_with_overflow): ...and here.
7542
7543 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7544
7545 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7546 code...
7547 (extract_range_from_abs_expr): ...here.
7548
7549 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7550
7551 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7552 -fno-omit-frame-pointer when not optimizing.
7553
7554 2018-07-02 Martin Liska <mliska@suse.cz>
7555
7556 PR ipa/86279
7557 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7558 (propagate_nothrow): Likewise.
7559
7560 2018-07-02 Martin Liska <mliska@suse.cz>
7561
7562 PR ipa/86323
7563 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7564
7565 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7566
7567 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7568 function in r262149, changing "loc" param from source_location to
7569 const dump_location_t &.
7570 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7571 declaration, as above.
7572
7573 2018-07-01 Paul Koning <ni1d@arrl.net>
7574
7575 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7576 -munit-asm, -mgnu-asm, -mdec-asm.
7577 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7578 (pdp11_output_labelref): New.
7579 (pdp11_output_def): New.
7580 (pdp11_output_addr_vec_elt): New.
7581 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7582 %# and %@ format codes.
7583 (pdp11_option_override): New.
7584 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7585 (pdp11_output_ident): New.
7586 (pdp11_asm_named_section): New.
7587 (pdp11_asm_init_sections): New.
7588 (pdp11_file_start): New.
7589 (pdp11_file_end): New.
7590 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7591 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7592 %o, like %c but octal.
7593 (pdp11_option_override): New.
7594 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7595 -mdec-asm.
7596 (DATA_SECTION_ASM_OP): Ditto.
7597 (READONLY_DATA_SECTION_ASM_OP): New.
7598 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7599 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7600 (ASM_OUTPUT_LABELREF): Ditto.
7601 (ASM_OUTPUT_DEF): Ditto.
7602 (ASM_OUTPUT_EXTERNAL): New.
7603 (ASM_OUTPUT_SOURCE_FILENAME): New.
7604 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7605 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7606 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7607 %# and %@ format codes.
7608 * config/pdp11/pdp11.opt (mgnu-asm): New.
7609 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7610 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7611 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7612
7613 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7614
7615 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7616 dereferencing path[] beyond its length.
7617 (debug_path): New.
7618 (debug_all_paths): New.
7619 (rewire_first_differing_edge): New.
7620 (adjust_paths_after_duplication): New.
7621 (duplicate_thread_path): Call adjust_paths_after_duplication.
7622 Add new argument.
7623 (thread_through_all_blocks): Add new argument to
7624 duplicate_thread_path.
7625
7626 2018-06-30 Jim Wilson <jimw@sifive.com>
7627
7628 * config/riscv/predicates.md (p2m1_shift_operand): New.
7629 (high_mask_shift_operand): New.
7630 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7631 pattern using p2m1_shift_operand.
7632 (lshsi3_zero_extend_3+2): New combiner pattern using
7633 high_mask_shift_operand.
7634
7635 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7636
7637 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7638 split out from...
7639 (vect_recog_rotate_pattern): ...here.
7640 (vect_convert_input): Try to insert casts of invariants in the
7641 preheader.
7642 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7643 preheader to be empty.
7644
7645 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7646
7647 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7648 vector type. If given, install it in the new statement's
7649 STMT_VINFO_VECTYPE.
7650 (vect_element_precision): New function.
7651 (vect_unpromoted_value): New struct.
7652 (vect_unpromoted_value::vect_unpromoted_value): New function.
7653 (vect_unpromoted_value::set_op): Likewise.
7654 (vect_look_through_possible_promotion): Likewise.
7655 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7656 (vect_widened_op_tree, vect_convert_input): Likewise.
7657 (vect_convert_inputs, vect_convert_output): Likewise.
7658 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7659 to handle the optional cast of the multiplication result and
7660 vect_widened_op_tree to detect the widened multiplication itself.
7661 Do not require the input and output of promotion casts to have
7662 the same sign, but base the signedness of the operation on the
7663 input rather than the result. If the pattern includes two
7664 promotions, check that those promotions have the same sign.
7665 Do not restrict the MULT_EXPR handling to a double-width result;
7666 handle quadruple-width results and wider. Use vect_convert_inputs
7667 to convert the inputs to the common type.
7668 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7669 to handle the optional cast of the ABS result. Also allow a sign
7670 change or a sign extension between the ABS and MINUS.
7671 Use vect_widened_op_tree to detect the widened subtraction and use
7672 vect_convert_inputs to convert the inputs to the common type.
7673 (vect_handle_widen_op_by_const): Delete.
7674 (vect_recog_widen_op_pattern): New function.
7675 (vect_recog_widen_mult_pattern): Use it.
7676 (vect_recog_widen_shift_pattern): Likewise.
7677 (vect_recog_widen_sum_pattern): Use
7678 vect_look_through_possible_promotion to handle the promoted
7679 PLUS_EXPR operand.
7680
7681 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7682
7683 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7684 the containing gimple_seq *.
7685 * gimple-iterator.h (gsi_for_stmt): Declare it.
7686 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7687 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7688 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7689 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7690 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7691 checks.
7692 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7693 split out from...
7694 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7695 statement being replaced is part of an existing pattern
7696 definition sequence, inserting the new pattern statements before
7697 the original one.
7698 (vect_pattern_recog_1): Don't return a bool. If the statement
7699 is already part of a pattern, instead apply pattern matching
7700 to the pattern definition statements. Don't clear the
7701 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7702 (vect_pattern_recog): Don't break after the first match;
7703 continue processing the pattern definition statements instead.
7704 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7705
7706 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7707
7708 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7709 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7710 (vect_recog_widen_sum_pattern): Use it.
7711
7712 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7713
7714 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7715 phi is not a pattern statement and has not been replaced by
7716 a pattern statement.
7717 * tree-vect-patterns.c (type_conversion_p): Don't check
7718 STMT_VINFO_IN_PATTERN_P.
7719 (vect_recog_vector_vector_shift_pattern): Likewise.
7720 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7721 the pattern statement rather than the original statement; check
7722 directly for a WIDEN_MULT_EXPR here.
7723 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7724 vect_is_simple_use to return the pattern statement rather
7725 than the original statement; use is_pattern_stmt_p to check
7726 for such a pattern statement.
7727 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7728 to return the pattern statement rather than the original statement;
7729 don't do the same transformation here.
7730 (vect_is_simple_use): If the defining statement has been replaced
7731 by a pattern statement, return the pattern statement instead.
7732 Remove the corresponding (local) transformation from the vectype
7733 overload.
7734
7735 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7736
7737 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7738 end and default to null.
7739 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7740 (vectorizable_reduction): Update calls accordingly, dropping the
7741 gimple ** argument if the passed-back statement isn't needed.
7742 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7743 (vect_recog_rotate_pattern): Likewise.
7744 (vect_recog_mask_conversion_pattern): Likewise.
7745 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7746 (vect_mask_constant_operand_p): Likewise.
7747 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7748 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7749 (get_group_load_store_type, get_load_store_type): Likewise.
7750 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7751 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7752 (vectorizable_conversion, vectorizable_assignment): Likewise.
7753 (vectorizable_shift, vectorizable_operation): Likewise.
7754 (vectorizable_store, vect_is_simple_cond): Likewise.
7755 (vectorizable_condition, vectorizable_comparison): Likewise.
7756 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7757 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7758 and move it to the end. Cope with null def_stmt_outs.
7759
7760 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7761
7762 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7763
7764 2018-06-29 Jeff Law <law@redhat.com>
7765
7766 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7767 displacements for TARGET_V850E2V3 and newer.
7768 (TARGET_LRA_P): Remove. Defaults to LRA now.
7769 * config/v850/v850.md (sign23byte_load): Remove.
7770 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7771 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7772
7773 2018-06-29 Martin Liska <mliska@suse.cz>
7774
7775 PR lto/85759
7776 * coverage.c (coverage_init): Mangle full path name.
7777 * doc/invoke.texi: Document the change.
7778 * gcov-io.c (mangle_path): New.
7779 * gcov-io.h (mangle_path): Likewise.
7780 * gcov.c (mangle_name): Use mangle_path for path mangling.
7781
7782 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7783
7784 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7785 if starting source register is not even.
7786
7787 2018-06-29 Martin Liska <mliska@suse.cz>
7788
7789 PR tree-optimization/86263
7790 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7791 Make edge redirection.
7792
7793 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7794
7795 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7796 (dump_scope_depth): New variable.
7797 (get_dump_scope_depth): New function.
7798 (dump_begin_scope): New function.
7799 (dump_end_scope): New function.
7800 * dumpfile.h (get_dump_scope_depth): New declaration.
7801 (dump_begin_scope): New declaration.
7802 (dump_end_scope): New declaration.
7803 (class auto_dump_scope): New class.
7804 (AUTO_DUMP_SCOPE): New macro.
7805 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7806 AUTO_DUMP_SCOPE.
7807
7808 2018-06-29 Richard Biener <rguenther@suse.de>
7809
7810 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7811 compute_all_dependences succeeds.
7812 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7813 exceed --param loop-max-datarefs-for-datadeps.
7814
7815 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7816
7817 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7818
7819 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7820
7821 PR target/86348
7822 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7823 alternative 0 in preferred_for_speed attribute.
7824
7825 2018-06-28 Paul Koning <ni1d@arrl.net>
7826
7827 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7828 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7829 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7830 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7831 for shift insn patterns.
7832
7833 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7834
7835 * cgraph.c (cgraph_node::get_body): Replace assignments to
7836 "dump_file" with calls to set_dump_file.
7837 * dumpfile.c (alt_dump_file): Make static, and group with...
7838 (alt_flags): ...this definition.
7839 (dumps_are_enabled): New variable.
7840 (refresh_dumps_are_enabled): New function.
7841 (set_dump_file): New function.
7842 (set_alt_dump_file): New function.
7843 (gcc::dump_manager::dump_start): Replace assignments to
7844 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7845 set_alt_dump_file.
7846 (gcc::dump_manager::dump_finish): Likewise.
7847 * dumpfile.h (alt_dump_file): Delete decl.
7848 (dumps_are_enabled): New variable decl.
7849 (set_dump_file): New function decl.
7850 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7851 global.
7852 * tree-nested.c (lower_nested_functions): Replace assignments to
7853 "dump_file" with calls to set_dump_file.
7854
7855 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7856
7857 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7858 goto_locus of each outgoing edge of each basic block.
7859
7860 2018-06-28 Richard Biener <rguenther@suse.de>
7861
7862 * dwarf2out.c (decl_scope_table): Remove.
7863 (push_decl_scope): Likewise.
7864 (pop_decl_scope): Likewise.
7865 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7866 (gen_struct_or_union_type_die): Likewise.
7867 (gen_tagged_type_die): Likewise.
7868 (dwarf2out_init): Do not initialize decl_scope_table.
7869 (dwarf2out_c_finalize): Do not free it.
7870
7871 2018-06-28 Richard Biener <rguenther@suse.de>
7872
7873 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7874 deciding whether to not re-use a DIE.
7875
7876 2018-06-28 Richard Biener <rguenther@suse.de>
7877
7878 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7879 DW_AT_abstract_origin attribute.
7880
7881 2018-06-28 Martin Liska <mliska@suse.cz>
7882
7883 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7884 Use newly introduced constants.
7885 * tree-switch-conversion.h (struct jump_table_cluster):
7886 Define max_ratio_for_size and max_ratio_for_speed.
7887
7888 2018-06-28 Martin Liska <mliska@suse.cz>
7889
7890 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7891 Add new checking assert to catch invalid state.
7892 (jump_table_cluster::can_be_handled): Handle single case
7893 clusters.
7894 (jump_table_cluster::is_beneficial): Bail out for such case.
7895 (bit_test_cluster::find_bit_tests):
7896 Add new checking assert to catch invalid state.
7897 (bit_test_cluster::can_be_handled): Handle single case
7898 clusters.
7899 (bit_test_cluster::is_beneficial): Bail out for such case.
7900 (switch_decision_tree::analyze_switch_statement):
7901 Fix comment.
7902
7903 2018-06-28 Martin Liska <mliska@suse.cz>
7904
7905 * common.opt: Introduce -completion option.
7906 * gcc.c (driver_handle_option): Handle it.
7907 (driver::main): Print completions if completion
7908 is set.
7909 * opt-suggestions.c (option_proposer::get_completions):
7910 New function.
7911 (option_proposer::suggest_completion): Likewise.
7912 (option_proposer::find_param_completions): Likewise.
7913 (verify_autocompletions): Likewise.
7914 (test_completion_valid_options): Likewise.
7915 (test_completion_valid_params): Likewise.
7916 (in_completion_p): Likewise.
7917 (empty_completion_p): Likewise.
7918 (test_completion_partial_match): Likewise.
7919 (test_completion_garbage): Likewise.
7920 (opt_proposer_c_tests): Likewise.
7921 * opt-suggestions.h: Declare new functions.
7922 * opts.c (common_handle_option): Handle OPT__completion_.
7923 * selftest-run-tests.c (selftest::run_tests): Add
7924 opt_proposer_c_tests.
7925 * selftest.c (assert_str_startswith): New.
7926 * selftest.h (assert_str_startswith): Likewise.
7927 (opt_proposer_c_tests): New.
7928 (ASSERT_STR_STARTSWITH): Likewise.
7929
7930 2018-06-28 Martin Liska <mliska@suse.cz>
7931
7932 * Makefile.in: Add opt-suggestions.o.
7933 * gcc-main.c: Include opt-suggestions.h.
7934 * gcc.c (driver::driver): Likewise.
7935 (driver::~driver): Remove m_option_suggestions.
7936 (driver::build_option_suggestions): Moved to option_proposer.
7937 (driver::suggest_option): Likewise.
7938 (driver::handle_unrecognized_options): Use option_proposer.
7939 * gcc.h (class driver): Add new memver m_option_proposer.
7940 * opt-suggestions.c: New file.
7941 * opt-suggestions.h: New file.
7942
7943 2018-06-28 Martin Liska <mliska@suse.cz>
7944
7945 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7946 (auto_string_vec::~auto_string_vec): Likewise.
7947
7948 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7949
7950 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7951 prevent_decl_creation_for_types fields up and add reset_location field.
7952 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7953 statement if id->reset_location is true.
7954 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7955 id->reset_location is true.
7956 (copy_phis_for_bb): Force input_location on the arguments if
7957 id->reset_location is true.
7958 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7959 is set on the function to be inlined.
7960
7961 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7962
7963 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7964
7965 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7966
7967 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7968 registers for Pmode.
7969 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7970 hard registers for the clobbered pseudo.
7971
7972 2018-06-27 Paul Koning <ni1d@arrl.net>
7973
7974 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7975 mutually exclusive options.
7976 * config/pdp11/constraints.md (h): New constraint.
7977 (O): Update definition to match shift code generation.
7978 (D): New constraint.
7979 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7980 (CCFP): Remove.
7981 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7982 function.
7983 (output_jump): Change arguments.
7984 (pdp11_fixed_cc_regs): New function.
7985 (pdp11_cc_mode): Ditto.
7986 (pdp11_expand_shift): Ditto.
7987 (pdp11_assemble_shift): Ditto.
7988 (pdp11_small_shift): Ditto.
7989 (pdp11_branch_cost): Remove.
7990 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7991 from output.
7992 (pdp11_register_move_cost): Update for CC registers.
7993 (pdp11_rtx_costs): Add case for LSHIFTRT.
7994 (pdp11_output_jump): Add CCNZ mode conditional branches.
7995 (notice_update_cc_on_set): Remove.
7996 (pdp11_cc_mode): New function.
7997 (simple_memory_operand): Correct pre/post decrement case.
7998 (no_side_effect_operand): New function.
7999 (pdp11_regno_reg_class): Add CC_REGS class.
8000 (pdp11_fixed_cc_regs): New function.
8001 (pdp11_small_shift): New function.
8002 (pdp11_expand_shift): New function to expand shift insns.
8003 (pdp11_assemble_shift): New function to output shifts.
8004 (pdp11_branch_cost): Remove.
8005 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
8006 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
8007 (WCHAR_TYPE): Ditto.
8008 (PTRDIFF_TYPE): Ditto.
8009 (ADJUST_INSN_LENGTH): New macro.
8010 (FIXED_REGISTERS): Add CC registers.
8011 (CALL_USED_REGISTERS): Ditto.
8012 (reg_class): Ditto.
8013 (REG_CLASS_NAMES): Ditto.
8014 (REG_CLASS_CONTENTS): Ditto.
8015 (SELECT_CC_MODE): Use new function.
8016 (TARGET_FLAGS_REGNUM): New macro.
8017 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
8018 (cc0_reg_rtx): Remove.
8019 (CC_STATUS_MDEP): Remove.
8020 (CC_STATUS_MDEFP_INIT): Remove.
8021 (CC_IN_FPU): Remove.
8022 (NOTICE_UPDATE_CC): Remove.
8023 (REGISTER_NAMES): Add CC registers.
8024 (BRANCH_COST): Change to constant 1.
8025 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
8026 handling.
8027 * config/pdp11/pdp11.opt (mbcopy): Remove.
8028 (mbcopy-builtin): Remove.
8029 (mbranch-cheap): Remove.
8030 (mbranch-expensive): Remove.
8031 * config/pdp11/predicates.md (expand_shift_operand): Update to
8032 match shift code generation.
8033 (ccnz_operator): New predicate.
8034 * doc/invoke.texi (PDP-11 Options): Remove deleted options
8035 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
8036 Remove non-existent option -mabshi, -mno-abshi. Document mutually
8037 exclusive options.
8038 * doc/md.texi (PDP-11): Document new D and h constraints. Update
8039 description of O constraint.
8040
8041 2018-06-27 Jeff Law <law@redhat.com>
8042 Austin Law <austinklaw@gmail.com>
8043
8044 * config/v850/v850.md (addsi3_set_flags): New pattern.
8045 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
8046 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
8047 (zero_extendhisi2_v850_set_flags): Likewise.
8048 (zero_extendqisi2_v850_set_flags): Likewise.
8049 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
8050 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
8051 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
8052
8053 * config/v850/v850-protos.h (notice_update_cc): Remove.
8054 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
8055 (v850_print_operand): Handle 'D' and "d".
8056 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
8057 Add handling of arithmetic/logical operations compared against zero.
8058 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
8059 Do not look at v850_compare_op, instead get mode from last argument.
8060 (v850_gen_compare): Remove
8061 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
8062 after reload for prologue insns.
8063 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
8064 patterns.
8065 (construct_save_jarl): Likewise.
8066 (TARGET_FLAGS_REGNUM): Define.
8067 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
8068 (NOTICE_UPDATE_CC): Remove.
8069 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
8070 than cc0. Conditionalize on reload_completed.
8071 (cmpsi_insn, setfcc_insn): Likewise.
8072 (tst1 splitter): Turn into define_and_split which sets the flags
8073 after reload.
8074 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
8075 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
8076 (cstoresf4, cstoredf4): Clobber the flags.
8077 (cmpsi, cmpsf, cmpdf): Remove expanders.
8078 (setf_insn): Remove pattern.
8079 (addsi3): Turn into define_and_split which clobbers the flags after
8080 reload and a suitable pattern (addsi3_clobber_flags) for use after
8081 reload.
8082 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
8083 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
8084 (ashrsi3, ashrsi3_v850e2): Likewise.
8085 (bins): Clobber the flags.
8086 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
8087 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
8088 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
8089 (call_value_internal_short, call_value_internal_long): Likewise.
8090 (callt_save_interrupt, callt_return_interrupt): Likewise.
8091 (save_interrupt, return_interrupt): Likewise.
8092 (callt_save_all_interrupt, save_all_interrupt): Likewise.
8093 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
8094 (restore_all_interrupt, _restore_all_interrupt): Likewise.
8095 (All FP comparisons): Only allow after reload has completed.
8096 (trfsr): Likewise.
8097 (divh, divhu): Tweak output template.
8098 (branch_z_normal, branch_z_invert): Remove
8099 (branch_nz_normal, branch_nz_invert): Likewise.
8100 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
8101
8102 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
8103 * config/v850/v850.c (notice_update_cc): Remove.
8104 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
8105 (CC_NO_CARRY): Likewise.
8106 (NOTICE_UPDATE_CC): Define to nothing.
8107 * config/v850/v850.md: Remove block comment on cc0 handling
8108 Remove "cc" attribute from all patterns. Remove cc_status handling
8109 from all patterns. Minor formatting fixes.
8110
8111 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8112
8113 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
8114 (cortex-a76.cortex-a55): Likewise.
8115 * config/aarch64/aarch64-tune.md: Regenerate.
8116 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
8117 cortex-a76.cortex-a55.
8118
8119 2018-06-27 Jeff Law <law@redhat.com>
8120
8121 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
8122 (MULTILIB_DIRNAMES): Similarly.
8123
8124 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
8125
8126 * gimple.h (gimple_return_retbnd): Delete.
8127 (gimple_return_set_retbnd): Likewise.
8128 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
8129 gimple_return_set_retbnd.
8130 * gimple-pretty-print.c (dump_gimple_return): Remove call to
8131 gimple_return_retbnd and adjust.
8132 * tree-inline.h (struct copy_body_data): Remove retbnd field.
8133 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
8134 Explicitly return NULL in a couple more cases. Move assertion
8135 on debug statements and remove unreachable code.
8136 (reset_debug_binding): Do not test id->retbnd.
8137 (expand_call_inline): Do not set it.
8138
8139 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8140
8141 * configure.ac: Add --disable-gcov option.
8142 * configure: Regenerate.
8143 * Makefile.in: Honour @enable_gcov@.
8144 * doc/install.texi: Document --disable-gcov.
8145
8146 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8147
8148 * config/arm/arm-cpus.in (cortex-a76): New entry.
8149 (cortex-a76.cortex-a55): Likewise.
8150 * config/arm/arm-tables.opt: Regenerate.
8151 * config/arm/arm-tune.md: Likewise.
8152 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
8153 * doc/invoke.texi (ARM Options): Document cortex-a76 and
8154 cortex-a76.cortex-a55.
8155
8156 2018-06-27 Tamar Christina <tamar.christina@arm.com>
8157
8158 PR target/85769
8159 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
8160
8161 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
8162
8163 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
8164 comment.
8165 (EPILOGUE_USES): Likewise.
8166
8167 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
8168
8169 * tree-inline.c (remap_location): New function extracted from...
8170 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
8171 (copy_phis_for_bb): ...here. Call remap_location.
8172 (copy_cfg_body): Adjust call to copy_edges_for_bb.
8173
8174 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
8175
8176 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
8177 unaligned vsx for 16B memset.
8178
8179 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
8180
8181 PR target/86285
8182 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
8183 ieee128_float_type_node to long_double_type_node unless
8184 TARGET_LONG_DOUBLE_128 is set.
8185
8186 2018-06-26 David Malcolm <dmalcolm@redhat.com>
8187
8188 * cfgloop.c (get_loop_location): Convert return type from
8189 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
8190 by implicit construction from rtx_insn *, and using
8191 dump_user_location_t::from_function_decl for the fallback case.
8192 * cfgloop.h (get_loop_location): Convert return type from
8193 location_t to dump_user_location_t.
8194 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
8195 dump_printf_loc to pass in a dump_location_t rather than a
8196 location_t, via the gimple stmt.
8197 * coverage.c (get_coverage_counts): Update calls to
8198 dump_printf_loc to pass in dump_location_t rather than a
8199 location_t.
8200 * doc/optinfo.texi (Dump types): Convert example of
8201 dump_printf_loc from taking "locus" to taking "insn". Update
8202 description of the "_loc" calls to cover dump_location_t.
8203 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
8204 "selftest.h".
8205 (dump_user_location_t::dump_user_location_t): New constructors,
8206 from gimple *stmt and rtx_insn *.
8207 (dump_user_location_t::from_function_decl): New function.
8208 (dump_loc): Make static.
8209 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
8210 const dump_location_t &.
8211 (dump_generic_expr_loc): Delete.
8212 (dump_printf_loc): Convert param "loc" from location_t to
8213 const dump_location_t &.
8214 (selftest::test_impl_location): New function.
8215 (selftest::dumpfile_c_tests): New function.
8216 * dumpfile.h: Include "profile-count.h".
8217 (class dump_user_location_t): New class.
8218 (struct dump_impl_location_t): New struct.
8219 (class dump_location_t): New class.
8220 (dump_printf_loc): Convert 2nd param from source_location to
8221 const dump_location_t &.
8222 (dump_generic_expr_loc): Delete.
8223 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
8224 const dump_location_t &.
8225 * gimple-fold.c (fold_gimple_assign): Update call to
8226 dump_printf_loc to pass in a dump_location_t rather than a
8227 location_t, via the gimple stmt.
8228 (gimple_fold_call): Likewise.
8229 * gimple-loop-interchange.cc
8230 (loop_cand::analyze_iloop_reduction_var): Update for change to
8231 check_reduction_path.
8232 (tree_loop_interchange::interchange): Update for change to
8233 find_loop_location.
8234 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
8235 change in return-type of find_loop_location.
8236 (graphite_regenerate_ast_isl): Likewise.
8237 * graphite-optimize-isl.c (optimize_isl): Likewise.
8238 * graphite.c (graphite_transform_loops): Likewise.
8239 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
8240 pass in a dump_location_t rather than a location_t, via the
8241 gimple stmt.
8242 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8243 * ipa.c (walk_polymorphic_call_targets): Likewise.
8244 * loop-unroll.c (report_unroll): Convert "locus" param from
8245 location_t to dump_location_t.
8246 (decide_unrolling): Update for change to get_loop_location's
8247 return type.
8248 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
8249 location_t to dump_user_location_t.
8250 (grid_find_single_omp_among_assignments_1): Updates calls to
8251 dump_printf_loc to pass in a dump_location_t rather than a
8252 location_t, via the gimple stmt.
8253 (grid_parallel_clauses_gridifiable): Convert "tloc" from
8254 location_t to dump_location_t. Updates calls to dump_printf_loc
8255 to pass in a dump_location_t rather than a location_t, via the
8256 gimple stmt.
8257 (grid_inner_loop_gridifiable_p): Likewise.
8258 (grid_dist_follows_simple_pattern): Likewise.
8259 (grid_gfor_follows_tiling_pattern): Likewise.
8260 (grid_target_follows_gridifiable_pattern): Likewise.
8261 (grid_attempt_target_gridification): Convert initialization
8262 of local "grid" from memset to zero-initialization; FIXME: does
8263 this require C++11? Update call to dump_printf_loc to pass in a
8264 optinfo_location rather than a location_t, via the gimple stmt.
8265 * profile.c (read_profile_edge_counts): Updates call to
8266 dump_printf_loc to pass in a dump_location_t rather than a
8267 location_t
8268 (compute_branch_probabilities): Likewise.
8269 * selftest-run-tests.c (selftest::run_tests): Call
8270 dumpfile_c_tests.
8271 * selftest.h (dumpfile_c_tests): New decl.
8272 * tree-loop-distribution.c (pass_loop_distribution::execute):
8273 Update for change in return type of find_loop_location.
8274 * tree-parloops.c (parallelize_loops): Likewise.
8275 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
8276 "locus" from location_t to dump_user_location_t.
8277 (canonicalize_loop_induction_variables): Likewise.
8278 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
8279 for change in return type of find_loop_location.
8280 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
8281 to dump_printf_loc to pass in a dump_location_t rather than a
8282 location_t, via the stmt.
8283 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
8284 Likewise.
8285 * tree-vect-loop-manip.c (find_loop_location): Convert return
8286 type from source_location to dump_user_location_t.
8287 (vect_do_peeling): Update for above change.
8288 (vect_loop_versioning): Update for change in type of
8289 vect_location.
8290 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
8291 from location_t to dump_user_location_t.
8292 (vect_estimate_min_profitable_iters): Update for change in type
8293 of vect_location.
8294 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
8295 location_t to dump_location_t.
8296 (vect_slp_bb): Update for change in type of vect_location.
8297 * tree-vectorizer.c (vect_location): Convert from source_location
8298 to dump_user_location_t.
8299 (try_vectorize_loop_1): Update for change in vect_location's type.
8300 (vectorize_loops): Likewise.
8301 (increase_alignment): Likewise.
8302 * tree-vectorizer.h (vect_location): Convert from source_location
8303 to dump_user_location_t.
8304 (find_loop_location): Convert return type from source_location to
8305 dump_user_location_t.
8306 (check_reduction_path): Convert 1st param from location_t to
8307 dump_user_location_t.
8308 * value-prof.c (check_counter): Update call to dump_printf_loc to
8309 pass in a dump_user_location_t rather than a location_t; update
8310 call to error_at for change in type of "locus".
8311 (check_ic_target): Update call to dump_printf_loc to
8312 pass in a dump_user_location_t rather than a location_t, via the
8313 call_stmt.
8314
8315 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
8316
8317 * config/s390/s390.h (enum processor_flags): Do not use
8318 default tune parameter when -march was specified.
8319
8320 2018-06-26 Jakub Jelinek <jakub@redhat.com>
8321
8322 PR target/86314
8323 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
8324 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
8325 operands.
8326
8327 2018-06-26 Richard Biener <rguenther@suse.de>
8328
8329 PR tree-optimization/86287
8330 PR bootstrap/86316
8331 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
8332 (vect_analyze_loop): Initialize n_stmts.
8333
8334 2018-06-26 Richard Biener <rguenther@suse.de>
8335
8336 PR middle-end/86271
8337 * fold-const.c (fold_convertible_p): Pointer extension
8338 isn't valid.
8339
8340 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
8341
8342 PR debug/86064
8343 * dwarf2out.c (loc_list_has_views): Adjust comments.
8344 (dw_loc_list): Split single cross-partition range with
8345 nonzero locview.
8346
8347 2018-06-25 Jeff Law <law@redhat.com>
8348
8349 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8350 on -mbig-switch by default.
8351
8352 * config/v850/predicates.md (const_float_1_operand): Fix match_code
8353 test.
8354 (const_float_0_operand): Remove unused predicate.
8355 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8356 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8357 (recipsf2): New expander. Original pattern now called
8358 (recipsf2_insn).
8359 (recipdf2, recipdf2_insn): Similarly.
8360 (rsqrtsf2, rsqrtsf2_insn): Similarly
8361 (rsqrtdf2, rsqrtdf2_insn): Similarly
8362
8363 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
8364
8365 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8366 Simplify logic for FreeBSD (twice).
8367
8368 2018-06-25 Martin Sebor <msebor@redhat.com>
8369
8370 PR tree-optimization/86204
8371 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8372 a strnlen result if it's less than the length of the string.
8373
8374 2018-06-25 Martin Sebor <msebor@redhat.com>
8375
8376 PR tree-optimization/85700
8377 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8378 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8379 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8380
8381 2018-06-25 Martin Sebor <msebor@redhat.com>
8382
8383 * doc/extend.texi (Zero-length arrays): Update and clarify.
8384
8385 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
8386
8387 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8388 added IEEE/IBM long double multilib support on PowerPC little
8389 endian Linux systems.
8390 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8391 (MULTILIB_DEFAULTS): Likewise.
8392 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8393 Likewise.
8394 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8395 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8396 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8397
8398 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
8399
8400 PR middle-end/86311
8401 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8402 (REORDER_45): Likewise.
8403
8404 2018-06-25 Jeff Law <law@redhat.com>
8405
8406 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8407 dividend to 32 bits. Adjust length.
8408 (udivmodhi4): Cleanup output template. Fix length.
8409
8410 2018-06-25 Carl Love <cel@us.ibm.com>
8411
8412 * config/rs6000/vsx.md: Change word selector to prefered location.
8413
8414 2018-06-25 Richard Biener <rguenther@suse.de>
8415
8416 PR tree-optimization/86304
8417 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8418 epilogue-if-converted loops as well.
8419
8420 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
8421
8422 * lto-section-out.c (lto_begin_section): Do not print section
8423 name for noaddr and unnumbered dumps.
8424
8425 2018-06-25 Richard Biener <rguenther@suse.de>
8426
8427 * tree-vectorizer.h (struct vec_info_shared): New structure
8428 with parts split out from struct vec_info and loop_nest from
8429 struct _loop_vec_info.
8430 (struct vec_info): Adjust accordingly.
8431 (struct _loop_vec_info): Likewise.
8432 (LOOP_VINFO_LOOP_NEST): Adjust.
8433 (LOOP_VINFO_DATAREFS): Likewise.
8434 (LOOP_VINFO_DDRS): Likewise.
8435 (struct _bb_vec_info): Likewise.
8436 (BB_VINFO_DATAREFS): Likewise.
8437 (BB_VINFO_DDRS): Likewise.
8438 (struct _stmt_vec_info): Add dr_aux member.
8439 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8440 (DR_MISALIGNMENT_UNINITIALIZED): New.
8441 (set_dr_misalignment): Adjust.
8442 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8443 (vect_analyze_loop): Adjust prototype.
8444 (vect_analyze_loop_form): Likewise.
8445 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8446 Compute dependences lazily.
8447 (vect_record_base_alignments): Use shared datarefs/ddrs.
8448 (vect_verify_datarefs_alignment): Likewise.
8449 (vect_analyze_data_refs_alignment): Likewise.
8450 (vect_analyze_data_ref_accesses): Likewise.
8451 (vect_analyze_data_refs): Likewise.
8452 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8453 constructor parameter for shared part.
8454 (vect_analyze_loop_form): Pass in shared part and adjust.
8455 (vect_analyze_loop_2): Pass in storage for the number of
8456 stmts. Move loop nest finding to the caller. Compute
8457 datarefs lazily.
8458 (vect_analyze_loop): Pass in shared part.
8459 (vect_transform_loop): Verify shared datarefs are unchanged.
8460 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8461 constructor parameter for shared part.
8462 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8463 (vect_slp_bb): Verify shared datarefs are unchanged before
8464 transform.
8465 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8466 change.
8467 (new_stmt_vec_info): Initialize DR_AUX misalignment to
8468 DR_MISALIGNMENT_UNINITIALIZED.
8469 * tree-vectorizer.c (vec_info::vec_info): Add constructor
8470 parameter for shared part.
8471 (vec_info::~vec_info): Adjust.
8472 (vec_info_shared::vec_info_shared): New.
8473 (vec_info_shared::~vec_info_shared): Likewise.
8474 (vec_info_shared::save_datarefs): Likewise.
8475 (vec_info_shared::check_datarefs): Likewise.
8476 (try_vectorize_loop_1): Construct shared part live for analyses
8477 of a single loop for multiple vector sizes.
8478 * tree-parloops.c (gather_scalar_reductions): Adjust.
8479
8480 2018-06-25 Richard Biener <rguenther@suse.de>
8481
8482 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8483 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8484 (vect_analyze_data_refs): Remove similar code from here and
8485 simplify accordingly.
8486
8487 2018-06-25 Richard Biener <rguenther@suse.de>
8488
8489 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8490 for reverse storage order accesses rather than asserting
8491 they cannot happen here.
8492
8493 2018-06-25 Tom de Vries <tdevries@suse.de>
8494
8495 PR debug/86257
8496 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8497 Use data16 instead of .byte for insn prefix.
8498
8499 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
8500
8501 PR C++/86082
8502 * parser.c (make_char_string_pack): Pass this literal chars
8503 through cpp_interpret_string.
8504 (cp_parser_userdef_numeric_literal): Check the result of
8505 make_char_string_pack.
8506
8507 2018-06-24 Maya Rashish <coypu@sdf.org>
8508
8509 * ginclude/stddef.h: Simplify conditions around avoiding
8510 re-definition of __size_t.
8511
8512 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8513
8514 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8515 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8516
8517 2018-06-22 Maya Rashish <coypu@sdf.org>
8518
8519 * doc/invoke.texi (mno-fancy-math-387): Update for changes
8520 made to OpenBSD and NetBSD through the years.
8521
8522 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8523
8524 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8525 behavior of vec_pack (vector double, vector double) to match
8526 behavior of vec_float2 (vector double, vector double).
8527
8528 2018-06-22 Olivier Hainque <hainque@adacore.com>
8529
8530 * gimplify.c (gimplify_function_tree): Prevent creation
8531 of a trampoline for the address of the current function
8532 passed to entry/exit instrumentation hooks.
8533
8534 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
8535
8536 PR target/86222
8537 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8538 correctly.
8539
8540 2018-06-22 Martin Liska <mliska@suse.cz>
8541
8542 PR tree-optimization/86263
8543 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8544 Bail out if is_enabled is false.
8545 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8546 New declaration.
8547 (jump_table_cluster::is_enabled): New function.
8548
8549 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8550
8551 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8552 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8553 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8554 (lto_input_ts_binfo_tree_pointers): Likewise.
8555 * tree-streamer-out.c (streamer_write_tree_bitfields,
8556 write_ts_binfo_tree_pointers): Likewise.
8557 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8558
8559 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8560
8561 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8562
8563 2018-06-22 Martin Liska <mliska@suse.cz>
8564
8565 * symbol-summary.h (get): Make it pure and inline move
8566 functionality from ::get function.
8567 (get): Remove and inline into ::get and ::get_create.
8568 (get_create): Move code from ::get function.
8569
8570 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8571
8572 PR target/85994
8573 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8574 -x assembler-with-cpp.
8575
8576 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8577
8578 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8579 _FILE_OFFSET_BITS=64 for C++.
8580
8581 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8582
8583 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8584 conversion insn that shows up when pr85657-3.c is compiled using
8585 IEEE 128-bit long double.
8586 (neg<mode>2_internal): Use the correct mode to check whether the
8587 mode is IBM extended.
8588 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8589 multiply and divide external functions from being created more
8590 than once.
8591
8592 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8593
8594 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8595 functions.
8596 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8597 the edge can be forwarded.
8598 (cfg_layout_merge_blocks): Likewise.
8599
8600 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8601
8602 * except.c (finish_eh_generation): Commit edge insertions only after
8603 the EH edges have been redirected from post-landing to landing pads.
8604
8605 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8606
8607 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8608 create_tmp_var_for to create the FRAME decl.
8609 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8610
8611 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8612
8613 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8614 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8615 debug statement when resetting its value.
8616 (expand_call_inline): Copy the locus of the call onto the assignment
8617 of the return value, if any. Use local variable in more cases.
8618
8619 2018-06-21 Martin Liska <mliska@suse.cz>
8620
8621 * ipa-pure-const.c (propagate_nothrow): Use
8622 funct_state_summaries->get.
8623 (dump_malloc_lattice): Likewise.
8624 (propagate_malloc): Likewise.
8625
8626 2018-06-21 Richard Biener <rguenther@suse.de>
8627
8628 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8629 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8630 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8631 comment.
8632 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8633 BLOCK_ABSTRACT_ORIGIN unconditionally.
8634
8635 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8636
8637 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8638 deleting it.
8639 * ipa-reference.c (ipa_reference_c_finalize): Delete
8640 ipa_ref_opt_sum_summaries and set it to NULL.
8641
8642 2018-06-21 Tom de Vries <tdevries@suse.de>
8643
8644 PR tree-optimization/85859
8645 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8646 test with comment from bb_no_side_effects_p.
8647
8648 2018-06-21 Richard Biener <rguenther@suse.de>
8649
8650 PR tree-optimization/86232
8651 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8652 max for constant niter.
8653
8654 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8655
8656 * config/aarch64/aarch64-simd.md
8657 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8658
8659 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8660
8661 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8662 Make opernads of the unspec commutative.
8663
8664 2018-06-21 Richard Biener <rguenther@suse.de>
8665
8666 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8667 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8668 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8669 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8670 NULL DR_STEP.
8671 (vect_record_base_alignments): Do not record base alignment
8672 for gathers or scatters.
8673 (vect_compute_data_ref_alignment): Drop return value that is always
8674 true. Bail out early for gathers or scatters.
8675 (vect_enhance_data_refs_alignment): Bail out early for gathers
8676 or scatters.
8677 (vect_find_same_alignment_drs): Likewise.
8678 (vect_analyze_data_refs_alignment): Remove dead code.
8679 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8680 (vect_analyze_data_refs): For possible gathers or scatters do
8681 not create an alternate DR, just check their possible validity
8682 and mark them. Adjust DECL_NONALIASED handling to not rely
8683 on DR_BASE_ADDRESS.
8684 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8685 update inits of gathers or scatters.
8686 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8687 Also copy gather/scatter flag to pattern vinfo.
8688
8689 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8690
8691 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8692 behavior of vec_packsu (vector unsigned long long, vector unsigned
8693 long long) to match behavior of vec_packs with same signature.
8694
8695 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8696 Thomas Schwinge <thomas@codesourcery.com>
8697 Cesar Philippidis <cesar@codesourcery.com>
8698
8699 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8700 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8701 (gimplify_adjust_omp_clauses): Likewise.
8702 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8703 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8704 (gimplify_omp_target_update): Update handling of acc update and
8705 enter/exit data.
8706 * omp-low.c (install_var_field): Remove unused parameter
8707 base_pointers_restrict.
8708 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8709 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8710 FINALIZE}
8711 (omp_target_base_pointers_restrict_p): Delete.
8712 (scan_omp_target): Update call to scan_sharing_clauses.
8713 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8714 FINALIZE}.
8715 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8716 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8717 (convert_local_omp_clauses): Likewise.
8718 * tree-pretty-print.c (dump_omp_clause): Likewise.
8719 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8720 FINALIZE}.
8721 (omp_clause_code_name): Likewise.
8722
8723 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8724
8725 PR debug/86194
8726 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8727 be narrowed.
8728
8729 PR tree-optimization/86231
8730 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8731 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8732
8733 2018-06-20 Tom de Vries <tdevries@suse.de>
8734
8735 PR tree-optimization/86097
8736 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8737 iv type if signedness of iv type is not the same as that of *nit.
8738
8739 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8740
8741 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8742 EDGE_EH edges, verify they are all EDGE_EH.
8743
8744 2018-06-20 Maya Rashish <coypu@sdf.org>
8745
8746 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8747
8748 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8749
8750 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8751 * config/aarch64/aarch64.c (xgene1_tunings): Add
8752 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8753 (aarch64_mode_valid_for_sched_fusion_p):
8754 Allow 16-byte modes.
8755 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8756 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8757 128-bit modes.
8758 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8759 New pattern.
8760 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8761 * config/aarch64/iterators.md (VQ2): New mode iterator.
8762
8763 2018-06-20 Martin Liska <mliska@suse.cz>
8764
8765 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8766 Change default ratio from 10 to 8.
8767
8768 2018-06-20 Martin Liska <mliska@suse.cz>
8769
8770 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8771 New.
8772 (bit_test_cluster::find_bit_tests): Likewise.
8773 (switch_decision_tree::analyze_switch_statement): Find clusters.
8774 * tree-switch-conversion.h (struct jump_table_cluster): Document
8775 hierarchy.
8776
8777 2018-06-20 Martin Liska <mliska@suse.cz>
8778
8779 * tree-switch-conversion.c (switch_conversion::collect):
8780 Record m_uniq property.
8781 (switch_conversion::expand): Bail out for special conditions.
8782 (group_cluster::~group_cluster): New.
8783 (group_cluster::group_cluster): Likewise.
8784 (group_cluster::dump): Likewise.
8785 (jump_table_cluster::emit): New.
8786 (switch_decision_tree::fix_phi_operands_for_edges): New.
8787 (struct case_node): Remove struct.
8788 (jump_table_cluster::can_be_handled): New.
8789 (case_values_threshold): Moved to header.
8790 (reset_out_edges_aux): Likewise.
8791 (jump_table_cluster::is_beneficial): New.
8792 (bit_test_cluster::can_be_handled): Likewise.
8793 (add_case_node): Remove.
8794 (bit_test_cluster::is_beneficial): New.
8795 (case_bit_test::cmp): New.
8796 (bit_test_cluster::emit): New.
8797 (expand_switch_as_decision_tree_p): Remove.
8798 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8799 (fix_phi_operands_for_edge): Likewise.
8800 (switch_decision_tree::analyze_switch_statement): New.
8801 (compute_cases_per_edge): Move ...
8802 (switch_decision_tree::compute_cases_per_edge): ... here.
8803 (try_switch_expansion): Likewise.
8804 (switch_decision_tree::try_switch_expansion): Likewise.
8805 (record_phi_operand_mapping): Likewise.
8806 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8807 (emit_case_decision_tree): Likewise.
8808 (switch_decision_tree::emit): Likewise.
8809 (balance_case_nodes): Likewise.
8810 (switch_decision_tree::balance_case_nodes): Likewise.
8811 (dump_case_nodes): Likewise.
8812 (switch_decision_tree::dump_case_nodes): Likewise.
8813 (emit_jump): Likewise.
8814 (switch_decision_tree::emit_jump): Likewise.
8815 (emit_cmp_and_jump_insns): Likewise.
8816 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8817 (emit_case_nodes): Likewise.
8818 (switch_decision_tree::emit_case_nodes): Likewise.
8819 (conditional_probability): Remove.
8820 * tree-switch-conversion.h (enum cluster_type): New.
8821 (PRINT_CASE): New.
8822 (struct cluster): Likewise.
8823 (cluster::cluster): Likewise.
8824 (struct simple_cluster): Likewise.
8825 (simple_cluster::simple_cluster): Likewise.
8826 (struct group_cluster): Likewise.
8827 (struct jump_table_cluster): Likewise.
8828 (struct bit_test_cluster): Likewise.
8829 (struct min_cluster_item): Likewise.
8830 (struct case_tree_node): Likewise.
8831 (case_tree_node::case_tree_node): Likewise.
8832 (jump_table_cluster::case_values_threshold): Likewise.
8833 (struct case_bit_test): Likewise.
8834 (struct switch_decision_tree): Likewise.
8835 (struct switch_conversion): Likewise.
8836 (switch_decision_tree::reset_out_edges_aux): Likewise.
8837
8838 2018-06-20 Martin Liska <mliska@suse.cz>
8839
8840 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8841 (hoist_edge_and_branch_if_true): Likewise.
8842 (expand_switch_using_bit_tests_p): Likewise.
8843 (struct case_bit_test): Likewise.
8844 (case_bit_test_cmp): Likewise.
8845 (emit_case_bit_tests): Likewise.
8846 (switch_conversion::switch_conversion): New class.
8847 (struct switch_conv_info): Remove old struct.
8848 (collect_switch_conv_info): More to ...
8849 (switch_conversion::collect): ... this.
8850 (check_range): Likewise.
8851 (switch_conversion::check_range): Likewise.
8852 (check_all_empty_except_final): Likewise.
8853 (switch_conversion::check_all_empty_except_final): Likewise.
8854 (check_final_bb): Likewise.
8855 (switch_conversion::check_final_bb): Likewise.
8856 (create_temp_arrays): Likewise.
8857 (switch_conversion::create_temp_arrays): Likewise.
8858 (free_temp_arrays): Likewise.
8859 (gather_default_values): Likewise.
8860 (switch_conversion::gather_default_values): Likewise.
8861 (build_constructors): Likewise.
8862 (switch_conversion::build_constructors): Likewise.
8863 (constructor_contains_same_values_p): Likewise.
8864 (switch_conversion::contains_same_values_p): Likewise.
8865 (array_value_type): Likewise.
8866 (switch_conversion::array_value_type): Likewise.
8867 (build_one_array): Likewise.
8868 (switch_conversion::build_one_array): Likewise.
8869 (build_arrays): Likewise.
8870 (switch_conversion::build_arrays): Likewise.
8871 (gen_def_assigns): Likewise.
8872 (switch_conversion::gen_def_assigns): Likewise.
8873 (prune_bbs): Likewise.
8874 (switch_conversion::prune_bbs): Likewise.
8875 (fix_phi_nodes): Likewise.
8876 (switch_conversion::fix_phi_nodes): Likewise.
8877 (gen_inbound_check): Likewise.
8878 (switch_conversion::gen_inbound_check): Likewise.
8879 (process_switch): Use the newly created class.
8880 (switch_conversion::expand): New.
8881 (switch_conversion::~switch_conversion): New.
8882 * tree-switch-conversion.h: New file.
8883
8884 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8885
8886 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8887 tree-vect-patterns.c.
8888 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8889 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8890 (vect_recog_sad_pattern): Likewise.
8891 (vect_recog_widen_sum_pattern): Likewise.
8892 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8893 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8894 (vect_recog_rotate_pattern): Likewise.
8895 (vect_recog_mult_pattern): Likewise.
8896 (vect_recog_vector_vector_shift_pattern): Likewise.
8897 (vect_recog_divmod_pattern): Likewise.
8898 (vect_recog_mixed_size_cond_pattern): Likewise.
8899 (vect_recog_bool_pattern): Likewise.
8900 (vect_recog_mask_conversion_pattern): Likewise.
8901 (vect_try_gather_scatter_pattern): Likewise.
8902 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8903 (vect_recog_over_widening_pattern): Likewise.
8904 (vect_recog_gather_scatter_pattern): Likewise.
8905 (vect_recog_func_ptr): Move from tree-vectorizer.h
8906 (vect_vect_recog_func_ptrs): Move further down the file.
8907 (vect_recog_func): Likewise. Remove the third argument.
8908 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8909 (vect_pattern_recog_1): Expect the pattern function to do any
8910 necessary target tests. Also expect it to provide a vector type.
8911 Remove the type_in handling.
8912
8913 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8914
8915 * tree-vect-patterns.c (vect_pattern_detected): New function.
8916 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8917 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8918 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8919 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8920 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8921 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8922 (vect_recog_mask_conversion_pattern)
8923 (vect_try_gather_scatter_pattern): Likewise.
8924
8925 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8926
8927 * tree-vect-patterns.c (vect_get_internal_def): New function.
8928 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8929 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8930 (search_type_for_mask_1): Use it.
8931
8932 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8933
8934 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8935 redundant WIDEN_SUM_EXPR handling.
8936 (vect_recog_sad_pattern): Likewise.
8937
8938 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8939
8940 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8941 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8942 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8943 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8944 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8945
8946 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8947
8948 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8949 use the stmt_vec_info of the original bb statement for the
8950 new zero assignment, even if the call is part of a pattern.
8951
8952 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8953
8954 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8955 that the sequence is attached to the original statement rather
8956 than the pattern statement.
8957 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8958 PATTERN_DEF_SEQ from the original statement rather than
8959 the main pattern statement.
8960 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8961 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8962 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8963
8964 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8965
8966 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8967 definition statements before the early exit for statements that aren't
8968 live or relevant.
8969 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8970 split out from...
8971 (vect_transform_loop): ...here. Process pattern definition
8972 statements without first checking whether the main pattern
8973 statement is live or relevant.
8974
8975 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8976
8977 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8978 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8979
8980 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8981
8982 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8983 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8984 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8985 (expand_block_compare): Change select_block_compare_mode call.
8986 (expand_strncmp_align_check): Use new functions, fix comment.
8987 (emit_final_str_compare_gpr): New function.
8988 (expand_strn_compare): Refactor and clean up code.
8989 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8990
8991 2018-06-19 Tony Reix <tony.reix@atos.com>
8992 Damien Bergamini <damien.bergamini@atos.com>
8993 David Edelsohn <dje.gcc@gmail.com>
8994
8995 * collect2.c (static_obj): New variable.
8996 (static_libs): New variable.
8997 (is_in_list): Uncomment declaration.
8998 (main): Track AIX libraries linked statically.
8999 (is_in_list): Uncomment definition.
9000 (scan_prog_file): Don't add AIX shared libraries initializer
9001 to constructor list if linking statically.
9002
9003 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
9004
9005 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
9006 constant.
9007 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
9008
9009 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
9010
9011 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
9012 blocks.
9013
9014 2018-06-19 Martin Liska <mliska@suse.cz>
9015
9016 * config/i386/i386.c (ix86_can_inline_p): Do not use
9017 ipa_fn_summaries::get_create.
9018 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
9019 get.
9020 (devirtualization_time_bonus): Likewise.
9021 (ipcp_propagate_stage): Likewise.
9022 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9023 (edge_set_predicate): Likewise.
9024 (evaluate_conditions_for_known_args): Likewise.
9025 (evaluate_properties_for_edge): Likewise.
9026 (ipa_call_summary::reset): Tranform to ...
9027 (ipa_call_summary::~ipa_call_summary): ... this.
9028 (ipa_fn_summary::reset): Transform to ...
9029 (ipa_fn_summary::~ipa_fn_summary): ... this.
9030 (ipa_fn_summary_t::remove): Rename to ...
9031 (ipa_fn_summary_t::remove_callees): ... this.
9032 (ipa_fn_summary_t::duplicate): Use placement new
9033 instead of memory copy.
9034 (ipa_call_summary_t::duplicate): Likewise.
9035 (ipa_call_summary_t::remove): Remove.
9036 (dump_ipa_call_summary): Change get_create to get.
9037 (ipa_dump_fn_summary): Dump only when summary exists.
9038 (analyze_function_body): Use symbol_summary::get instead
9039 of get_create.
9040 (compute_fn_summary): Likewise.
9041 (estimate_edge_devirt_benefit): Likewise.
9042 (estimate_edge_size_and_time): Likewise.
9043 (inline_update_callee_summaries): Likewise.
9044 (remap_edge_change_prob): Likewise.
9045 (remap_edge_summaries): Likewise.
9046 (ipa_merge_fn_summary_after_inlining): Likewise.
9047 (write_ipa_call_summary): Likewise.
9048 (ipa_fn_summary_write): Likewise.
9049 (ipa_free_fn_summary): Likewise.
9050 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
9051 (struct ipa_call_summary): Likewise.
9052 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
9053 of get_create.
9054 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
9055 (estimate_size_after_inlining): Likewise.
9056 (estimate_growth): Likewise.
9057 (growth_likely_positive): Likewise.
9058 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9059 (inline_call): Likewise.
9060 * ipa-inline.c (caller_growth_limits): Likewise.
9061 (can_inline_edge_p): Likewise.
9062 (can_inline_edge_by_limits_p): Likewise.
9063 (compute_uninlined_call_time): Likewise.
9064 (compute_inlined_call_time): Likewise.
9065 (want_inline_small_function_p): Likewise.
9066 (edge_badness): Likewise.
9067 (update_caller_keys): Likewise.
9068 (update_callee_keys): Likewise.
9069 (inline_small_functions): Likewise.
9070 (inline_to_all_callers_1): Likewise.
9071 (dump_overall_stats): Likewise.
9072 (early_inline_small_functions): Likewise.
9073 (early_inliner): Likewise.
9074 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9075 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9076 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9077 * ipa-split.c (execute_split_functions): Likewise.
9078 * symbol-summary.h: Likewise.
9079 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9080
9081 2018-06-19 Richard Biener <rguenther@suse.de>
9082
9083 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
9084 (vectorize_loops): ... here. Fix dbgcnt handling.
9085 (try_vectorize_loop): Wrap try_vectorize_loop_1.
9086
9087 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
9088
9089 PR target/86197
9090 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
9091 ieee128 argument takes up only one (vector) register, not two (floating
9092 point) registers.
9093
9094 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
9095
9096 * gimplify.c (gimplify_init_constructor): Really never clear for an
9097 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
9098
9099 2018-06-19 Richard Biener <rguenther@suse.de>
9100
9101 PR tree-optimization/86179
9102 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
9103 after failed recognition.
9104
9105 2018-06-18 Martin Sebor <msebor@redhat.com>
9106
9107 PR middle-end/85602
9108 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
9109 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
9110 Handle integer subtraction.
9111 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
9112 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
9113
9114 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9115
9116 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
9117 param from rtx to rtx_insn *.
9118 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
9119 param.
9120 (frv_ifcvt_modify_insn): Likwise.
9121 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
9122 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
9123 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
9124 as_a <rtx_insn *> cast to local "unprotected_region" once
9125 it's been established that it's not NULL or pc_rtx.
9126 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
9127 param "sethi" from rtx to rtx_insn *.
9128 (nds32_group_float_insns): Likewise for param "insn".
9129 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
9130 param.
9131 (vax_output_int_subtract): Likewise.
9132 * config/vax/vax.c (vax_output_int_add): Likewise for param
9133 "insn".
9134 (vax_output_int_subtract): Likewise.
9135 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
9136 (emit_pattern_after): Likewise for param "after".
9137 (emit_insn_after): Likewise.
9138 (emit_jump_insn_after): Likewise.
9139 (emit_call_insn_after): Likewise.
9140 (emit_debug_insn_after): Likewise.
9141 (emit_pattern_before): Likewise for param "before".
9142 (emit_insn_before): Likewise.
9143 (emit_jump_insn_before): Likewise.
9144 * final.c (get_insn_template): Likewise for param "insn", removing
9145 a cast.
9146 * output.h (get_insn_template): Likewise for 2nd param.
9147 * rtl.h (emit_insn_before): Likewise.
9148 (emit_jump_insn_before): Likewise.
9149 (emit_debug_insn_before_noloc): Likewise.
9150 (emit_insn_after): Likewise.
9151 (emit_jump_insn_after): Likewise.
9152 (emit_call_insn_after): Likewise.
9153 (emit_debug_insn_after): Likewise.
9154 (set_insn_deleted): Likewise for param.
9155
9156 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
9157
9158 PR target/85358
9159 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
9160 floating point modes, so that IFmode is numerically greater than
9161 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
9162 to declare the ordering. This prevents IFmode from being
9163 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
9164 machine. Include rs6000-modes.h to share the fractional values
9165 between genmodes* and the rest of the compiler.
9166 (IFmode): Likewise.
9167 (KFmode): Likewise.
9168 (TFmode): Likewise.
9169 * config/rs6000/rs6000-modes.h: New file.
9170 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
9171 meaning of rs6000_long_double_size so that 126..128 selects an
9172 appropriate 128-bit floating point type.
9173 (rs6000_option_override_internal): Likewise.
9174 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
9175 (TARGET_LONG_DOUBLE_128): Change the meaning of
9176 rs6000_long_double_size so that 126..128 selects an appropriate
9177 128-bit floating point type.
9178 (LONG_DOUBLE_TYPE_SIZE): Update comment.
9179 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
9180 source and destination to match the standard usage.
9181 (truncifkf2): Likewise.
9182 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
9183 ISA 2.07 to use an explicit clobber, instead of passing in a
9184 temporary.
9185 (copysign<mode>3_soft): Likewise.
9186
9187 2018-06-18 David Malcolm <dmalcolm@redhat.com>
9188
9189 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9190 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
9191 (vect_slp_analyze_instance_dependence): Likewise.
9192 (vect_enhance_data_refs_alignment): Likewise.
9193 (vect_analyze_data_refs_alignment): Likewise.
9194 (vect_slp_analyze_and_verify_instance_alignment
9195 (vect_analyze_data_ref_accesses): Likewise.
9196 (vect_prune_runtime_alias_test_list): Likewise.
9197 (vect_analyze_data_refs): Likewise.
9198 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
9199 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
9200 (vect_analyze_scalar_cycles_1): Likewise.
9201 (vect_get_loop_niters): Likewise.
9202 (vect_analyze_loop_form_1): Likewise.
9203 (vect_update_vf_for_slp): Likewise.
9204 (vect_analyze_loop_operations): Likewise.
9205 (vect_analyze_loop): Likewise.
9206 (vectorizable_induction): Likewise.
9207 (vect_transform_loop): Likewise.
9208 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
9209 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9210 (vect_make_slp_decision): Likewise.
9211 (vect_detect_hybrid_slp): Likewise.
9212 (vect_slp_analyze_operations): Likewise.
9213 (vect_slp_bb): Likewise.
9214 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
9215 (vectorizable_bswap): Likewise.
9216 (vectorizable_call): Likewise.
9217 (vectorizable_simd_clone_call): Likewise.
9218 (vectorizable_conversion): Likewise.
9219 (vectorizable_assignment): Likewise.
9220 (vectorizable_shift): Likewise.
9221 (vectorizable_operation): Likewise.
9222 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
9223
9224 2018-06-18 Martin Sebor <msebor@redhat.com>
9225
9226 PR tree-optimization/81384
9227 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
9228 * builtins.c (expand_builtin_strnlen): New function.
9229 (expand_builtin): Call it.
9230 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
9231 * builtins.def (BUILT_IN_STRNLEN): New.
9232 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
9233 Warn for bounds in excess of maximum object size.
9234 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
9235 single-value ranges. Handle strnlen.
9236 (handle_builtin_strlen): Handle strnlen.
9237 (strlen_check_and_optimize_stmt): Same.
9238 * doc/extend.texi (Other Builtins): Document strnlen.
9239
9240 2018-06-18 Maya Rashish <coypu@sdf.org>
9241
9242 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
9243 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
9244 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
9245
9246 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
9247 here to ...
9248 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
9249
9250 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9251
9252 * tree.c (escaped_string::escape): Replace cast to char * by
9253 const_cast<char *> (unescaped).
9254
9255 2018-06-18 Nick Clifton <nickc@redhat.com>
9256
9257 PR 84195
9258 * tree.c (escaped_string): New class. Converts an unescaped
9259 string into its escaped equivalent.
9260 (warn_deprecated_use): Use the new class to convert the
9261 deprecation message, if present.
9262 (test_escaped_strings): New self test.
9263 (test_c_tests): Add test_escaped_strings.
9264 * doc/extend.texi (deprecated): Add a note that the
9265 deprecation message is affected by the -fmessage-length
9266 option, and that control characters will be escaped.
9267 (#pragma GCC error): Document this pragma.
9268 (#pragma GCC warning): Likewise.
9269 * doc/invoke.texi (-fmessage-length): Document this option's
9270 effect on the #warning and #error preprocessor directives and
9271 the deprecated attribute.
9272
9273 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
9274
9275 * tree.c (decl_value_expr_lookup): Revert latest change.
9276 (decl_value_expr_insert): Likewise.
9277
9278 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
9279
9280 * gimplify.c (nonlocal_vlas): Delete.
9281 (nonlocal_vla_vars): Likewise.
9282 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
9283 referenced VLAs.
9284 (gimplify_body): Do not create and destroy nonlocal_vlas.
9285 * tree-nested.c: Include diagnostic.h.
9286 (use_pointer_in_frame): Tweak.
9287 (lookup_field_for_decl): Add assertion and declare the transformation.
9288 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
9289 internal error when the reference is in a wrong context. Do not
9290 create a debug decl by default.
9291 (note_nonlocal_block_vlas): Delete.
9292 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
9293 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
9294 create a debug decl by default.
9295 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
9296 call is in a wrong context.
9297 (fixup_vla_decls): New function.
9298 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
9299 debug variables were created.
9300 * tree.c (decl_value_expr_lookup): Add checking assertion.
9301 (decl_value_expr_insert): Likewise.
9302
9303 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9304
9305 PR middle-end/82479
9306 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
9307 * tree-scalar-evolution.c (interpret_expr): Likewise.
9308 (expression_expensive_p): Likewise.
9309 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
9310 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
9311 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
9312 (ssa_defined_by_minus_one_stmt_p): New.
9313
9314 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
9315
9316 PR middle-end/64946
9317 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
9318 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
9319 * dojump.c (do_jump): Likewise.
9320 * expr.c (expand_expr_real_2): Check operand type's sign.
9321 * fold-const.c (const_unop): Handle ABSU_EXPR.
9322 (fold_abs_const): Likewise.
9323 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
9324 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
9325 (strip_sign_op_1): Likesise.
9326 * match.pd: Add new pattern to generate ABSU_EXPR.
9327 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
9328 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9329 * tree-eh.c (operation_could_trap_helper_p): Likewise.
9330 * tree-inline.c (estimate_operator_cost): Likewise.
9331 * tree-pretty-print.c (dump_generic_node): Likewise.
9332 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
9333 * tree.def (ABSU_EXPR): New.
9334
9335 2018-06-16 Jakub Jelinek <jakub@redhat.com>
9336
9337 PR middle-end/86095
9338 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
9339 documented as preserved for backward compatibility only.
9340 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9341
9342 PR rtl-optimization/86108
9343 * bb-reorder.c (create_forwarder_block): Renamed to ...
9344 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
9345 jump from new landing pad to the second part.
9346 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9347 Adjust callers.
9348
9349 2018-06-15 Jakub Jelinek <jakub@redhat.com>
9350
9351 PR middle-end/85878
9352 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9353 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9354 Only call store_expr for halves if the mode is the same.
9355
9356 PR middle-end/86123
9357 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9358 Fix up comment formatting.
9359
9360 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
9361
9362 * typed-splay-tree.h (typed_splay_tree::remove): New function.
9363 (typed_splay_tree::closure,
9364 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9365 (typed_splay_tree::typed_splay_tree,
9366 typed_splay_tree::operator =): Declared private.
9367 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9368 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9369 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9370 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9371 typed_splay_tree::splay_tree_splay,
9372 typed_splay_tree::splay_tree_foreach_helper,
9373 typed_splay_tree::splay_tree_insert,
9374 typed_splay_tree::splay_tree_remove,
9375 typed_splay_tree::splay_tree_lookup,
9376 typed_splay_tree::splay_tree_predecessor,
9377 typed_splay_tree::splay_tree_successor,
9378 typed_splay_tree::splay_tree_min,
9379 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9380 (typed_splay_tree::root, typed_splay_tree::comp,
9381 typed_splay_tree::delete_key,
9382 typed_splay_tree::delete_value): New data members.
9383 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9384 typed_splay_tree::remove.
9385
9386 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
9387
9388 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9389 -mginv and -mno-ginv to the assembler.
9390 * config/mips/mips.opt (-mcrc): New option.
9391 (-mginv): Likewise.
9392 * doc/invoke.text (-mcrc): Document.
9393 (-mginv): Likewise.
9394
9395 2018-06-15 Nick Clifton <nickc@redhat.com>
9396
9397 PR 84195
9398 * tree.c (escaped_string): New class. Converts an unescaped
9399 string into its escaped equivalent.
9400 (warn_deprecated_use): Use the new class to convert the
9401 deprecation message, if present.
9402 (test_escaped_strings): New self test.
9403 (test_c_tests): Add test_escaped_strings.
9404 * doc/extend.texi (deprecated): Add a note that the
9405 deprecation message is affected by the -fmessage-length
9406 option, and that control characters will be escaped.
9407 (#pragma GCC error): Document this pragma.
9408 (#pragma GCC warning): Likewise.
9409 * doc/invoke.texi (-fmessage-length): Document this option's
9410 effect on the #warning and #error preprocessor directives and
9411 the deprecated attribute.
9412
9413 2018-06-15 Richard Biener <rguenther@suse.de>
9414
9415 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9416 here, also noting vector size used.
9417 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
9418 size used in MSG_OPTIMIZED_LOCATIONS dump.
9419 (pass_slp_vectorize::execute): Adjust.
9420
9421 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
9422
9423 PR target/85968
9424 * config/arc/arc.c (arc_return_address_register): Fix
9425 if-condition.
9426
9427 2018-06-15 Richard Biener <rguenther@suse.de>
9428
9429 PR middle-end/86159
9430 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9431 leave useless conversion stripping to force_gimple_operand_gsi.
9432 (gimplify_build2): Likewise.
9433 (gimplify_build1): Likewise.
9434
9435 2018-06-15 Richard Biener <rguenther@suse.de>
9436
9437 PR middle-end/86076
9438 * tree-cfg.c (move_stmt_op): unshare invariant addresses
9439 before adjusting their block.
9440
9441 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
9442
9443 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9444 multilibs for *-*-rtems*.
9445 * config/riscv/t-rtems: New file.
9446
9447 2018-06-14 Jakub Jelinek <jakub@redhat.com>
9448
9449 PR middle-end/86122
9450 * match.pd ((A +- CST1) +- CST2): Punt if last resort
9451 unsigned_type_for returns NULL.
9452
9453 PR target/85945
9454 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9455 subregs of multi-word pseudos unless the float mode has word size.
9456
9457 2018-06-14 Richard Biener <rguenther@suse.de>
9458
9459 PR middle-end/86139
9460 * tree-vect-generic.c (build_word_mode_vector_type): Remove
9461 duplicate and harmful type_hash_canon.
9462 * tree.c (type_hash_canon): Assert we didn't find ourselves.
9463
9464 2018-06-14 Richard Biener <rguenther@suse.de>
9465
9466 PR ipa/86124
9467 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9468 NULL cgraph_node.
9469
9470 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
9471
9472 * config/rtems.h (STDINT_LONG32): Define.
9473
9474 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
9475 Prachi Godbole <prachi.godbole@imgtec.com>
9476
9477 * config/mips/mips-cpus.def: Define P6600.
9478 * config/mips/mips-tables.opt: Regenerate.
9479 * config/mips/mips.c (mips_ucbranch_type): New enum.
9480 (mips_rtx_cost_data): Add support for P6600.
9481 (mips_issue_rate): Likewise.
9482 (mips_multipass_dfa_lookahead): Likewise.
9483 (mips_avoid_hazard): Likewise.
9484 (mips_reorg_process_insns): Likewise.
9485 (mips_classify_branch_p6600): New function.
9486 * config/mips/mips.h (TUNE_P6600): New define.
9487 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9488 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9489 * config/mips/mips.md: Include p6600.md.
9490 (processor): Add p6600.
9491 * config/mips/p6600.md: New file.
9492 * doc/invoke.texi: Add p6600 to supported architectures.
9493
9494 2018-06-13 Martin Sebor <msebor@redhat.com>
9495
9496 PR tree-optimization/86114
9497 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9498 of integer types.
9499 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9500
9501 2018-06-13 Richard Biener <rguenther@suse.de>
9502
9503 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9504 Properly set vector type of the intermediate stmt.
9505 * tree-vect-stmts.c (vectorizable_operation): The destination
9506 var always has vectype_out type.
9507
9508 2018-06-13 Jeff Law <law@redhat.com>
9509
9510 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9511 integer 0 for argument to print_rtl_with_bb.
9512 (rl78_reorg): Likewise.
9513
9514 2018-06-13 David Malcolm <dmalcolm@redhat.com>
9515
9516 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9517 from rtx to rtx_insn *.
9518 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9519 "label".
9520 (add_sched_insns_for_speculation): Likewise for local "target",
9521 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9522 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9523 from rtx_insn ** to rtx_code_label **.
9524 (reorg_emit_nops): Likewise.
9525 (c6x_reorg): Likewise for local "call_labels".
9526 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9527 rtx to rtx_insn *.
9528 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9529 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9530 the loops over LABEL_REFS.
9531 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9532 braf_label.
9533 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9534 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9535 (split_branches): Strengthen local "olabel" from rtx to
9536 rtx_insn *, adding a safe_as_a cast.
9537 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9538 to "rtx_insn *".
9539 (add_insn_after): Likewise for first two params.
9540 (add_insn_before): Likewise.
9541 (remove_insn): Likewise for param.
9542 (emit_pattern_before_noloc): Likewise for second and third params.
9543 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9544 (emit_call_insn_before_noloc): Likewise.
9545 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9546 to "rtx_insn *".
9547 (emit_barrier_before): Likewise.
9548 (emit_label_before): Strengthen "label" param from "rtx" to
9549 "rtx_code_label *". Strengthen "before" param from "rtx" to
9550 "rtx_insn *".
9551 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9552 "rtx_insn *".
9553 (emit_pattern_after_noloc): Likewise.
9554 (emit_insn_after_noloc): Likewise.
9555 (emit_jump_insn_after_noloc): Likewise.
9556 (emit_call_insn_after_noloc): Likewise.
9557 (emit_debug_insn_after_noloc): Likewise.
9558 (emit_barrier_after): Likewise.
9559 (emit_label_after): Likewise for both params.
9560 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9561 "loc" param from "int" to "location_t".
9562 (emit_insn_after_setloc): Likewise.
9563 (emit_jump_insn_after_setloc): Likewise.
9564 (emit_call_insn_after_setloc): Likewise.
9565 (emit_debug_insn_after_setloc): Likewise.
9566 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9567 "loc" param from "int" to "location_t".
9568 (emit_pattern_before): Convert NULL_RTX to NULL.
9569 (emit_insn_before_setloc): Convert "loc" param from "int" to
9570 "location_t".
9571 (emit_jump_insn_before_setloc): Likewise.
9572 (emit_call_insn_before_setloc): Likewise.
9573 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9574 rtx_insn *. Convert "loc" param from "int" to "location_t".
9575 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9576 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9577 Convert 3rd param from "int" to "location_t".
9578 (emit_barrier_before, emit_barrier_after, next_real_insn):
9579 Strengthen param from rtx to rtx_insn *.
9580 (emit_label_before): Strengthen 1st param from "rtx" to
9581 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9582 "rtx_insn *".
9583 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9584 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9585 Strengthen 2nd param from "rtx" to "rtx_insn *".
9586 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9587 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9588 Likewise. Convert 3rd param from "int" to "location_t".
9589 (emit_label_after): Strengthen 1st param from "rtx" to
9590 "rtx_code_label *".
9591 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9592 "rtx_insn *".
9593 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9594 from "rtx" to "rtx_insn *".
9595
9596 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9597
9598 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9599 bodies streamed in with -Q.
9600 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9601 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9602 * gimple-streamer-out.c: Include gimple-pretty-print.h
9603 (output_bb): Dump stmts streamed.
9604 * lto-section-out.c: Include print-tree.h
9605 (lto_begin_section): Dump sections created.
9606 (lto_output_decl_index): Dump decl encoded.
9607 * lto-streamer-out.c: Include print-tree.h
9608 (create_output_block): Dump output block created.
9609 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9610 (output_function): Dump function output.
9611 (output_constructor): Dump constructor streamed.
9612 (write_global_stream): Output indexes encoded.
9613 (produce_asm_for_decls): Dump streams encoded.
9614 * lto-streamer.c (streamer_dump_file): New global var.
9615 * lto-streamer.h (streamer_dump_file): Declare.
9616 * passes.c (ipa_write_summaries): Initialize streamer dump.
9617 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9618 in.
9619
9620 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9621
9622 PR target/86048
9623 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9624 offsets for register save directives. Emit a second batch of save
9625 directives, if need be, when the function accesses prior frames.
9626
9627 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9628
9629 * config/arc/fpu.md (fmasf4): Force operand to register.
9630 (fnmasf4): Likewise.
9631
9632 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9633
9634 * config/arc/arc-protos.h (arc_pad_return): Remove.
9635 * config/arc/arc.c (machine_function): Remove force_short_suffix
9636 and size_reason.
9637 (arc_print_operand): Adjust printing of '&'.
9638 (arc_verify_short): Remove conditional printing of short suffix.
9639 (arc_final_prescan_insn): Remove reference to size_reason.
9640 (pad_return): New function.
9641 (arc_reorg): Call pad_return.
9642 (arc_pad_return): Remove.
9643 (arc_init_machine_status): Remove reference to force_short_suffix.
9644 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9645 (attr length): When attribute iscompact is true force to 2
9646 regardless; in the case of maybe check if we want to force the
9647 instruction to have 4 bytes length.
9648 (nopv): Change it to generate 4 byte long nop as well.
9649 (blockage): New pattern.
9650 (simple_return): Remove call to arc_pad_return.
9651 (p_return_i): Likewise.
9652
9653 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9654
9655 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9656
9657 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9658
9659 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9660 ARC cores.
9661
9662 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9663
9664 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9665 for ARC700 and ARCv2.
9666
9667 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9668
9669 PR target/86076
9670 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9671 operands[2] instead of operands[1].
9672
9673
9674 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9675
9676 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9677 case, check whether the outer register overlaps an unallocatable
9678 register, not just whether it fits the required class.
9679
9680 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9681
9682 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9683 are poly_ints.
9684 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9685 (memrefs_conflict_p): Likewise.
9686 (init_alias_analysis): Likewise.
9687 * cfgexpand.c (expand_debug_expr): Likewise.
9688 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9689 * cse.c (fold_rtx): Likewise.
9690 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9691 * expr.c (emit_block_move_hints): Likewise.
9692 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9693 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9694 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9695 (emit_group_store): Likewise.
9696 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9697 to read the PRE/POST_MODIFY increment.
9698 * calls.c (store_one_arg): Use strip_offset.
9699 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9700 poly_int_rtx_p.
9701 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9702 by a VEC_SELECT.
9703 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9704 (simplify_binary_operation_1): Extend CONST_INT handling to
9705 poly_int_rtx_p.
9706 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9707 than a HOST_WIDE_INT.
9708 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9709 poly_int64.
9710 (adjust_mems, add_stores): Update accodingly.
9711 (vt_canonicalize_addr): Track polynomial offsets.
9712 (emit_note_insn_var_location): Likewise.
9713 (vt_add_function_parameter): Likewise.
9714 (vt_initialize): Likewise.
9715
9716 2018-06-12 Jeff Law <law@redhat.com>
9717
9718 * config.gcc (alpha*-*-freebsd*): Remove.
9719 * config/alpha/freebsd.h: Remove.
9720
9721 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9722
9723 PR other/69968
9724 * spellcheck-tree.c (levenshtein_distance): Rename to...
9725 (get_edit_distance): ...this, and update for underlying renaming.
9726 * spellcheck-tree.h (levenshtein_distance): Rename to...
9727 (get_edit_distance): ...this.
9728 * spellcheck.c (levenshtein_distance): Rename to...
9729 (get_edit_distance): ...this. Convert from Levenshtein distance
9730 to Damerau-Levenshtein distance by supporting transpositions of
9731 adjacent characters. Rename "v1" to "v_next" and "v0" to
9732 "v_one_ago".
9733 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9734 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9735 update for underlying renaming.
9736 (selftest::levenshtein_distance_unit_test): Rename to...
9737 (selftest::test_get_edit_distance_unit): ...this, and update for
9738 underlying renaming.
9739 (selftest::test_find_closest_string): Add example from PR 69968
9740 where transposition helps
9741 (selftest::test_metric_conditions): Update for renaming.
9742 (selftest::test_metric_conditions): Likewise.
9743 (selftest::spellcheck_c_tests): Likewise.
9744 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9745 (get_edit_distance): ...this.
9746 (best_match::consider): Update for renaming.
9747
9748 2018-06-12 Martin Sebor <msebor@redhat.com>
9749
9750 PR tree-optimization/85259
9751 * builtins.c (compute_objsize): Handle constant offsets.
9752 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9753 true iff a warning has been issued.
9754 * gimple.h (gimple_nonartificial_location): New function.
9755 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9756 gimple_nonartificial_location and handle -Wno-system-headers.
9757 (handle_builtin_stxncpy): Same.
9758
9759 2018-06-12 Martin Sebor <msebor@redhat.com>
9760
9761 PR c/85931
9762 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9763
9764 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9765
9766 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9767 BUILTIN_VEC_XST entries for pointer to double and long long.
9768
9769 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9770
9771 PR target/85990
9772 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9773 Update comments.
9774 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9775 Likewise.
9776
9777 2018-06-12 Martin Liska <mliska@suse.cz>
9778
9779 * doc/options.texi: Document IntegerRange.
9780
9781 2018-06-12 Martin Liska <mliska@suse.cz>
9782
9783 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9784 * opt-functions.awk: Handle Deprecated flag.
9785 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9786 and report error.
9787 (read_cmdline_option): Report warning for a deprecated option.
9788 * opts.h (struct cl_option): Add new field cl_deprecated.
9789 (CL_ERR_DEPRECATED): New.
9790
9791 2018-06-12 Martin Liska <mliska@suse.cz>
9792
9793 * doc/options.texi: Document Deprecated option flag.
9794
9795 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9796
9797 * config/arc/arc-arch.h (arc_extras): New enum.
9798 (arc_cpu_t):Add field extra.
9799 (arc_cpu_types): Consider the extras.
9800 * config/arc/arc-cpus.def: Add extras info.
9801 * config/arc/arc-opts.h (processor_type): Consider extra field.
9802 * config/arc/arc.c (arc_override_options): Handle extra field.
9803
9804 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9805
9806 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9807 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9808 field.
9809 * config/arc/arc.c (arc_init): Update pic warning.
9810 (irq_range): Update irq range parsing warnings.
9811 (arc_override_options): Update various warning messages.
9812 (arc_handle_aux_attribute): Likewise.
9813
9814 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9815
9816 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9817
9818 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9819
9820 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9821 compiler messages directives.
9822
9823 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9824
9825 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9826 * config/mips/mips-tables.opt: Regenerate.
9827 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9828 mips64r6.
9829 * doc/invoke.texi: Document -march=i6500.
9830
9831 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9832
9833 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9834 (i6400_gpmul): Add cpu_unit.
9835 (i6400_gpdiv): Likewise.
9836 (i6400_msa_add_d): Update reservations.
9837 (i6400_msa_int_add) Likewise.
9838 (i6400_msa_short_logic3) Likewise.
9839 (i6400_msa_short_logic2) Likewise.
9840 (i6400_msa_short_logic) Likewise.
9841 (i6400_msa_move) Likewise.
9842 (i6400_msa_cmp) Likewise.
9843 (i6400_msa_short_float2) Likewise.
9844 (i6400_msa_div_d) Likewise.
9845 (i6400_msa_long_logic1) Likewise.
9846 (i6400_msa_long_logic2) Likewise.
9847 (i6400_msa_mult) Likewise.
9848 (i6400_msa_long_float2) Likewise.
9849 (i6400_msa_long_float4) Likewise.
9850 (i6400_msa_long_float5) Likewise.
9851 (i6400_msa_long_float8) Likewise.
9852 (i6400_fpu_fadd): Include frint type.
9853 (i6400_fpu_store): New define_insn_reservation.
9854 (i6400_fpu_load): Likewise.
9855 (i6400_fpu_move): Likewise.
9856 (i6400_fpu_fcmp): Likewise.
9857 (i6400_fpu_fmadd): Likewise.
9858 (i6400_int_mult): Include imul3nc type and update reservation.
9859 (i6400_int_div): Include idiv3 type and update reservation.
9860 (i6400_int_load): Update to check type not move_type.
9861 (i6400_int_store): Likewise.
9862 (i6400_int_prefetch): Set zero latency.
9863
9864 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9865
9866 * gcc.c: Document new %@{...} sequence.
9867 (LINK_COMMAND_SPEC): Use it for the -L switches.
9868 (cpp_unique_options): Use it for the -I switches.
9869 (at_file_argbuf): New global variable.
9870 (in_at_file): Likewise.
9871 (alloc_args): Create at_file_argbuf.
9872 (clear_args): Truncate at_file_argbuf.
9873 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9874 (open_at_file): New function.
9875 (close_at_file): Likewise.
9876 (create_at_file): Delete.
9877 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9878 <'o'>: Likewise.
9879 <'@'>: New case.
9880 (validate_switches_from_spec): Deal with %@{...} sequence.
9881 (validate_switches): Likewise.
9882 (driver::finalize): Call clear_args.
9883
9884 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9885
9886 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9887
9888 2018-06-11 Martin Sebor <msebor@redhat.com>
9889
9890 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9891 (Wno-class-memaccess): Add @opindex.
9892 (Wno-templates, Wno-multiple-inheritance): Same.
9893 (Wno-virtual-inheritance, Wno-namespaces): Same.
9894 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9895 (Wno-format-overflow, Wno-format-truncation): Same.
9896 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9897 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9898 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9899 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9900 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9901 (Wno-misspelled-isr): Same.
9902
9903 2018-06-11 Martin Sebor <msebor@redhat.com>
9904
9905 * PR tree-optimization/86083
9906 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9907
9908 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9909
9910 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9911
9912 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9913
9914 PR target/85755
9915 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9916 on the correct operand.
9917 (*movdi_internal64): Ditto.
9918
9919 2018-06-11 Martin Liska <mliska@suse.cz>
9920
9921 PR tree-optimization/86089
9922 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9923
9924 2018-06-11 Julia Koval <julia.koval@intel.com>
9925
9926 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9927 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9928 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9929
9930 2018-06-11 Olivier Hainque <hainque@adacore.com>
9931
9932 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9933 for Ada with strict dwarf2.
9934
9935 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9936
9937 PR target/85755
9938 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9939 addresses.
9940
9941 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9942
9943 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9944
9945 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9946
9947 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9948 TARGET_ELF.
9949
9950 2018-06-08 Martin Liska <mliska@suse.cz>
9951
9952 * tree-cfg.h (debug_function): Fix argument type to match
9953 implementation.
9954
9955 2018-06-08 Martin Liska <mliska@suse.cz>
9956
9957 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9958 Remove usage of MPX-related (and removed) fields.
9959 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9960
9961 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9962
9963 * cfg.c (debug): Use TDF_NONE rather than 0.
9964 * cfghooks.c (debug): Likewise.
9965 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9966 (struct dump_option_value_info): Convert to...
9967 (struct kv_pair): ...this template type.
9968 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9969 rather than 0.
9970 (optinfo_verbosity_options): Likewise.
9971 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9972 OPTGROUP_NONE.
9973 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9974 than int for "optgroup_flags" param.
9975 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9976 "dump_kind" param.
9977 (dump_dec): Likewise.
9978 (dump_finish): Use TDF_NONE rather than 0.
9979 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9980 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9981 than 0. Update for change to option_ptr.
9982 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9983 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9984 0. Update for changes to optinfo_verbosity_options and
9985 optgroup_options.
9986 (opt_info_switch_p): Convert optgroup_flags from int to
9987 optgroup_flags_t.
9988 (dump_basic_block): Use dump_flags_t rather than int
9989 for "dump_kind" param.
9990 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9991 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9992 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9993 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9994 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9995 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9996 TDF_NONE): Convert from macros to...
9997 (enum dump_flag): ...this new enum.
9998 (dump_flags_t): Update to use enum.
9999 (operator|, operator&, operator~, operator|=, operator&=):
10000 Implement for dump_flags_t.
10001 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
10002 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
10003 Convert from macros to...
10004 (enum optgroup_flag): ...this new enum.
10005 (optgroup_flags_t): New typedef.
10006 (operator|, operator|=): Implement for optgroup_flags_t.
10007 (struct dump_file_info): Convert field "alt_flags" to
10008 dump_flags_t. Convert field "optgroup_flags" to
10009 optgroup_flags_t.
10010 (dump_basic_block): Use dump_flags_t rather than int for param.
10011 (dump_generic_expr_loc): Likewise.
10012 (dump_dec): Likewise.
10013 (dump_register): Convert param "optgroup_flags" to
10014 optgroup_flags_t.
10015 (opt_info_enable_passes): Likewise.
10016 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
10017 than 0.
10018 * gimple-pretty-print.c (debug): Likewise.
10019 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
10020 (merged_store_group::apply_stores): Likewise.
10021 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
10022 * gimple.c (verify_gimple_pp): Likewise.
10023 * graphite-poly.c (print_pbb_body): Likewise.
10024 * passes.c (pass_manager::register_one_dump_file): Convert
10025 local "optgroup_flags" to optgroup_flags_t.
10026 * print-tree.c (print_node): Use TDF_NONE rather than 0.
10027 (debug): Likewise.
10028 (debug_body): Likewise.
10029 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
10030 to optgroup_flags_t.
10031 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
10032 than 0.
10033 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
10034 (convert_mult_to_fma): Likewise.
10035 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
10036 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
10037 * tree-vect-data-refs.c (dump_lower_bound): Convert param
10038 "dump_kind" to dump_flags_t.
10039
10040 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10041
10042 * config/rs6000/rs6000.c (min, max): Delete.
10043
10044 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
10045
10046 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
10047 -mabi=spe and -mabi=no-spe.
10048
10049 2018-06-08 Martin Liska <mliska@suse.cz>
10050
10051 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
10052 where we expect an existing summary.
10053
10054 2018-06-08 Martin Liska <mliska@suse.cz>
10055
10056 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
10057 * ipa-inline.h (estimate_edge_growth): Likewise.
10058
10059 2018-06-08 Martin Liska <mliska@suse.cz>
10060
10061 * cgraph.c (function_version_hasher::hash): Use
10062 cgraph_node::get_uid ().
10063 (function_version_hasher::equal):
10064 * cgraph.h (cgraph_node::get_uid): New method.
10065 * ipa-inline.c (update_caller_keys): Use
10066 cgraph_node::get_uid ().
10067 (update_callee_keys): Likewise.
10068 * ipa-utils.c (searchc): Likewise.
10069 (ipa_reduced_postorder): Likewise.
10070 * lto-cgraph.c (input_node): Likewise.
10071 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
10072 * symbol-summary.h (symtab_insertion): Likewise.
10073 (symtab_removal): Likewise.
10074 (symtab_duplication): Likewise.
10075 * tree-pretty-print.c (dump_function_header): Likewise.
10076 * tree-sra.c (convert_callers_for_node): Likewise.
10077
10078 2018-06-08 Martin Liska <mliska@suse.cz>
10079
10080 * cgraph.c (symbol_table::create_edge): Always assign a new
10081 unique number.
10082 (symbol_table::free_edge): Do not recycle numbers.
10083 * cgraph.h (cgraph_edge::get): New method.
10084 * symbol-summary.h (symtab_removal): Use it.
10085 (symtab_duplication): Likewise.
10086 (call_summary::hashable_uid): Remove.
10087
10088 2018-06-08 Martin Liska <mliska@suse.cz>
10089
10090 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
10091 (initialize_growth_caches): Remove.
10092 (free_growth_caches): Likewise.
10093 (do_estimate_edge_time): Use edge_growth_cache.
10094 (do_estimate_edge_size): Likewise.
10095 (do_estimate_edge_hints): Likewise.
10096 * ipa-inline.c (reset_edge_caches): Likewise.
10097 (recursive_inlining): Likewise.
10098 (inline_small_functions): Likewise.
10099 * ipa-inline.h (initialize_growth_caches): Remove.
10100 (estimate_edge_size): Likewise.
10101 (estimate_edge_time): Likewise.
10102 (estimate_edge_hints): Likewise.
10103 (reset_edge_growth_cache): Likewise.
10104 * symbol-summary.h (call_summary::remove): New method.
10105
10106 2018-06-08 Martin Liska <mliska@suse.cz>
10107
10108 * ipa-cp.c (class edge_clone_summary): New summary.
10109 (grow_edge_clone_vectors): Remove.
10110 (ipcp_edge_duplication_hook): Remove.
10111 (class edge_clone_summary_t): New call_summary class.
10112 (ipcp_edge_removal_hook): Remove.
10113 (edge_clone_summary_t::duplicate): New function.
10114 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
10115 (create_specialized_node): Likewise.
10116 (ipcp_driver): Initialize edge_clone_summaries and do not
10117 register hooks.
10118
10119 2018-06-08 Martin Liska <mliska@suse.cz>
10120
10121 * symbol-summary.h (get): New function.
10122 (call_summary::m_initialize_when_cloning): New class member.
10123
10124 2018-06-08 Martin Liska <mliska@suse.cz>
10125
10126 * cgraph.c (cgraph_node::remove): Do not recycle uid.
10127 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
10128 (symbol_table::allocate_cgraph_symbol): Do not set uid.
10129 * passes.c (uid_hash_t): Record removed_nodes by their uids.
10130 (remove_cgraph_node_from_order): Use the removed_nodes set.
10131 (do_per_function_toporder): Likwise.
10132 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
10133 instead of summary_uid.
10134 (symtab_removal): Likewise.
10135 (symtab_duplication): Likewise.
10136
10137 2018-06-08 Martin Liska <mliska@suse.cz>
10138
10139 * ipa-cp.c (ipcp_store_bits_results): Use
10140 ipcp_transformation_sum.
10141 (ipcp_store_vr_results): Likewise.
10142 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
10143 to ...
10144 (ipcp_transformation_initialize): ... this.
10145 (ipa_set_node_agg_value_chain):
10146 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
10147 (write_ipcp_transformation_info): Likewise.
10148 (read_ipcp_transformation_info): Likewise.
10149 (ipcp_update_bits): Likewise.
10150 (ipcp_update_vr): Likewise.
10151 (ipcp_transform_function): Likewise.
10152 * ipa-prop.h: Rename ipcp_transformation_summary to
10153 ipcp_transformation.
10154 (class ipcp_transformation_t): New function summary.
10155 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
10156 (ipa_get_agg_replacements_for_node): Likewise.
10157
10158 2018-06-08 Martin Liska <mliska@suse.cz>
10159
10160 * ipa-pure-const.c (struct funct_state_d): Do it class instead
10161 of struct.
10162 (class funct_state_summary_t): New function_summary class.
10163 (has_function_state): Remove.
10164 (get_function_state): Likewise.
10165 (set_function_state): Likewise.
10166 (add_new_function): Likewise.
10167 (funct_state_summary_t::insert): New function.
10168 (duplicate_node_data): Remove.
10169 (remove_node_data): Remove.
10170 (funct_state_summary_t::duplicate): New function.
10171 (register_hooks): Create new funct_state_summaries.
10172 (pure_const_generate_summary): Use it.
10173 (pure_const_write_summary): Likewise.
10174 (pure_const_read_summary): Likewise.
10175 (propagate_pure_const): Likewise.
10176 (propagate_nothrow): Likewise.
10177 (dump_malloc_lattice): Likewise.
10178 (propagate_malloc): Likewise.
10179 (execute): Do not register hooks, just remove summary
10180 instead.
10181 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
10182 constructor.
10183
10184 2018-06-08 Martin Liska <mliska@suse.cz>
10185
10186 * ipa-reference.c (remove_node_data): Remove.
10187 (duplicate_node_data): Likewise.
10188 (class ipa_ref_var_info_summary_t): New class.
10189 (class ipa_ref_opt_summary_t): Likewise.
10190 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
10191 (get_reference_optimization_summary): Use
10192 ipa_ref_opt_sum_summaries.
10193 (set_reference_vars_info): Remove.
10194 (set_reference_optimization_summary): Likewise.
10195 (ipa_init): Create summaries.
10196 (init_function_info): Use function summary.
10197 (ipa_ref_opt_summary_t::duplicate): New function.
10198 (ipa_ref_opt_summary_t::remove): New function.
10199 (get_read_write_all_from_node): Fix GNU coding style.
10200 (propagate): Use function summary.
10201 (write_node_summary_p): Fix GNU coding style.
10202 (stream_out_bitmap): Likewise.
10203 (ipa_reference_read_optimization_summary): Use function summary.
10204 (ipa_reference_c_finalize): Do not release hooks.
10205
10206 2018-06-08 Martin Liska <mliska@suse.cz>
10207
10208 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
10209 (analyze_function_body): Extract multiple calls of get_create.
10210 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10211 * ipa-inline.c (recursive_inlining): Use ::get method.
10212 * ipa-inline.h (estimate_edge_growth): Likewise.
10213
10214 2018-06-08 Martin Liska <mliska@suse.cz>
10215
10216 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
10217 HSA_INVALID.
10218 (hsa_function_summary::hsa_function_summary): Use the new enum
10219 value.
10220 (hsa_gpu_implementation_p): Use hsa_summaries::get.
10221 * hsa-gen.c (hsa_get_host_function): Likewise.
10222 (get_brig_function_name): Likewise.
10223 * ipa-hsa.c (process_hsa_functions): Likewise.
10224 (ipa_hsa_write_summary): Likewise.
10225 * symbol-summary.h (symtab_duplication): Use ::get function/
10226 (get): New function.
10227
10228 2018-06-08 Martin Liska <mliska@suse.cz>
10229
10230 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
10231 of get.
10232 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
10233 (hsa_register_kernel): Likewise.
10234 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
10235 * hsa-gen.c (hsa_get_host_function): Likewise.
10236 (get_brig_function_name): Likewise.
10237 (generate_hsa): Likewise.
10238 (pass_gen_hsail::execute): Likewise.
10239 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
10240 (devirtualization_time_bonus): Likewise.
10241 (ipcp_propagate_stage): Likewise.
10242 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10243 (edge_set_predicate): Likewise.
10244 (evaluate_conditions_for_known_args): Likewise.
10245 (evaluate_properties_for_edge): Likewise.
10246 (ipa_fn_summary::reset): Likewise.
10247 (ipa_fn_summary_t::duplicate): Likewise.
10248 (dump_ipa_call_summary): Likewise.
10249 (ipa_dump_fn_summary): Likewise.
10250 (analyze_function_body): Likewise.
10251 (compute_fn_summary): Likewise.
10252 (estimate_edge_devirt_benefit): Likewise.
10253 (estimate_edge_size_and_time): Likewise.
10254 (estimate_calls_size_and_time): Likewise.
10255 (estimate_node_size_and_time): Likewise.
10256 (inline_update_callee_summaries): Likewise.
10257 (remap_edge_change_prob): Likewise.
10258 (remap_edge_summaries): Likewise.
10259 (ipa_merge_fn_summary_after_inlining): Likewise.
10260 (ipa_update_overall_fn_summary): Likewise.
10261 (read_ipa_call_summary): Likewise.
10262 (inline_read_section): Likewise.
10263 (write_ipa_call_summary): Likewise.
10264 (ipa_fn_summary_write): Likewise.
10265 (ipa_free_fn_summary): Likewise.
10266 * ipa-hsa.c (process_hsa_functions): Likewise.
10267 (ipa_hsa_write_summary): Likewise.
10268 (ipa_hsa_read_section): Likewise.
10269 * ipa-icf.c (sem_function::merge): Likewise.
10270 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
10271 (do_estimate_edge_time): Likewise.
10272 (estimate_size_after_inlining): Likewise.
10273 (estimate_growth): Likewise.
10274 (growth_likely_positive): Likewise.
10275 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10276 (inline_call): Likewise.
10277 * ipa-inline.c (caller_growth_limits): Likewise.
10278 (can_inline_edge_p): Likewise.
10279 (can_inline_edge_by_limits_p): Likewise.
10280 (compute_uninlined_call_time): Likewise.
10281 (compute_inlined_call_time): Likewise.
10282 (want_inline_small_function_p): Likewise.
10283 (edge_badness): Likewise.
10284 (update_caller_keys): Likewise.
10285 (update_callee_keys): Likewise.
10286 (recursive_inlining): Likewise.
10287 (inline_small_functions): Likewise.
10288 (inline_to_all_callers_1): Likewise.
10289 (dump_overall_stats): Likewise.
10290 (early_inline_small_functions): Likewise.
10291 (early_inliner): Likewise.
10292 * ipa-inline.h (estimate_edge_growth): Likewise.
10293 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10294 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10295 * ipa-prop.h (IPA_NODE_REF): Likewise.
10296 (IPA_EDGE_REF): Likewise.
10297 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10298 (propagate_malloc): Likewise.
10299 * ipa-split.c (execute_split_functions): Likewise.
10300 * symbol-summary.h: Rename get to get_create.
10301 (get): Likewise.
10302 (get_create): Likewise.
10303 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10304
10305 2018-06-08 Martin Liska <mliska@suse.cz>
10306
10307 * symbol-summary.h (release): Move definition out of class
10308 declaration.
10309 (symtab_removal): Likewise.
10310 (symtab_duplication): Likewise.
10311
10312 2018-06-08 Martin Liska <mliska@suse.cz>
10313
10314 * symbol-summary.h (function_summary): Move constructor
10315 implementation out of class declaration.
10316 (release): Likewise.
10317 (symtab_insertion): Likewise.
10318 (symtab_removal): Likewise.
10319 (symtab_duplication): Likewise.
10320 (get): Likewise.
10321
10322 2018-06-08 Martin Liska <mliska@suse.cz>
10323
10324 * Makefile.in: Remove support for MPX (macros, related functions,
10325 fields in cgraph_node, ...).
10326 * builtin-types.def (BT_BND): Likewise.
10327 (BT_FN_BND_CONST_PTR): Likewise.
10328 (BT_FN_CONST_PTR_BND): Likewise.
10329 (BT_FN_VOID_PTR_BND): Likewise.
10330 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
10331 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
10332 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
10333 (expand_builtin_mempcpy_with_bounds): Likewise.
10334 (expand_builtin_memset_with_bounds): Likewise.
10335 (expand_builtin_memset_args): Likewise.
10336 (std_expand_builtin_va_start): Likewise.
10337 (expand_builtin): Likewise.
10338 (expand_builtin_with_bounds): Likewise.
10339 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
10340 (DEF_LIB_BUILTIN_CHKP): Likewise.
10341 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10342 (DEF_CHKP_BUILTIN): Likewise.
10343 (BUILT_IN_MEMCPY): Likewise.
10344 (BUILT_IN_MEMMOVE): Likewise.
10345 (BUILT_IN_MEMPCPY): Likewise.
10346 (BUILT_IN_MEMSET): Likewise.
10347 (BUILT_IN_STPCPY): Likewise.
10348 (BUILT_IN_STRCAT): Likewise.
10349 (BUILT_IN_STRCHR): Likewise.
10350 (BUILT_IN_STRCPY): Likewise.
10351 (BUILT_IN_STRLEN): Likewise.
10352 (BUILT_IN_MEMCPY_CHK): Likewise.
10353 (BUILT_IN_MEMMOVE_CHK): Likewise.
10354 (BUILT_IN_MEMPCPY_CHK): Likewise.
10355 (BUILT_IN_MEMSET_CHK): Likewise.
10356 (BUILT_IN_STPCPY_CHK): Likewise.
10357 (BUILT_IN_STRCAT_CHK): Likewise.
10358 (BUILT_IN_STRCPY_CHK): Likewise.
10359 * calls.c (store_bounds): Likewise.
10360 (emit_call_1): Likewise.
10361 (special_function_p): Likewise.
10362 (maybe_warn_nonstring_arg): Likewise.
10363 (initialize_argument_information): Likewise.
10364 (finalize_must_preallocate): Likewise.
10365 (compute_argument_addresses): Likewise.
10366 (expand_call): Likewise.
10367 * cfgexpand.c (expand_call_stmt): Likewise.
10368 (expand_return): Likewise.
10369 (expand_gimple_stmt_1): Likewise.
10370 (pass_expand::execute): Likewise.
10371 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10372 (cgraph_node::remove): Likewise.
10373 (cgraph_node::dump): Likewise.
10374 (cgraph_node::verify_node): Likewise.
10375 * cgraph.h (chkp_function_instrumented_p): Likewise.
10376 (symtab_node::get_alias_target): Likewise.
10377 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10378 (cgraph_local_p): Likewise.
10379 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10380 (cgraph_edge::rebuild_references): Likewise.
10381 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10382 (walk_polymorphic_call_targets): Likewise.
10383 (cgraph_node::expand_thunk): Likewise.
10384 (symbol_table::output_weakrefs): Likewise.
10385 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10386 (ix86_handle_option): Likewise.
10387 * config/i386/constraints.md: Likewise.
10388 * config/i386/i386-builtin-types.def (BND): Likewise.
10389 (VOID): Likewise.
10390 (PVOID): Likewise.
10391 (ULONG): Likewise.
10392 * config/i386/i386-builtin.def (BDESC_END): Likewise.
10393 (BDESC_FIRST): Likewise.
10394 (BDESC): Likewise.
10395 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10396 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10397 * config/i386/i386.c (enum reg_class): Likewise.
10398 (ix86_target_string): Likewise.
10399 (ix86_option_override_internal): Likewise.
10400 (ix86_conditional_register_usage): Likewise.
10401 (ix86_valid_target_attribute_inner_p): Likewise.
10402 (ix86_set_indirect_branch_type): Likewise.
10403 (ix86_set_current_function): Likewise.
10404 (ix86_function_arg_regno_p): Likewise.
10405 (init_cumulative_args): Likewise.
10406 (ix86_function_arg_advance): Likewise.
10407 (ix86_function_arg): Likewise.
10408 (ix86_pass_by_reference): Likewise.
10409 (ix86_function_value_regno_p): Likewise.
10410 (ix86_function_value_1): Likewise.
10411 (ix86_function_value_bounds): Likewise.
10412 (ix86_return_in_memory): Likewise.
10413 (ix86_setup_incoming_vararg_bounds): Likewise.
10414 (ix86_va_start): Likewise.
10415 (indirect_thunk_need_prefix): Likewise.
10416 (print_reg): Likewise.
10417 (ix86_print_operand): Likewise.
10418 (ix86_expand_call): Likewise.
10419 (ix86_output_function_return): Likewise.
10420 (reg_encoded_number): Likewise.
10421 (BDESC_VERIFYS): Likewise.
10422 (ix86_init_mpx_builtins): Likewise.
10423 (ix86_init_builtins): Likewise.
10424 (ix86_emit_cmove): Likewise.
10425 (ix86_emit_move_max): Likewise.
10426 (ix86_expand_builtin): Likewise.
10427 (ix86_builtin_mpx_function): Likewise.
10428 (ix86_get_arg_address_for_bt): Likewise.
10429 (ix86_load_bounds): Likewise.
10430 (ix86_store_bounds): Likewise.
10431 (ix86_load_returned_bounds): Likewise.
10432 (ix86_store_returned_bounds): Likewise.
10433 (ix86_class_likely_spilled_p): Likewise.
10434 (ix86_hard_regno_mode_ok): Likewise.
10435 (x86_order_regs_for_local_alloc): Likewise.
10436 (ix86_mitigate_rop): Likewise.
10437 (ix86_bnd_prefixed_insn_p): Likewise.
10438 (ix86_mpx_bound_mode): Likewise.
10439 (ix86_make_bounds_constant): Likewise.
10440 (ix86_initialize_bounds): Likewise.
10441 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10442 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10443 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10444 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10445 (TARGET_CHKP_BOUND_MODE): Likewise.
10446 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10447 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10448 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10449 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10450 * config/i386/i386.h (TARGET_MPX): Likewise.
10451 (TARGET_MPX_P): Likewise.
10452 (VALID_BND_REG_MODE): Likewise.
10453 (FIRST_BND_REG): Likewise.
10454 (LAST_BND_REG): Likewise.
10455 (enum reg_class): Likewise.
10456 (BND_REG_P): Likewise.
10457 (BND_REGNO_P): Likewise.
10458 (BNDmode): Likewise.
10459 (ADJUST_INSN_LENGTH): Likewise.
10460 * config/i386/i386.md: Likewise.
10461 * config/i386/i386.opt: Likewise.
10462 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10463 (defined): Likewise.
10464 (LINK_MPX): Likewise.
10465 (MPX_SPEC): Likewise.
10466 (LIBMPX_SPEC): Likewise.
10467 (LIBMPXWRAPPERS_SPEC): Likewise.
10468 (CHKP_SPEC): Likewise.
10469 * config/i386/predicates.md: Likewise.
10470 * dbxout.c (dbxout_type): Likewise.
10471 * doc/extend.texi: Likewise.
10472 * doc/invoke.texi: Likewise.
10473 * doc/md.texi: Likewise.
10474 * doc/tm.texi: Likewise.
10475 * doc/tm.texi.in: Likewise.
10476 * dwarf2out.c (is_base_type): Likewise.
10477 (gen_formal_types_die): Likewise.
10478 (gen_subprogram_die): Likewise.
10479 (gen_type_die_with_usage): Likewise.
10480 (gen_decl_die): Likewise.
10481 (dwarf2out_late_global_decl): Likewise.
10482 * expr.c (expand_assignment): Likewise.
10483 (emit_storent_insn): Likewise.
10484 (store_expr_with_bounds): Likewise.
10485 (store_expr): Likewise.
10486 (expand_expr_real_1): Likewise.
10487 * expr.h (store_expr_with_bounds): Likewise.
10488 * function.c (use_register_for_decl): Likewise.
10489 (struct bounds_parm_data): Likewise.
10490 (assign_parms_augmented_arg_list): Likewise.
10491 (assign_parm_find_entry_rtl): Likewise.
10492 (assign_parm_is_stack_parm): Likewise.
10493 (assign_parm_load_bounds): Likewise.
10494 (assign_bounds): Likewise.
10495 (assign_parms): Likewise.
10496 (expand_function_start): Likewise.
10497 * gcc.c (CHKP_SPEC): Likewise.
10498 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10499 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10500 (wrestrict_dom_walker::check_call): Likewise.
10501 * gimple.c (gimple_build_call_from_tree): Likewise.
10502 * gimple.h (enum gf_mask): Likewise.
10503 (gimple_call_with_bounds_p): Likewise.
10504 (gimple_call_set_with_bounds): Likewise.
10505 * gimplify.c (gimplify_init_constructor): Likewise.
10506 * ipa-cp.c (initialize_node_lattices): Likewise.
10507 (propagate_constants_across_call): Likewise.
10508 (find_more_scalar_values_for_callers_subset): Likewise.
10509 * ipa-hsa.c (process_hsa_functions): Likewise.
10510 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10511 * ipa-icf.c (sem_function::merge): Likewise.
10512 * ipa-inline.c (early_inliner): Likewise.
10513 * ipa-pure-const.c (warn_function_noreturn): Likewise.
10514 (warn_function_cold): Likewise.
10515 (propagate_pure_const): Likewise.
10516 * ipa-ref.h (enum GTY): Likewise.
10517 * ipa-split.c (find_retbnd): Likewise.
10518 (consider_split): Likewise.
10519 (split_function): Likewise.
10520 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10521 * ipa.c (walk_polymorphic_call_targets): Likewise.
10522 (symbol_table::remove_unreachable_nodes): Likewise.
10523 (process_references): Likewise.
10524 (cgraph_build_static_cdtor_1): Likewise.
10525 * lto-cgraph.c (lto_output_node): Likewise.
10526 (output_refs): Likewise.
10527 (compute_ltrans_boundary): Likewise.
10528 (input_overwrite_node): Likewise.
10529 (input_node): Likewise.
10530 (input_cgraph_1): Likewise.
10531 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10532 * passes.c (pass_manager::execute_early_local_passes): Likewise.
10533 (class pass_chkp_instrumentation_passes): Likewise.
10534 (make_pass_chkp_instrumentation_passes): Likewise.
10535 * passes.def: Likewise.
10536 * rtl.h (struct GTY): Likewise.
10537 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10538 * stor-layout.c (layout_type): Likewise.
10539 * symtab.c: Likewise.
10540 * target.def: Likewise.
10541 * targhooks.c (default_chkp_bound_type): Likewise.
10542 (default_chkp_bound_mode): Likewise.
10543 (default_builtin_chkp_function): Likewise.
10544 (default_chkp_function_value_bounds): Likewise.
10545 (default_chkp_make_bounds_constant): Likewise.
10546 (default_chkp_initialize_bounds): Likewise.
10547 * targhooks.h (default_chkp_bound_type): Likewise.
10548 (default_chkp_bound_mode): Likewise.
10549 (default_builtin_chkp_function): Likewise.
10550 (default_chkp_function_value_bounds): Likewise.
10551 (default_chkp_make_bounds_constant): Likewise.
10552 (default_chkp_initialize_bounds): Likewise.
10553 * toplev.c (compile_file): Likewise.
10554 (process_options): Likewise.
10555 * tree-core.h (DEF_BUILTIN): Likewise.
10556 (DEF_BUILTIN_CHKP): Likewise.
10557 * tree-inline.c (declare_return_variable): Likewise.
10558 (remap_gimple_stmt): Likewise.
10559 (copy_bb): Likewise.
10560 (initialize_inlined_parameters): Likewise.
10561 (expand_call_inline): Likewise.
10562 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10563 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10564 (make_pass_ipa_chkp_produce_thunks): Likewise.
10565 (make_pass_chkp): Likewise.
10566 (make_pass_chkp_opt): Likewise.
10567 (make_pass_chkp_instrumentation_passes): Likewise.
10568 * tree-pretty-print.c (dump_generic_node): Likewise.
10569 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10570 * tree-ssa-dce.c (propagate_necessity): Likewise.
10571 (eliminate_unnecessary_stmts): Likewise.
10572 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10573 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10574 * tree-ssa-sccvn.h: Likewise.
10575 * tree-ssa-strlen.c (get_string_length): Likewise.
10576 (valid_builtin_call): Likewise.
10577 (adjust_last_stmt): Likewise.
10578 (handle_builtin_strchr): Likewise.
10579 (handle_builtin_strcpy): Likewise.
10580 (handle_builtin_stxncpy): Likewise.
10581 (handle_builtin_memcpy): Likewise.
10582 (handle_builtin_strcat): Likewise.
10583 (strlen_check_and_optimize_stmt): Likewise.
10584 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10585 * tree-streamer-in.c: Likewise.
10586 * tree-streamer.c (record_common_node): Likewise.
10587 * tree.c (tree_code_size): Likewise.
10588 (wide_int_to_tree_1): Likewise.
10589 (type_contains_placeholder_1): Likewise.
10590 (build_common_tree_nodes): Likewise.
10591 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10592 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10593 (POINTER_BOUNDS_P): Likewise.
10594 (BOUNDED_TYPE_P): Likewise.
10595 (BOUNDED_P): Likewise.
10596 (CALL_WITH_BOUNDS_P): Likewise.
10597 (pointer_bounds_type_node): Likewise.
10598 * value-prof.c (gimple_ic): Likewise.
10599 * var-tracking.c (vt_add_function_parameters): Likewise.
10600 * varasm.c (make_decl_rtl): Likewise.
10601 (assemble_start_function): Likewise.
10602 (output_constant): Likewise.
10603 (maybe_assemble_visibility): Likewise.
10604 * varpool.c (ctor_for_folding): Likewise.
10605 * chkp-builtins.def: Remove.
10606 * ipa-chkp.c: Remove.
10607 * ipa-chkp.h: Remove.
10608 * rtl-chkp.c: Remove.
10609 * rtl-chkp.h: Remove.
10610 * tree-chkp-opt.c: Remove.
10611 * tree-chkp.c: Remove.
10612 * tree-chkp.h: Remove.
10613
10614 2018-06-07 Carl Love <cel@us.ibm.com>
10615
10616 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10617 vextract_fp_from_shortl): Add BE support.
10618
10619 2018-06-07 Paul Koning <ni1d@arrl.net>
10620
10621 * compare-elim.c (try_merge_compare): Don't merge compare if
10622 address contains a side effect.
10623 (try_eliminate_compare): Likewise.
10624
10625 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10626
10627 * config.gcc: Support "tremont".
10628 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10629 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10630 PROCESSOR_TREMONT.
10631 * config/i386/i386.c (m_TREMONT): Define.
10632 (processor_target_table): Add "tremont".
10633 (PTA_TREMONT): Define.
10634 (ix86_lea_outperforms): Add TARGET_TREMONT.
10635 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10636 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10637 and M_INTEL_GOLDMONT_PLUS.
10638 (fold_builtin_cpu): Add "tremont".
10639 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10640 (ix86_option_override_internal): Add "tremont".
10641 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10642 (processor_type): Add PROCESSOR_TREMONT.
10643 * config/i386/x86-tune.def: Add m_TREMONT.
10644 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10645
10646 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10647
10648 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10649 symbol defined for msp430i* devices to be lower case.
10650
10651 2018-06-07 Richard Biener <rguenther@suse.de>
10652
10653 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10654 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10655 Properly wrap signed arithmetic if overflow wraps.
10656
10657 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10658
10659 PR tree-optimization/69615
10660 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10661 of a cast from a same precision integral SSA_NAME in a bb dominated
10662 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10663 cast to utype if rhs2 has already a compatible type.
10664
10665 2018-06-07 Richard Biener <rguenther@suse.de>
10666
10667 PR tree-optimization/85935
10668 * graphite-scop-detection.c (find_params_in_bb): Analyze
10669 condition operands with respect to the correct loop. Assert
10670 the analysis doesn't fail.
10671
10672 2018-06-04 Carl Love <cel@us.ibm.com>
10673
10674 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10675 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10676 as it is slightly cheaper.
10677 (first_match_or_eos_index_<mode>):
10678 Calculate index using natural element order.
10679 (first_match_index_<mode>):
10680 Calculate index using natural element order.
10681 (first_match_or_eos_index_<mode>):
10682 Calculate index using natural order.
10683 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10684 for BE and LE modes.
10685 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10686 P9V_BUILTIN_VCLZLSBB_V16QI.
10687 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10688 specific.
10689
10690 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10691
10692 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10693 indentation and line wrap for many prototypes. Add missing
10694 @smallexample directives around block of prototypes for vec_xl and
10695 vec_xst.
10696
10697 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10698
10699 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10700 track if we pass or return IEEE 128-bit floating point.
10701 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10702 C++ mangling that is compatible with GCC 8.1.
10703 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10704 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10705 floating point types.
10706 (rs6000_function_arg_advance_1): Likewise.
10707 (rs6000_mangle_type): Optionally generate mangled names that match
10708 what GCC 8.1 generated for IEEE 128-bit floating point types.
10709 (rs6000_globalize_decl_name): If we have an external function that
10710 passes or returns IEEE 128-bit types, generate a weak reference
10711 from the mangled name used in GCC 8.1 to the current mangled
10712 name.
10713 (rs6000_init_builtins): Make __ibm128 use the long double type if
10714 long double is IBM extended double. Make __float128 use the long
10715 double type if long double is IEEE 128-bit.
10716
10717 PR target/85657
10718 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10719 macro for __ibm128 built-in functions.
10720 (PACK_IF): Add __ibm128 pack/unpack functions.
10721 (UNPACK_IF): Likewise.
10722 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10723 enable long double built-in functions if long double is IEEE
10724 128-bit floating point.
10725 (rs6000_invalid_builtin): Update long double built-in function
10726 error message.
10727 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10728 functions, adjust the built-in function to use the long double
10729 built-in function if __ibm128 and long double are the same type.
10730 * doc/extend.texi (PowerPC builtins): Update documention for
10731 __builtin_{,un}pack_longdouble. Add documentation for
10732 __builtin_{,un}pack_ibm128.
10733
10734 2018-06-06 Jim Wilson <jimw@sifive.com>
10735
10736 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10737 (struct machine_function): New field interrupt_mode.
10738 (riscv_handle_type_attribute): New function. Add forward declaration.
10739 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10740 (riscv_expand_epilogue): Check interrupt_mode field.
10741 (riscv_set_current_function): Check interrupt attribute args and
10742 set interrupt_mode field.
10743 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10744 (riscv_sret, riscv_uret): New.
10745 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10746 new arguments to interrupt attribute.
10747
10748 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10749
10750 PR target/63177
10751 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10752 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10753
10754 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10755
10756 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10757 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10758 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10759 several redundant entries.
10760
10761 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10762
10763 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10764 type from "rtx" to "rtx_insn *".
10765 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10766 for local "call_insn", removing cast.
10767 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10768
10769 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10770
10771 PR tree-optimization/86066
10772 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10773 for BIT_INSERT_EXPR stores.
10774
10775 2018-06-06 Richard Biener <rguenther@suse.de>
10776
10777 PR tree-optimization/86062
10778 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10779 component refs ontop
10780 of to be offsetted base.
10781
10782 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10783
10784 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10785 to be static and remove check on interrupt attribute name.
10786
10787 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10788
10789 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10790 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10791
10792 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10793
10794 PR target/79924
10795 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10796 second argument.
10797 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10798 Remove second argument, change how error is called.
10799 (aarch64_layout_arg): Remove second argument from
10800 aarch64_err_no_fpadvsimd call.
10801 (aarch64_init_cumulative_args): Ditto.
10802 (aarch64_gimplify_va_arg_expr): Ditto.
10803 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10804
10805 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10806
10807 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10808 (*simple_return_indirect_internal<mode>): Rename from
10809 simple_return_indirect_internal. Use W mode iterator.
10810 (rstorssp): New expander.
10811 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10812 (clrssbsy): New expander.
10813 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10814
10815 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10816
10817 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10818 __typeof__.
10819 (cmse_check_pointed_object): Likewise.
10820
10821 2018-06-05 Martin Liska <mliska@suse.cz>
10822
10823 PR gcov-profile/47618
10824 * doc/invoke.texi: Document how -fprofile-dir format
10825 is extended.
10826
10827 2018-06-05 Richard Biener <rguenther@suse.de>
10828
10829 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10830 removal pretend DOM info isn't available so we do not update
10831 it and only remove edges, not dominated blocks. Actually free
10832 DOM info in case we removed something. Remove unreachable blocks.
10833 (mfb_keep_latches): Work with either DOM info or marked backedges.
10834 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10835 first. Mark backedges if DOM info isn't available.
10836 (Re-)compute DOM info after cleanup_control_flow_pre.
10837
10838 2018-06-05 Richard Biener <rguenther@suse.de>
10839
10840 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10841 (locus_discrim_hasher::hash): Adjust.
10842 (locus_discrim_hasher::equal): Likewise.
10843 (next_discriminator_for_locus): Work on line directly.
10844 (same_line_p): Pass in expanded locus1 as well.
10845 (assign_discriminators): Avoid redundant location expansions.
10846
10847 2018-06-05 Richard Biener <rguenther@suse.de>
10848
10849 PR tree-optimization/86046
10850 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10851 if required after clearing TREE_ADDRESSABLE.
10852
10853 2018-06-05 Richard Biener <rguenther@suse.de>
10854
10855 PR tree-optimization/86047
10856 * tree-ssa-loop.c (for_each_index): Glob handling of all
10857 decls and constants and really handle all of them.
10858
10859 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10860
10861 PR target/81497
10862 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10863 qualifier_void_pointer and qualifier_const_void_pointer.
10864 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10865 (arm_init_builtins): Handle the above.
10866 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10867 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10868 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10869 void intrinsics.
10870
10871 2018-06-05 Martin Liska <mliska@suse.cz>
10872
10873 * auto-profile.c (read_autofdo_file): Do not use
10874 gcov_ctr_summary struct.
10875 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10876 * coverage.c (struct counts_entry): Likewise.
10877 (read_counts_file): Read just single summary entry.
10878 (get_coverage_counts): Use gcov_summary struct.
10879 * coverage.h (get_coverage_counts): Likewise.
10880 * gcov-dump.c (dump_working_sets): Likewise.
10881 (tag_summary): Dump just single summary.
10882 * gcov-io.c (gcov_write_summary): Write just histogram
10883 summary.
10884 (gcov_read_summary): Read just single summary.
10885 (compute_working_sets): Use gcov_summary struct.
10886 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10887 of GCOV_COUNTERS_SUMMABLE.
10888 (GCOV_COUNTERS_SUMMABLE): Remove.
10889 (GCOV_FIRST_VALUE_COUNTER): Replace with
10890 GCOV_COUNTER_V_INTERVAL.
10891 (struct gcov_ctr_summary): Remove.
10892 (struct gcov_summary): Directly use fields of former
10893 gcov_ctr_summary.
10894 (compute_working_sets): Use gcov_summary struct.
10895 * gcov.c (read_count_file): Do not use ctrs fields.
10896 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10897 struct.
10898 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10899 struct.
10900 * profile.c: Likewise.
10901 * profile.h: Likewise.
10902
10903 2018-06-05 Martin Liska <mliska@suse.cz>
10904
10905 PR gcov-profile/84846
10906 * gcov.c (output_lines): Print working directory only
10907 in intermediate format.
10908
10909 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10910
10911 * config/s390/s390-builtin-types.def: Add void function type.
10912 * config/s390/s390-builtins.def: Use the function type for the
10913 tbeginc builtin.
10914
10915 2018-06-04 Jim Wilson <jimw@sifive.com>
10916
10917 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10918 to int.
10919 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10920 and maybe_eh_return. Change regno to unsigned int. Use new args to
10921 handle EH_RETURN_DATA_REGNO registers properly.
10922 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10923 (riscv_expand_epilogue): Update comment. Change argument name and
10924 type. Update code to use new name and type. Pass new args to
10925 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10926 EXCEPTION_RETURN.
10927 * config/riscv/riscv.md (NORMAL_RETURN): New.
10928 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10929 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10930 (eh_return): Call gen_eh_return_internal and emit barrier.
10931 (eh_return_internal): Call riscv_expand_epilogue.
10932
10933 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10934
10935 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10936 bit_insertion field and declare can_be_merged_into method.
10937 (merged_store_group::can_be_merged_into): New method.
10938 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10939 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10940 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10941
10942 2018-06-04 Richard Biener <rguenther@suse.de>
10943
10944 PR tree-optimization/85955
10945 * builtins.c (fold_builtin_sincos): Convert pointers to
10946 destination to appropriate type before dereferencing.
10947
10948 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10949
10950 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10951
10952 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10953
10954 * expr.c (expand_expr_real_1): Force the operand into memory if
10955 its TYPE_MODE is BLKmode and if there is no integer mode for
10956 the number of bits being extracted.
10957
10958 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10959
10960 PR target/85832
10961 PR target/86036
10962 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10963 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10964
10965 2018-06-04 Richard Biener <rguenther@suse.de>
10966
10967 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10968 (cleanup_tree_cfg_noloop): ... single caller. Do
10969 start_recording_case_labels later.
10970
10971 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10972
10973 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10974 to _IMMINTRIN_H_INCLUDED.
10975 * config/i386/pconfigintrin.h: Ditto.
10976 * config/i386/waitpkgintrin.h: Ditto.
10977 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10978 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10979 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10980 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10981 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10982 waitpkgintrin.h and cldemoteintrin.h.
10983
10984 2018-06-04 Richard Biener <rguenther@suse.de>
10985
10986 PR tree-optimization/86038
10987 * tracer.c (find_best_successor): Check probability for
10988 being initialized, bail out if not.
10989
10990 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10991
10992 PR target/86003
10993 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10994 of bits to ignore when comparing architectures.
10995
10996 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10997
10998 PR tree-optimization/69615
10999 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
11000 maximum or minimum of the type, try to merge it also as if
11001 range1 is + [-, x - 1] or + [x + 1, -].
11002
11003 PR c++/86025
11004 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
11005
11006 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
11007
11008 PR tree-optimization/86034
11009 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
11010 the unsigned bitfield type in a bit insertion sequence if it does not
11011 have a larger precision than the bitfield size.
11012 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
11013
11014 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
11015
11016 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
11017
11018 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11019
11020 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
11021 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
11022 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
11023 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
11024
11025 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
11026
11027 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
11028 Disable -fdelete-null-pointer-checks for ELF toolchain.
11029
11030 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11031 Kito Cheng <kito.cheng@gmail.com>
11032
11033 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
11034 (nds32le-*-*, nds32be-*-*): Integrate checking process.
11035 (nds32*-*-*): Add glibc and uclibc conditions.
11036 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
11037 (TARGET_EXCEPT_UNWIND_INFO): Define.
11038 * config/nds32/elf.h: New file.
11039 * config/nds32/linux.h: New file.
11040 * config/nds32/nds32-elf.opt: New file.
11041 * config/nds32/nds32-linux.opt: New file.
11042 * config/nds32/nds32-fp-as-gp.c
11043 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
11044 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
11045 TARGET_LINUX_ABI.
11046 (nds32_asm_file_end): Ditto.
11047 (nds32_print_operand): Ditto.
11048 (nds32_insert_attributes): Ditto.
11049 (nds32_init_libfuncs): New function.
11050 (TARGET_HAVE_TLS): Define.
11051 (TARGET_INIT_LIBFUNCS): Define.
11052 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
11053 spec content.
11054 (TARGET_ELF): Apply different mcmodel setting.
11055 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
11056 been migrated into elf.h and linux.h files.
11057 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
11058 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
11059 (mcmodel): The content has been migrated into nds32-elf.opt and
11060 nds32-linux.opt files.
11061 * config/nds32/t-elf: New file.
11062 * config/nds32/t-linux: New file.
11063
11064 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
11065 Shiva Chen <shiva0217@gmail.com>
11066
11067 * config/nds32/constants.md (unspec_volatile_element): Add
11068 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
11069 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
11070 optimization.
11071 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
11072 (make_pass_nds32_fp_as_gp): Declare.
11073 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
11074 optmization pass.
11075 (nds32_asm_function_end_prologue): Remove unused asm output.
11076 (nds32_asm_function_begin_epilogue): Remove unused asm output.
11077 (nds32_asm_file_start): Output necessary fp_as_gp information.
11078 (nds32_option_override): Adjust register usage.
11079 (nds32_expand_prologue): Consider fp_as_gp situation.
11080 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
11081 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
11082 (epilogue): Ditto.
11083 (return): Ditto.
11084 (simple_return): Ditto.
11085 (omit_fp_begin): Output special directive for fp_as_gp.
11086 (omit_fp_end): Output special directive for fp_as_gp.
11087 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
11088 mforbid-fp-as-gp): New options.
11089
11090 2018-06-01 Mark Wielaard <mark@klomp.org>
11091
11092 * dwarf2out.c (dwarf2out_finish): Remove generation of
11093 DW_AT_loclists_base.
11094
11095 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
11096
11097 * gimple-ssa-store-merging.c: Include gimple-fold.h.
11098 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
11099 (struct merged_store_group): Add bit_insertion field.
11100 (dump_char_array): Use standard hexadecimal format.
11101 (merged_store_group::merged_store_group): Set bit_insertion to false.
11102 (merged_store_group::apply_stores): Use optimal buffer size. Deal
11103 with BIT_INSERT_EXPR stores. Move up code updating the mask and
11104 also print the mask in the dump file.
11105 (pass_store_merging::gate): Minor tweak.
11106 (imm_store_chain_info::coalesce_immediate): Fix wrong association
11107 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
11108 stores with INTEGER_CST stores.
11109 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
11110 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
11111 and use it throughout. Generate bit insertion sequences if need be.
11112 (pass_store_merging::process_store): Remove redundant condition.
11113 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
11114
11115 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
11116
11117 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
11118 the 128-bit floating point types. Fix function comment.
11119
11120 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11121
11122 * config/aarch64/aarch64-simd.md
11123 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
11124 mnemonics.
11125 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
11126 mnemonics.
11127
11128 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11129
11130 PR tree-optimization/85989
11131 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
11132 variable.
11133 (backprop::intersect_uses): Check it when deciding whether this
11134 is a backedge reference.
11135 (backprop::process_block): Add each phi to m_visited_phis
11136 after visiting it, then clear it at the end.
11137
11138 2018-06-01 Richard Biener <rguenther@suse.de>
11139
11140 * tree-vectorizer.h (vect_dr_stmt): New function.
11141 (vect_get_load_cost): Adjust.
11142 (vect_get_store_cost): Likewise.
11143 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
11144 Use vect_dr_stmt instead of DR_SMTT.
11145 (vect_record_base_alignments): Likewise.
11146 (vect_calculate_target_alignment): Likewise.
11147 (vect_compute_data_ref_alignment): Likewise and make static.
11148 (vect_update_misalignment_for_peel): Likewise.
11149 (vect_verify_datarefs_alignment): Likewise.
11150 (vector_alignment_reachable_p): Likewise.
11151 (vect_get_data_access_cost): Likewise. Pass down
11152 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
11153 (vect_get_peeling_costs_all_drs): Likewise.
11154 (vect_peeling_hash_get_lowest_cost): Likewise.
11155 (vect_enhance_data_refs_alignment): Likewise.
11156 (vect_find_same_alignment_drs): Likewise.
11157 (vect_analyze_data_refs_alignment): Likewise.
11158 (vect_analyze_group_access_1): Likewise.
11159 (vect_analyze_group_access): Likewise.
11160 (vect_analyze_data_ref_access): Likewise.
11161 (vect_analyze_data_ref_accesses): Likewise.
11162 (vect_vfa_segment_size): Likewise.
11163 (vect_small_gap_p): Likewise.
11164 (vectorizable_with_step_bound_p): Likewise.
11165 (vect_prune_runtime_alias_test_list): Likewise.
11166 (vect_analyze_data_refs): Likewise.
11167 (vect_supportable_dr_alignment): Likewise.
11168 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11169 (vect_gen_prolog_loop_niters): Likewise.
11170 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11171 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
11172 modify DR_STMT.
11173 (vect_recog_mask_conversion_pattern): Likewise.
11174 (vect_try_gather_scatter_pattern): Likewise.
11175 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
11176 to vect_get_store_cost.
11177 (vect_get_store_cost): Get stmt_info instead of DR.
11178 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
11179 (vect_get_load_cost): Get stmt_info instead of DR.
11180
11181 2018-06-01 Richard Biener <rguenther@suse.de>
11182
11183 PR middle-end/86017
11184 * gimple-fold.c (var_decl_component_p): Also allow offsetted
11185 vars wrapped in MEM_REFs.
11186
11187 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
11188
11189 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11190 Fix subreg tests so that we only return a choice between
11191 GENERAL_REGS and FP_REGS if the original classes included both.
11192
11193 2018-06-01 Richard Biener <rguenther@suse.de>
11194
11195 PR ipa/85960
11196 * tree-ssa-structalias.c (get_function_part_constraint):
11197 Handle NULL fi->decl.
11198 (find_func_aliases_for_call): Properly handle indirect
11199 fi from direct call.
11200 (find_func_clobbers): Likewise.
11201 (ipa_pta_execute): Likewise.
11202 (create_variable_info_for): For functions that are ifunc_resolver
11203 resolve to a varinfo that contains the result of the resolver call.
11204 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
11205 aliases.
11206
11207 2018-05-31 Michael Collison <michael.collison@arm.com>
11208
11209 * config/aarch64/aarch64.md:
11210 (*fix_to_zero_extenddfdi2): New pattern.
11211 * gcc.target/aarch64/fix_extend1.c: New testcase.
11212
11213 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
11214
11215 PR middle-end/78809
11216 PR middle-end/83026
11217 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
11218 and BUILT_IN_STRNCMP_EQ.
11219 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
11220 BUILT_IN_STRNCMP_EQ.
11221 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
11222 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11223 (gimple_fold_builtin): Likewise.
11224 * tree-ssa-strlen.c (compute_string_length): New function.
11225 (determine_min_obsize): New function.
11226 (handle_builtin_string_cmp): New function to handle calls to
11227 string compare functions.
11228 (strlen_optimize_stmt): Add handling to builtin string compare
11229 calls.
11230 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
11231 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
11232 * tree.c (build_common_builtin_nodes): Add new defines of
11233 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
11234
11235 2018-05-31 Jakub Jelinek <jakub@redhat.com>
11236
11237 PR target/85984
11238 * bb-reorder.c (pass_partition_blocks::gate): Return false for
11239 functions with naked attribute.
11240
11241 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
11242
11243 * config/i386/sse.md (avx_vec_concat<mode>):
11244 Substitute concat_tg_mode mode attribute with xtg_mode.
11245 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
11246 (concat_tg_mode): Remove mode attribute.
11247
11248 2018-05-31 Martin Sebor <msebor@redhat.com>
11249
11250 PR c/82063
11251 * calls.c (alloc_max_size): Correct a logic error/typo.
11252 Treat excessive arguments as infinite. Warn for invalid arguments.
11253 * doc/invoke.texi (-Walloc-size-larger-than): Update.
11254
11255 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
11256
11257 PR target/85829
11258 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
11259 and movx for Haswell.
11260
11261 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
11262 Cesar Philippidis <cesar@codesourcery.com>
11263
11264 PR middle-end/85879
11265 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
11266 when emitting error on private/firstprivate reductions.
11267 * omp-low.c (lower_omp_target): Avoid reference-type processing
11268 on pointers for firstprivate clause.
11269
11270 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11271
11272 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
11273 (st1x2): Likewise.
11274 (st1x3): Likewise.
11275 * config/aarch64/aarch64-simd.md
11276 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
11277 (aarch64_ld1_x3_<mode>): Likewise
11278 (aarch64_st1x2<VALLDIF:mode>): Likewise
11279 (aarch64_st1_x2_<mode>): Likewise
11280 (aarch64_st1x3<VALLDIF:mode>): Likewise
11281 (aarch64_st1_x3_<mode>): Likewise
11282 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
11283 (vld1_s8_x3): Likewise.
11284 (vld1_u16_x3): Likewise.
11285 (vld1_s16_x3): Likewise.
11286 (vld1_u32_x3): Likewise.
11287 (vld1_s32_x3): Likewise.
11288 (vld1_u64_x3): Likewise.
11289 (vld1_s64_x3): Likewise.
11290 (vld1_f16_x3): Likewise.
11291 (vld1_f32_x3): Likewise.
11292 (vld1_f64_x3): Likewise.
11293 (vld1_p8_x3): Likewise.
11294 (vld1_p16_x3): Likewise.
11295 (vld1_p64_x3): Likewise.
11296 (vld1q_u8_x3): Likewise.
11297 (vld1q_s8_x3): Likewise.
11298 (vld1q_u16_x3): Likewise.
11299 (vld1q_s16_x3): Likewise.
11300 (vld1q_u32_x3): Likewise.
11301 (vld1q_s32_x3): Likewise.
11302 (vld1q_u64_x3): Likewise.
11303 (vld1q_s64_x3): Likewise.
11304 (vld1q_f16_x3): Likewise.
11305 (vld1q_f32_x3): Likewise.
11306 (vld1q_f64_x3): Likewise.
11307 (vld1q_p8_x3): Likewise.
11308 (vld1q_p16_x3): Likewise.
11309 (vld1q_p64_x3): Likewise.
11310 (vst1_s64_x2): Likewise.
11311 (vst1_u64_x2): Likewise.
11312 (vst1_f64_x2): Likewise.
11313 (vst1_s8_x2): Likewise.
11314 (vst1_p8_x2): Likewise.
11315 (vst1_s16_x2): Likewise.
11316 (vst1_p16_x2): Likewise.
11317 (vst1_s32_x2): Likewise.
11318 (vst1_u8_x2): Likewise.
11319 (vst1_u16_x2): Likewise.
11320 (vst1_u32_x2): Likewise.
11321 (vst1_f16_x2): Likewise.
11322 (vst1_f32_x2): Likewise.
11323 (vst1_p64_x2): Likewise.
11324 (vst1q_s8_x2): Likewise.
11325 (vst1q_p8_x2): Likewise.
11326 (vst1q_s16_x2): Likewise.
11327 (vst1q_p16_x2): Likewise.
11328 (vst1q_s32_x2): Likewise.
11329 (vst1q_s64_x2): Likewise.
11330 (vst1q_u8_x2): Likewise.
11331 (vst1q_u16_x2): Likewise.
11332 (vst1q_u32_x2): Likewise.
11333 (vst1q_u64_x2): Likewise.
11334 (vst1q_f16_x2): Likewise.
11335 (vst1q_f32_x2): Likewise.
11336 (vst1q_f64_x2): Likewise.
11337 (vst1q_p64_x2): Likewise.
11338 (vst1_s64_x3): Likewise.
11339 (vst1_u64_x3): Likewise.
11340 (vst1_f64_x3): Likewise.
11341 (vst1_s8_x3): Likewise.
11342 (vst1_p8_x3): Likewise.
11343 (vst1_s16_x3): Likewise.
11344 (vst1_p16_x3): Likewise.
11345 (vst1_s32_x3): Likewise.
11346 (vst1_u8_x3): Likewise.
11347 (vst1_u16_x3): Likewise.
11348 (vst1_u32_x3): Likewise.
11349 (vst1_f16_x3): Likewise.
11350 (vst1_f32_x3): Likewise.
11351 (vst1_p64_x3): Likewise.
11352 (vst1q_s8_x3): Likewise.
11353 (vst1q_p8_x3): Likewise.
11354 (vst1q_s16_x3): Likewise.
11355 (vst1q_p16_x3): Likewise.
11356 (vst1q_s32_x3): Likewise.
11357 (vst1q_s64_x3): Likewise.
11358 (vst1q_u8_x3): Likewise.
11359 (vst1q_u16_x3): Likewise.
11360 (vst1q_u32_x3): Likewise.
11361 (vst1q_u64_x3): Likewise.
11362 (vst1q_f16_x3): Likewise.
11363 (vst1q_f32_x3): Likewise.
11364 (vst1q_f64_x3): Likewise.
11365 (vst1q_p64_x3): Likewise.
11366
11367 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11368
11369 * config/msp430/msp430.c (msp430_output_labelref): Prepend
11370 user_label_prefix to name.
11371
11372 * tree-core.h: Update comment about the format of NAME string
11373 passed to handler in attribute_spec.
11374
11375 * config/msp430/msp430.md: Remove erroneous subreg expression from
11376 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11377 zero_extend{q,h}isi2.
11378
11379 2018-05-30 Borislav Petkov <bp@suse.de>
11380
11381 * doc/extend.texi: Document some architecture specific
11382 constraints and sort entries.
11383
11384 2018-05-30 Martin Sebor <msebor@redhat.com>
11385
11386 PR middle-end/85369
11387 * builtins.c (expand_builtin_stpcpy_1): New function.
11388 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11389 only if the former succeeds.
11390
11391 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11392
11393 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11394 in saphira.
11395
11396 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11397
11398 * doc/invoke.texi (-flinker-output): Document
11399
11400 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11401
11402 * passes.c (ipa_write_summaries): Only modify statements if body
11403 is in memory.
11404 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11405 incrementally linking.
11406 (ipa_passes): Likewise.
11407 * lto-cgraph.c (lto_output_node): When incrementally linking do not
11408 pass down resolution info.
11409 * common.opt (flag_incremental_link): Update info.
11410 * gcc.c (plugin specs): Turn flinker-output=* to
11411 -plugin-opt=-linker-output-known
11412 * toplev.c (compile_file): Also cut compilation when doing incremental
11413 link.
11414 * flag-types. (enum lto_partition_model): Add
11415 LTO_LINKER_OUTPUT_NOLTOREL.
11416 (invoke.texi): Add -flinker-output docs.
11417 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11418 link same way as WPA; do not stream in dead initializers.
11419
11420 * dwarf2out.c (dwarf2out_die_ref_for_decl,
11421 darf2out_register_external_decl): Support incremental link.
11422
11423 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11424
11425 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11426
11427 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11428
11429 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11430 it down to simple_object_copy_lto_debug_sections.
11431 (run_gcc): Determine incremental LTO link time and configure
11432 lto1 into non-wpa mode, disable renaming of debug sections.
11433
11434 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
11435
11436 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11437 descriptions of various incorrectly documented functions.
11438
11439 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
11440
11441 Revert:
11442 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11443 address check not strict.
11444
11445 2018-05-30 Richard Biener <rguenther@suse.de>
11446
11447 PR tree-optimization/85964
11448 * tracer.c (better_p): Drop initialized count check, we only
11449 call the function with initialized counts now.
11450 (find_best_successor): Do find a best edge if one
11451 has uninitialized count.
11452 (find_best_predecessor): Likewise. Do BB frequency check only
11453 if count is initialized.
11454
11455 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
11456
11457 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11458 (aarch64_ldrstr_offset_compare): New.
11459 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11460 load/store orderings.
11461 (aarch64_gen_adjusted_ldpstp): Likewise.
11462
11463 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
11464
11465 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11466 Check for subset of GENERAL_REGS and FP_REGS.
11467 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11468 r=w alternative.
11469
11470 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
11471
11472 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11473 and wi::to_poly_offset. Add the current offset and then check
11474 whether the sum fits, rather than using an unchecked addition of
11475 a checked term. Check for a shwi rather than a uhwi.
11476 * expr.c (get_bit_range): Use tree_to_poly_uint64.
11477 (store_constructor): Use poly_int_tree_p.
11478 (expand_expr_real_1): Likewise.
11479 * function.c (assign_temp): Likewise.
11480 * fold-const.c (const_binop): Use poly_int_tree_p and
11481 wi::to_poly_offset.
11482 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
11483 division.
11484 * ipa-icf-gimple.c (func_checker::compare_operand): Use
11485 to_poly_offset for MEM offsets.
11486 * ipa-icf.c (sem_variable::equals): Likewise.
11487 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11488 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11489 wi::to_poly_offset for BIT_FIELD_REF offsets.
11490 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11491 wi::to_poly_offset.
11492 * var-tracking.c (emit_note_insn_var_location): Use
11493 tree_to_poly_uint64.
11494
11495 2018-05-29 Jim Wilson <jimw@sifive.com>
11496
11497 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11498
11499 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
11500
11501 PR target/85950
11502 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11503 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11504 sequence.
11505 (sse4_1_round<mode>2): Use nonimmediate_operand
11506 for operand 1 predicate.
11507
11508 2018-05-29 Martin Sebor <msebor@redhat.com>
11509 Richard Biener <rguenther@suse.de>
11510
11511 PR testsuite/85888
11512 * calls.c (get_size_range): Call determine_value_range instead
11513 of get_value_range..
11514 * tree-vrp.h (determine_value_range): Declared new function.
11515 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11516
11517 2018-05-29 Richard Biener <rguenther@suse.de>
11518
11519 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11520 sure to use non-pattern stmts for get_earlier_stmt arguments.
11521 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11522 called on pattern stmts.
11523 (get_later_stmt): Likewise.
11524
11525 2018-05-29 Martin Liska <mliska@suse.cz>
11526
11527 PR gcov-profile/85759
11528 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11529 env variables.
11530
11531 2018-05-29 Jakub Jelinek <jakub@redhat.com>
11532
11533 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11534 VEC_UNPACK_*_EXPR.
11535 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11536 VEC_PACK_*_EXPR.
11537
11538 PR target/85918
11539 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11540 VEC_PACK_FLOAT_EXPR): New tree codes.
11541 * tree-pretty-print.c (op_code_prio): Handle
11542 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11543 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11544 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11545 * tree-inline.c (estimate_operator_cost): Likewise.
11546 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11547 * fold-const.c (const_binop): Likewise.
11548 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11549 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11550 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11551 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11552 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11553 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11554 * expr.c (expand_expr_real_2): Likewise.
11555 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11556 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11557 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11558 optabs.
11559 * optabs.c (expand_widen_pattern_expr): For
11560 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11561 sign from result type rather than operand's type.
11562 (expand_binop_directly): For vec_packu_float_optab and
11563 vec_packs_float_optab allow result type to be different from operand's
11564 type.
11565 * optabs-tree.c (optab_for_tree_code): Handle
11566 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11567 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11568 * tree-vect-generic.c (expand_vector_operations_1): Handle
11569 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11570 VEC_PACK_FLOAT_EXPR.
11571 * tree-vect-stmts.c (supportable_widening_operation): Handle
11572 FIX_TRUNC_EXPR.
11573 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11574 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11575 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11576 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11577 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11578 mode attributes.
11579 (vec_pack<floatprefix>_float_<mode>): New expander.
11580 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11581 attributes.
11582 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11583 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11584 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11585 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11586 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11587 Document.
11588 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11589 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11590 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11591 VEC_PACK_FLOAT_EXPR): Document.
11592
11593 2018-05-29 Richard Biener <rguenther@suse.de>
11594
11595 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11596 member.
11597 (stmt_vec_info_vec): Make pointer.
11598 (init_stmt_vec_info_vec): Remove.
11599 (free_stmt_vec_info_vec): Likewise.
11600 (set_stmt_vec_info_vec): New function.
11601 (free_stmt_vec_infos): Likewise.
11602 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11603 (set_vinfo_for_stmt): Likewise.
11604 (get_earlier_stmt): Likewise.
11605 (get_later_stmt): Likewise.
11606 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11607 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11608 (vec_info::~vec_info): Free stmt_vec_infos.
11609 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11610 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11611 (pass_slp_vectorize::execute): Likewise.
11612 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11613 (free_stmt_vec_info_vec): Likewise.
11614 (set_stmt_vec_info_vec): New function.
11615 (free_stmt_vec_infos): Likewise.
11616 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11617 the global stmt_vec_info_vec.
11618 * tree-parloops.c (gather_scalar_reductions): Use
11619 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11620 vector.
11621
11622 2018-05-29 Richard Biener <rguenther@suse.de>
11623
11624 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11625
11626 2018-05-29 Martin Liska <mliska@suse.cz>
11627 David Malcolm <dmalcolm@redhat.com>
11628
11629 * vec.c (test_reverse): New.
11630 (vec_c_tests): Add new test.
11631 * vec.h (vl_ptr>::reverse): New function.
11632
11633 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11634
11635 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11636
11637 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11638 and later.
11639
11640 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11641
11642 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11643
11644 2018-05-28 Richard Biener <rguenther@suse.de>
11645
11646 PR tree-optimization/85933
11647 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11648 look at stmts marked as vectorizable.
11649
11650 2018-05-28 Richard Biener <rguenther@suse.de>
11651
11652 PR tree-optimization/85934
11653 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11654 vector boolean check before scalar optimization.
11655
11656 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11657
11658 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11659 for armv5te.
11660
11661 2018-05-28 Mark Wielaard <mark@klomp.org>
11662
11663 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11664 if it is an expression containing a minus sign.
11665
11666 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11667
11668 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11669
11670 2018-05-27 Paul Koning <ni1d@arrl.net>
11671
11672 * config/pdp11/pdp11.md (truncsihi2): Remove.
11673
11674 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11675 Chung-Ju Wu <jasonwucj@gmail.com>
11676
11677 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11678 implementation.
11679 (unaligned_store_dw): Ditto.
11680 * config/nds32/nds32-memory-manipulation.c
11681 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11682 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11683 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11684 (emit_setmem_word_loop): Rename to ...
11685 (emit_setmem_doubleword_loop): ... this.
11686 (nds32_gen_dup_4_byte_to_word_value): New function.
11687 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11688 (nds32_expand_setmem_loop): Refine implementation.
11689 (nds32_expand_setmem_loop_v3m): Ditto.
11690 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11691 pattern.
11692
11693 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11694
11695 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11696
11697 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11698
11699 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11700 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11701 machine->attr_no_prologue_p.
11702 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11703 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11704 (nds32_expand_epilogue): Consider attr_naked_p.
11705 (nds32_expand_epilogue_v3pop): Likewise.
11706 (nds32_can_use_return_insn): Likewise.
11707 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11708 attr_no_prologue_p fields.
11709 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11710
11711 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11712
11713 PR target/85918
11714 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11715 attributes.
11716 * config/i386/sse.md
11717 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11718 Rename to ...
11719 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11720 ... this.
11721 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11722 Rename to ...
11723 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11724 ... this.
11725 (*<floatsuffix>floatv2div2sf2): Rename to ...
11726 (*float<floatunssuffix>v2div2sf2): ... this.
11727 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11728 (float<floatunssuffix>v2div2sf2_mask): ... this.
11729 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11730 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11731 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11732 to ...
11733 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11734 ... this.
11735 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11736 Rename to ...
11737 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11738 ... this.
11739 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11740 Rename to ...
11741 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11742 ... this.
11743 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11744 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11745 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11746 gen_ufix_truncv8dfv8si2.
11747 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11748 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11749 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11750 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11751 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11752 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11753 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11754 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11755
11756 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11757
11758 PR target/85900
11759 PR target/85345
11760 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11761
11762 2018-05-25 Jim Wilson <jimw@sifive.com>
11763
11764 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11765 * config/riscv/riscv.c (struct machine_function): Add
11766 interrupt_handler_p and attribute_checked_p fields.
11767 (riscv_attribute_table): Add interrupt.
11768 (riscv_interrupt_type_p): New.
11769 (riscv_save_reg_p): Save extra regs for interrupt handler.
11770 (riscv_use_save_libcall): Return false for interrupt handler.
11771 (riscv_first_stack_step): Add forward declaration.
11772 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11773 for interrupt handler with large frame. Use it for saved reg list.
11774 (riscv_expand_prologue): Move flag_stack_usage_info support to
11775 eliminate duplication.
11776 (riscv_expand_epilogue): Generate mret for interrupt handler.
11777 (riscv_epilogue_uses): New.
11778 (riscv_can_use_return_insn): Return false for interrupt handler.
11779 (riscv_function_ok_for_sibcall): Likewise.
11780 (riscv_set_current_function): Add interrupt handler support.
11781 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11782 * config/riscv/riscv.md (UNSPECV_MRET): New.
11783 (GP_REGNUM): New.
11784 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11785 (riscv_mret): New.
11786 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11787
11788 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11789
11790 PR tree-optimization/85712
11791 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11792 this candidate has already been replaced in-situ by a copy.
11793
11794 2018-05-25 Jason Merrill <jason@redhat.com>
11795
11796 PR c++/80485 - inline function non-zero address.
11797 * symtab.c (nonzero_address): Check DECL_COMDAT.
11798
11799 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11800
11801 PR target/83628
11802 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11803 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11804 extension of SImode operation. Use const123_operand predicate.
11805 (*saddsi_1): Remove.
11806 (*saddl_se_1): Ditto.
11807 (*ssubsi_1): Ditto.
11808 (*ssubl_se_1): Ditto.
11809 * config/alpha/predicates.md (const123_operand): New predicate.
11810 * config/alpha/constraints.md (P): Use IN_RANGE.
11811
11812 2018-05-25 Richard Biener <rguenther@suse.de>
11813
11814 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11815 defaulted to true.
11816 (ref_maybe_used_by_stmt_p): Likewise.
11817 (stmt_may_clobber_ref_p): Likewise.
11818 (stmt_may_clobber_ref_p_1): Likewise.
11819 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11820 and pass it along.
11821 (ref_maybe_used_by_stmt_p): Likewise.
11822 (stmt_may_clobber_ref_p): Likewise.
11823 (stmt_may_clobber_ref_p_1): Likewise.
11824 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11825 the alias oracle to disambiguate DRs with stmts DR analysis
11826 couldn't handle.
11827 (vect_analyze_data_refs): Do not give up on not analyzable
11828 DRs for BB vectorization. Remove code truncating the dataref
11829 vector.
11830
11831 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11832
11833 PR target/85832
11834 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11835 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11836 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11837
11838 2018-05-25 Richard Biener <rguenther@suse.de>
11839
11840 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11841 function, combining stmt data ref gathering and fatal analysis
11842 parts.
11843 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11844 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11845 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11846 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11847 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11848
11849 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11850
11851 PR tree-optimization/85720
11852 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11853 SCC if all partitions are builtins.
11854 (version_loop_by_alias_check): New parameter. Generate cancelable
11855 runtime alias check if all partitions are builtins.
11856 (distribute_loop): Update call to above function.
11857
11858 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11859
11860 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11861 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11862 (parm_default_def_partition_arg): Ditto.
11863 (set_parm_default_def_partition): Ditto.
11864 (get_parm_default_def_partitions): Ditto and make it static.
11865 (get_undefined_value_partitions): Ditto and make it static.
11866 (remove_ssa_form): Refactor call to init_var_map here.
11867 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11868 computation for loop region.
11869 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11870 (register_default_def): Delete.
11871 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11872 (parm_default_def_partition_arg): Ditto.
11873 (set_parm_default_def_partition): Ditto.
11874 (get_parm_default_def_partitions): Ditto and make it static.
11875 (get_undefined_value_partitions): Ditto and make it static.
11876 (coalesce_with_default, coalesce_with_default): Update comment.
11877 (create_coalesce_list_for_region): New func factored out from
11878 create_outofssa_var_map.
11879 (populate_coalesce_list_for_outofssa): New func factored out from
11880 create_outofssa_var_map and coalesce_ssa_name.
11881 (create_outofssa_var_map): Delete.
11882 (coalesce_ssa_name): Refactor to support live range computation.
11883 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11884 (get_parm_default_def_partitions): Delete.
11885 (get_undefined_value_partitions): Ditto.
11886 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11887 computation for loop region.
11888 (new_tree_live_info, loe_visit_block): Ditto.
11889 (live_worklist, set_var_live_on_entry): Ditto.
11890 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11891 * tree-ssa-live.h (struct _var_map): New fields.
11892 (init_var_map): Change decl.
11893 (region_contains_p): New.
11894
11895 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11896
11897 * tree-ssa-live.h (live_merge_and_clear): Delete.
11898
11899 2018-05-25 Richard Biener <rguenther@suse.de>
11900
11901 PR c++/85912
11902 * tree-dump.c (dequeue_and_dump): Remove access to removed
11903 operand 2 of a SWITCH_EXPR.
11904
11905 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11906
11907 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11908 multiplication and division.
11909 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11910 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11911 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11912 (cond_udiv_optab, cond_umod_optab): New optabs.
11913 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11914 (IFN_COND_RDIV): New internal functions.
11915 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11916 TRUNC_MOD_EXPR and RDIV_EXPR.
11917 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11918 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11919 New unspecs.
11920 (SVE_INT_BINARY): Include mult.
11921 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11922 (optab, sve_int_op): Handle mult.
11923 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11924 UNSPEC_COND_DIV.
11925 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11926 for SVE_INT_BINARY_SD.
11927
11928 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11929
11930 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11931 (optab, sve_int_op): Handle div and udiv.
11932 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11933 for SVE_INT_BINARY_SD.
11934 (*<optab><mode>3): New insn for the same.
11935
11936 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11937
11938 * tree-vect-patterns.c: Include predict.h.
11939 (vect_recog_divmod_pattern): Restrict check for division support
11940 to when optimizing for size.
11941
11942 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11943
11944 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11945 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11946 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11947 (gimple_match_op::set_op): Likewise.
11948 (gimple_resimplify4): Declare.
11949 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11950 (expr::gen_transform): Likewise.
11951 (decision_tree::gen): Generate a simplification routine for 4 operands.
11952 * gimple-match-head.c (gimple_simplify): Add an overload for
11953 4 operands. In the top-level function, handle up to 4 call
11954 arguments and call gimple_resimplify4.
11955 (gimple_resimplify4): New function.
11956 (build_call_internal): Pass a fourth operand.
11957 (maybe_push_to_seq): Likewise.
11958 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11959 Fold VEC_COND_EXPRs of an operation and a default value into
11960 an IFN_COND_* function if possible.
11961 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11962 New unspecs.
11963 (SVE_COND_FP_BINARY): Include them.
11964 (optab, sve_fp_op): Handle them.
11965 (SVE_INT_BINARY_REV): New code iterator.
11966 (SVE_COND_FP_BINARY_REV): New int iterator.
11967 (commutative): New int attribute.
11968 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11969 Declare.
11970 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11971 function.
11972 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11973 (*cond_<optab><mode>): New patterns for reversed operands.
11974
11975 2018-05-25 Richard Biener <rguenther@suse.de>
11976
11977 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11978 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11979 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11980 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11981 * tree-vect-data-refs.c (everywhere): Adjust users.
11982 * tree-vect-loop.c (everywhere): Likewise.
11983 * tree-vect-slp.c (everywhere): Likewise.
11984 * tree-vect-stmts.c (everywhere): Likewise.
11985 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11986
11987 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11988
11989 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11990 Rename to...
11991 (gcc_cv_as_section_exclude): ... this.
11992 Try Solaris as #exclude syntax.
11993 * configure: Regenerate.
11994 * config.in: Regenerate.
11995 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11996 SECTION_EXCLUDE.
11997 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11998 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11999
12000 * varasm.c (default_elf_asm_named_section): Don't check if
12001 HAVE_GAS_SECTION_EXCLUDE is defined.
12002
12003 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12004
12005 * doc/md.texi: Update the documentation of the cond_* optabs
12006 to mention the new final operand. Fix GET_MODE_NUNITS call.
12007 Describe the scalar case too.
12008 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
12009 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
12010 instead of 2.
12011 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
12012 (get_conditional_internal_fn): Update comment.
12013 * tree-vect-loop.c (vectorizable_reduction): Pass the original
12014 accumulator value as a final argument to conditional functions.
12015 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
12016 a define_expand and add an "else" operand. Assert for now that
12017 the else operand is equal to operand 2. Use SVE_INT_BINARY and
12018 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
12019 (*cond_<optab><mode>): New patterns.
12020 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
12021 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12022 (UNSPEC_COND_EOR): Delete.
12023 (optab): Remove associated mappings.
12024 (SVE_INT_BINARY): New code iterator.
12025 (sve_int_op): Remove int attribute and add "minus" to the code
12026 attribute.
12027 (SVE_COND_INT_OP): Delete.
12028 (SVE_COND_FP_OP): Rename to...
12029 (SVE_COND_FP_BINARY): ...this.
12030
12031 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
12032
12033 * optabs.c (can_reuse_operands_p): New function.
12034 (maybe_legitimize_operands): Try to reuse the results for
12035 earlier operands.
12036
12037 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12038
12039 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
12040 Add {q} suffix to insn mnemonic.
12041
12042 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12043
12044 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
12045 (msp430_warn_func_return): New.
12046
12047 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
12048
12049 * fold-const.c (tree_nonzero_bits): New function.
12050 * fold-const.h (tree_nonzero_bits): Likewise.
12051 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
12052 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
12053
12054 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
12055
12056 PR target/85900
12057 PR target/85345
12058 * varasm.c (assemble_alias): Check ifunc_resolver only on
12059 FUNCTION_DECL.
12060
12061 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
12062
12063 PR target/85903
12064 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
12065 when memory input operand is handled.
12066
12067 2018-05-24 Luis Machado <luis.machado@linaro.org>
12068
12069 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
12070 global.
12071 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
12072
12073 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12074
12075 * match.pd: Delay FMA folds until after vectorization.
12076
12077 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
12078
12079 PR target/83009
12080 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12081 address check not strict.
12082
12083 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
12084
12085 * gimple-match.h (gimple_match_op): New class.
12086 (mprts_hook): Replace parameters with a gimple_match_op *.
12087 (maybe_build_generic_op): Likewise.
12088 (gimple_simplified_result_is_gimple_val): Replace parameters with
12089 a const gimple_match_op *.
12090 (gimple_simplify): Replace code_helper * and tree * parameters with
12091 a gimple_match_op * parameter.
12092 (gimple_resimplify1): Replace code_helper *, tree and tree *
12093 parameters with a gimple_match_op * parameter.
12094 (gimple_resimplify2): Likewise.
12095 (gimple_resimplify3): Likewise.
12096 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
12097 parameters with a gimple_match_op * parameter.
12098 * gimple-match-head.c (gimple_simplify): Change prototypes of
12099 auto-generated functions to take a gimple_match_op * instead of
12100 separate code_helper * and tree * parameters. Make the same
12101 change in the top-level overload and update calls to the
12102 gimple_resimplify routines. Update calls to the auto-generated
12103 functions and to maybe_push_res_to_seq in the publicly-facing
12104 operation-specific gimple_simplify overloads.
12105 (gimple_match_op::MAX_NUM_OPS): Define.
12106 (gimple_resimplify1): Replace rcode and ops with a single res_op
12107 parameter. Update call to gimple_simplify.
12108 (gimple_resimplify2): Likewise.
12109 (gimple_resimplify3): Likewise.
12110 (mprts_hook): Replace parameters with a gimple_match_op *.
12111 (maybe_build_generic_op): Likewise.
12112 (build_call_internal): Replace type, nargs and ops with
12113 a gimple_match_op *.
12114 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
12115 with a single gimple_match_op *. Update calls to mprts_hook,
12116 build_call_internal and gimple_simplified_result_is_gimple_val.
12117 Factor out code that is common to the tree_code and combined_fn cases.
12118 * genmatch.c (expr::gen_transform): Replace tem_code and
12119 tem_ops with a gimple_match_op called tem_op. Update calls
12120 to the gimple_resimplify functions and maybe_push_res_to_seq.
12121 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
12122 res_ops. Update call to the gimple_resimplify functions.
12123 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
12124 (decision_tree::gen): Make the functions take a gimple_match_op *
12125 called res_op instead of separate res_code and res_ops parameters.
12126 Update call accordingly.
12127 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
12128 and ops with a single res_op parameter. Update calls to
12129 maybe_build_generic_op and maybe_push_res_to_seq.
12130 (fold_stmt_1): Update calls to gimple_simplify and
12131 replace_stmt_with_simplification.
12132 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
12133 and gimple_simplified_result_is_gimple_val.
12134 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
12135 gimple_simplify.
12136 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
12137 with a gimple_match_op *.
12138 (vn_nary_build_or_lookup): Likewise. Update call to
12139 vn_nary_build_or_lookup_1.
12140 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
12141 gimple_match_op *. Update calls to the gimple_resimplify routines
12142 and to gimple_simplified_result_is_gimple_val.
12143 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
12144 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
12145 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
12146 (visit_nary_op): Likewise.
12147 (visit_reference_op_load): Likewise.
12148
12149 2018-05-23 Luis Machado <luis.machado@linaro.org>
12150
12151 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
12152 modifier for printing the step amount.
12153
12154 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
12155
12156 PR target/78849
12157 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
12158 types.
12159
12160 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
12161
12162 * doc/sourcebuild.texi (Endianness): New subsubsection.
12163
12164 2018-05-23 Luis Machado <luis.machado@linaro.org>
12165
12166 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12167 <prefetch_dynamic_strides>: New const bool field.
12168 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12169 prefetch_dynamic_strides.
12170 (exynosm1_prefetch_tune): Likewise.
12171 (thunderxt88_prefetch_tune): Likewise.
12172 (thunderx_prefetch_tune): Likewise.
12173 (thunderx2t99_prefetch_tune): Likewise.
12174 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
12175 false.
12176 (aarch64_override_options_internal): Update to set
12177 PARAM_PREFETCH_DYNAMIC_STRIDES.
12178 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12179 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12180 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12181 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12182 prefetch-dynamic-strides setting.
12183
12184 2018-05-23 Luis Machado <luis.machado@linaro.org>
12185
12186 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12187 <minimum_stride>: New const int field.
12188 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12189 minimum_stride field defaulting to -1.
12190 (exynosm1_prefetch_tune): Likewise.
12191 (thunderxt88_prefetch_tune): Likewise.
12192 (thunderx_prefetch_tune): Likewise.
12193 (thunderx2t99_prefetch_tune): Likewise.
12194 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
12195 <default_opt_level>: Set to 3.
12196 (aarch64_override_options_internal): Update to set
12197 PARAM_PREFETCH_MINIMUM_STRIDE.
12198 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12199 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12200 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12201 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12202 stride is constant and is below the minimum stride threshold.
12203
12204 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12205
12206 * config/arm/arm-cpus.in (mode26): Delete.
12207 (armv4): Delete mode26 reference.
12208 * config/arm/arm.c (arm_configure_build_target): Delete use of
12209 isa_bit_mode26.
12210
12211 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12212
12213 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
12214 New insn pattern.
12215 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
12216 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
12217 for non-SSE modes.
12218 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
12219 (floatunsdidf2): Ditto.
12220
12221 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
12222
12223 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
12224 (fixuns_trunc<mode>si2_avx512f): Ditto.
12225 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
12226 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
12227 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
12228
12229 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12230
12231 PR rtl-optimization/79985
12232 * df-scan.c (df_insn_refs_collect): Remove special case for
12233 global registers and asm statements.
12234
12235 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
12236
12237 * extend.texi (Global Register Variables): Rewrite the bullet list.
12238 Note that the register is available for allocation. Note that access
12239 via inline asm must use constraints. Add note about async-signal
12240 handlers. Remove paragraph about automagic register selection.
12241
12242 2018-05-23 Richard Biener <rguenther@suse.de>
12243
12244 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
12245 of fixed offset from memset VN.
12246
12247 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
12248
12249 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
12250 first_interp field.
12251 (alloc_cand_and_find_basis): Initialize first_interp field.
12252 (slsr_process_mul): Modify first_interp field.
12253 (slsr_process_add): Likewise.
12254 (slsr_process_cast): Modify first_interp field for each new
12255 interpretation.
12256 (slsr_process_copy): Likewise.
12257 (dump_candidate): Dump first_interp field.
12258 (replace_mult_candidate): Process all interpretations, not just
12259 subsequent ones.
12260 (replace_rhs_if_not_dup): Likewise.
12261 (replace_one_candidate): Likewise.
12262
12263 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
12264
12265 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
12266 Add new boolean.
12267 (aarch64_needs_frame_chain): New function.
12268 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
12269
12270 2018-05-23 Sudakshina Das <sudi.das@arm.com>
12271
12272 PR target/84882
12273 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
12274 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
12275 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
12276 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
12277 as true for strict-align.
12278 (aarch64_can_inline_p): Perform checks even when callee has no
12279 attributes to check for strict alignment.
12280 * doc/extend.texi (AArch64 Function Attributes): Document
12281 no-strict-align.
12282 * doc/invoke.texi: (AArch64 Options): Likewise.
12283
12284 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
12285
12286 PR tree-optimization/85853
12287 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
12288 the handling of the root of the node to...
12289 (vect_slp_analyze_node_operations_1): ...this new function,
12290 and run the whole thing with the child nodes' def types
12291 set according to their SLP node's def type.
12292
12293 2018-05-23 Richard Biener <rguenther@suse.de>
12294
12295 PR middle-end/85874
12296 * tree-data-ref.c (create_runtime_alias_checks): Defer
12297 and ignore overflow warnings.
12298
12299 2018-05-23 Yury Gribov <tetra2005@gmail.com>
12300
12301 PR tree-optimization/85822
12302 * tree-vrp.c (is_masked_range_test): Fix handling of negative
12303 constants.
12304
12305 2018-05-23 Richard Biener <rguenther@suse.de>
12306
12307 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12308 memset constants via native_interpret_expr.
12309
12310 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
12311
12312 PR target/85345
12313 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
12314 attribute.
12315 (cgraph_node::create_alias): Likewise.
12316 (cgraph_node::get_availability): Check ifunc_resolver instead
12317 of looking up ifunc attribute.
12318 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12319 * varasm.c (do_assemble_alias): Likewise.
12320 (assemble_alias): Likewise.
12321 (default_binds_local_p_3): Likewise.
12322 * cgraph.h (cgraph_node): Add ifunc_resolver.
12323 (cgraph_node::only_called_directly_or_aliased_p): Return false
12324 for IFUNC resolver.
12325 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
12326 attribute.
12327 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
12328 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
12329 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
12330 instead of looking up ifunc attribute.
12331
12332 2018-05-22 Luis Machado <luis.machado@linaro.org>
12333
12334 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
12335
12336 2018-05-22 Martin Sebor <msebor@redhat.com>
12337
12338 PR middle-end/85359
12339 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
12340 only when expasion succeeds.
12341 (expand_builtin_strcmp): Same.
12342 (expand_builtin_strncmp): Same.
12343
12344 2018-05-22 Martin Sebor <msebor@redhat.com>
12345
12346 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12347
12348 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12349 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12350
12351 * config/aarch64/aarch64-ldpstp.md: Replace uses of
12352 aarch64_mem_pair_operand with memory_operand and delete operand swapping
12353 code.
12354 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12355 Add check for legitimate_address.
12356 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12357 (aarch64_swap_ldrstr_operands): New.
12358 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12359 Define prototype.
12360
12361 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12362 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12363
12364 * config/aarch64/aarch64.md: New patterns to generate stp
12365 and ldp.
12366 (store_pair_sw, store_pair_dw): New patterns to generate stp for
12367 single words and double words.
12368 (load_pair_sw, load_pair_dw): Likewise.
12369 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12370 Delete.
12371 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12372 Delete.
12373 * config/aarch64/aarch64-ldpstp.md: Modify peephole
12374 for different mode ldpstp and add peephole for merged zero stores.
12375 Likewise for loads.
12376 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12377 Add size check.
12378 (aarch64_gen_store_pair): Rename calls to match new patterns.
12379 (aarch64_gen_load_pair): Rename calls to match new patterns.
12380 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12381 (load_pair<DREG:mode><DREG2:mode>): ... This.
12382 (store_pair<mode>): Rename to...
12383 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12384 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12385 New mode iterators.
12386 (V_INT_EQUIV): Handle SImode.
12387 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12388 New predicate.
12389
12390 2018-05-22 Martin Sebor <msebor@redhat.com>
12391
12392 PR c/85623
12393 * calls.c (maybe_warn_nonstring_arg): Use string length to set
12394 or ajust the presumed bound on an operation to avoid unnecessary
12395 warnings.
12396
12397 2018-05-22 Martin Sebor <msebor@redhat.com>
12398
12399 PR tree-optimization/85826
12400 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12401 assuming that a DECL necesarily has a constant size.
12402
12403 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
12404
12405 PR middle-end/85862
12406 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12407
12408 2018-05-22 Richard Biener <rguenther@suse.de>
12409
12410 PR tree-optimization/85834
12411 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12412 non-constant and non-zero memset arguments.
12413
12414 2018-05-22 Martin Liska <mliska@suse.cz>
12415
12416 PR ipa/85607
12417 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12418
12419 2018-05-22 Richard Biener <rguenther@suse.de>
12420
12421 PR tree-optimization/85863
12422 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12423 comparisons when vectype is specified.
12424 (vectorizable_condition): Do not specify vectype for
12425 vect_is_simple_cond when SLP vectorizing.
12426
12427 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
12428
12429 PR target/85657
12430 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12431 define __ibm128 as long double.
12432 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12433 as a distinct type when IEEE 128-bit support is enabled.
12434 (init_float128_ieee): Fix up conversions between IFmode and IEEE
12435 128-bit types to use the correct functions.
12436 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12437 convert between 128-bit floating point types that have different
12438 modes but the same representation, instead of using gen_lowpart to
12439 makean alias.
12440 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12441 KFmode.
12442 (IFKF_reg): New attributes to give the register constraints for
12443 IFmode and KFmode.
12444 (extend<mode>tf2_internal): New insns to mark an explicit
12445 conversion between 128-bit floating point types that have a
12446 different mode but share the same representation.
12447
12448 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
12449
12450 PR tree-optimization/85814
12451 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12452 a null return from get_strinfo when unsharing the next
12453 strinfo in the chain.
12454
12455 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12456
12457 PR gcc/84923
12458 * varasm.c (weak_finish): Clean up weak_decls.
12459
12460 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12461
12462 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12463 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12464 UNSPEC_UADALP values.
12465 * config/aarch64/iterators.md (ABAL): New int iterator.
12466 (ABDL2): Likewise.
12467 (ADALP): Likewise.
12468 (sur): Add mappings for the above.
12469 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12470 New define_insn.
12471 (aarch64_<sur>abal<mode>_4): Likewise.
12472 (aarch64_<sur>adalp<mode>_3): Likewise.
12473 (<sur>sadv16qi): New define_expand.
12474
12475 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
12476
12477 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12478 (*movdf_internal): Ditto.
12479 (*rcpsf2_sse): Ditto.
12480 (*rsqrtsf2_sse): Ditto.
12481 (*sqrt<mode>2_sse): Ditto.
12482
12483 2018-05-21 Tamar Christina <tamar.christina@arm.com>
12484
12485 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12486 eor3q<mode>4.
12487 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12488 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12489 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12490 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12491 vbcaxq_s64): New.
12492 * config/aarch64/arm_neon.h: Likewise.
12493 * config/aarch64/iterators.md (VQ_I): New.
12494
12495 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
12496
12497 * config.gcc: Add arc/t-multilib-linux to tmake_file for
12498 arc*-*-linux*.
12499 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12500 MULTILIB_DIRNAMES
12501
12502 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12503
12504 * config/nds32/constraints.md (S): New constraint.
12505 * config/nds32/nds32.md (call_internal): Use constraint S.
12506 (call_value_internal): Likewise.
12507 (sibcall_internal): Likewise.
12508 (sibcall_value_internal): Likewise.
12509
12510 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12511 Chung-Ju Wu <jasonwucj@gmail.com>
12512
12513 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12514 into consideration.
12515
12516 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12517 Chung-Ju Wu <jasonwucj@gmail.com>
12518
12519 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12520 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12521 (nds32_rtx_costs_impl): Simplify.
12522 (nds32_address_cost_impl): Simplify.
12523 (nds32_init_rtx_costs): New function.
12524 (nds32_rtx_costs_speed_prefer): Likewise.
12525 (nds32_rtx_costs_size_prefer): Likewise.
12526 (nds32_address_cost_speed_prefer): Likewise.
12527 (nds32_address_cost_speed_fwprop): Likewise.
12528 (nds32_address_cost_size_prefer): Likewise.
12529 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12530 * config/nds32/nds32.c (nds32_option_override): Use
12531 nds32_init_rtx_costs function.
12532
12533 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12534
12535 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12536 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12537 (TARGET_PIPELINE_N8): Likewise.
12538 (TARGET_PIPELINE_N10): Likewise.
12539 (TARGET_PIPELINE_N13): Likewise.
12540 (TARGET_PIPELINE_GRAYWOLF): Likewise.
12541
12542 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
12543
12544 * config/nds32/nds32-fpu.md: Update copyright year.
12545
12546 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12547
12548 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12549
12550 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12551
12552 * config/nds32/nds32.c
12553 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12554 * config/nds32/nds32.opt (minline-asm-r15): New option.
12555
12556 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12557
12558 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12559 MASK_HW_ABS.
12560 * config/nds32/nds32.md (abssi2): New pattern.
12561
12562 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12563
12564 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12565 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12566 Merge insn pattern from sse_cvtsi2ss<round_name> and
12567 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12568 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12569 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12570 using SWI48 mode iterator.
12571 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12572 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12573 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12574 pattern from sse_cvttss2si<round_saeonly_name>
12575 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12576 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12577 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12578 using SWI48 mode iterator.
12579 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12580 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12581 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12582 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12583 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12584 using SWI48 mode iterator.
12585 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12586 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12587 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12588 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12589 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12590 SWI48 mode iterator.
12591 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12592 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12593 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12594 pattern from sse_cvttsd2si<round_saeonly_name>
12595 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12596
12597 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12598
12599 * config/nds32/nds32-md-auxiliary.c
12600 (nds32_valid_smw_lwm_base_p): Refine.
12601 (nds32_output_smw_single_word): Refine.
12602 (nds32_output_smw_double_word): New.
12603 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12604
12605 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12606
12607 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12608 (nds32_output_stack_pop): Refine.
12609 (nds32_expand_unaligned_load): Refine.
12610 (nds32_expand_unaligned_store): Refine.
12611
12612 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12613 Chung-Ju Wu <jasonwucj@gmail.com>
12614
12615 * config/nds32/constants.md: Add TP_REGNUM constant.
12616 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12617 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12618 UNSPEC_ADD32.
12619 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12620 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12621 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12622 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12623 and PIC code generation.
12624 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12625 code generation.
12626 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12627 optimization.
12628 * config/nds32/nds32.md: Support TLS and PIC.
12629 * config/nds32/nds32.c: Support TLS and PIC.
12630 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12631 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12632 predicate.
12633
12634 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12635
12636 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12637 mode with E_ prefix.
12638
12639 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12640 Chung-Ju Wu <jasonwucj@gmail.com>
12641
12642 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12643 * config/nds32/nds32-md-auxiliary.c
12644 (symbolic_reference_mentioned_p): New.
12645 (nds32_legitimize_ict_address): New.
12646 (nds32_expand_ict_move): New.
12647 (nds32_indirect_call_referenced_p): New.
12648 (nds32_symbol_binds_local_p): Delete.
12649 (nds32_long_call_p): Modify.
12650 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12651 * config/nds32/nds32-protos.h
12652 (symbolic_reference_mentioned_p): Declare.
12653 (nds32_legitimize_ict_address): Declare.
12654 (nds32_expand_ict_move): Declare.
12655 (nds32_indirect_call_referenced_p): Declare.
12656 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12657 (nds32_relax_group): Use nds32_ict_const_p as condition.
12658 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12659 (nds32_asm_file_start): Output ict_model directive in asm code.
12660 (nds32_legitimate_address_p): Consider indirect call.
12661 (nds32_print_operand): Consider indirect call.
12662 (nds32_print_operand_address): Consider indirect call.
12663 (nds32_insert_attributes): Handle "indirect_call" attribute.
12664 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12665 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12666 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12667 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12668 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12669 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12670 (TARGET_ICT_MODEL_SMALL): Define.
12671 (TARGET_ICT_MODEL_LARGE): Define.
12672 * config/nds32/nds32.md (movsi): Consider ict model.
12673 (call, call_value): Consider ict model.
12674 (sibcall, sibcall_value): Consider ict model.
12675 * config/nds32/nds32.opt (mict-model): New option.
12676 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12677 model.
12678
12679 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12680 Monk Chiang <sh.chiang04@gmail.com>
12681 Jim Wilson <jimw@sifive.com>
12682
12683 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12684 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12685 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12686 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12687 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12688 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12689 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12690 compute save_libcall_adjustment properly.
12691 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12692 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12693 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12694 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12695 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12696 (ABI_SPEC): Handle mabi=ilp32e.
12697 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12698 (RVE): Add RVE mask.
12699 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12700 <-march>: Add rv32e as an example.
12701
12702 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12703
12704 PR c++/82899
12705 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12706 (intra_create_variable_infos): Handle C++ constructors.
12707
12708 2018-05-18 Martin Liska <mliska@suse.cz>
12709
12710 * passes.def: Remove a redundant pass.
12711
12712 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12713
12714 PR bootstrap/85838
12715 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12716
12717 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12718
12719 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12720 (ARMv4): Update.
12721 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12722 (ARMv6m): Update.
12723 (armv2, armv2a, armv3, armv3m): Delete architectures.
12724 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12725 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12726 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12727 Delete cpus.
12728 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12729 (*mulsidi3adddi): Likewise.
12730 (mulsidi3): Likewise.
12731 (*mulsidi3_nov6): Likewise.
12732 (umulsidi3): Likewise.
12733 (umulsidi3_nov6): Likewise.
12734 (umaddsidi4): Likewise.
12735 (*umulsidi3adddi): Likewise.
12736 (smulsi3_highpart): Likewise.
12737 (*smulsi3_highpart_nov6): Likewise.
12738 (umulsi3_highpart): Likewise.
12739 (*umulsi3_highpart_nov6): Likewise.
12740 * config/arm/arm.h (arm_arch3m): Delete.
12741 * config/arm/arm.c (arm_arch3m): Delete.
12742 (arm_option_override_internal): Update armv3-related comment.
12743 (arm_configure_build_target): Delete use of isa_bit_mode32.
12744 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12745 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12746 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12747 (mulsa3): Likewise.
12748 (mulusa3): Likewise.
12749 * config/arm/arm-protos.h (arm_arch3m): Delete.
12750 * config/arm/arm-tables.opt: Regenerate.
12751 * config/arm/arm-tune.md: Likewise.
12752 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12753 deleted architectures.
12754
12755 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12756
12757 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12758 (armv5t, armv5te): New features.
12759 (ARMv5, ARMv5e): Delete fgroups.
12760 (ARMv5t, ARMv5te): Adjust for above changes.
12761 (ARMv6m): Likewise.
12762 (armv5, armv5e): Delete arches.
12763 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12764 arm_arch5.
12765 (*call_reg_arm): Likewise.
12766 (*call_value_reg_armv5): Likewise.
12767 (*call_value_reg_arm): Likewise.
12768 (*call_symbol): Likewise.
12769 (*call_value_symbol): Likewise.
12770 (*sibcall_insn): Likewise.
12771 (*sibcall_value_insn): Likewise.
12772 (clzsi2): Likewise.
12773 (prefetch): Likewise.
12774 (define_split and define_peephole2 dependent on arm_arch5):
12775 Likewise.
12776 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12777 arm_arch5e.
12778 (TARGET_ARM_QBIT): Likewise.
12779 (TARGET_DSP_MULTIPLY): Likewise.
12780 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12781 (arm_arch5, arm_arch5e): Delete.
12782 (arm_arch5t, arm_arch5te): Declare.
12783 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12784 (arm_arch5t): Declare.
12785 (arm_option_reconfigure_globals): Update for the above.
12786 (arm_options_perform_arch_sanity_checks): Update comment, replace
12787 use of arm_arch5 with arm_arch5t.
12788 (use_return_insn): Likewise.
12789 (arm_emit_call_insn): Likewise.
12790 (output_return_instruction): Likewise.
12791 (arm_final_prescan_insn): Likewise.
12792 (arm_coproc_builtin_available): Likewise.
12793 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12794 arm_arch5e with arm_arch5t and arm_arch5te.
12795 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12796 (arm_arch5t, arm_arch5te): Declare.
12797 * config/arm/arm-tables.opt: Regenerate.
12798 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12799 * config/arm/t-multilib: Likewise.
12800 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12801 instead of arm_arch5.
12802 (*call_reg_thumb1): Likewise.
12803 (*call_value_reg_thumb1_v5): Likewise.
12804 (*call_value_reg_thumb1): Likewise.
12805 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12806 unreachable path.
12807 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12808
12809 2018-05-18 Martin Liska <mliska@suse.cz>
12810
12811 PR gcov-profile/84846
12812 * doc/gcov.texi: Document -t option of gcov tool.
12813
12814 2018-05-18 Martin Liska <mliska@suse.cz>
12815
12816 PR gcov-profile/84846
12817 * gcov.c (print_usage): Add new -t option.
12818 (process_args): Handle the option.
12819 (generate_results): Use stdout as output when requested by
12820 the option.
12821
12822 2018-05-18 Martin Liska <mliska@suse.cz>
12823
12824 PR gcov-profile/84846
12825 * coverage.c (coverage_init): Write PWD to .gcno file.
12826 * doc/gcov.texi: Document how working directory is printed.
12827 * gcov-dump.c (dump_gcov_file): Print PWD.
12828 * gcov.c (output_intermediate_file): Likewise.
12829 (read_graph_file): Read PWD string.
12830 (output_lines): Print PWD.
12831
12832 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12833
12834 PR middle-end/85817
12835 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12836 for retval and return false if all args to phi are zero.
12837
12838 2018-05-18 Richard Biener <rguenther@suse.de>
12839
12840 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12841 method.
12842 (evrp_dom_walker::before_dom_children): Call it.
12843
12844 2018-05-18 Richard Biener <rguenther@suse.de>
12845
12846 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12847 results when processing array refs with variable index.
12848
12849 2018-05-18 Toon Moene <toon@moene.org>
12850
12851 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12852 directly after that of -floop-interchange. Indicate that both
12853 options are enabled by default when specifying -O3.
12854
12855 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12856
12857 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12858 iterator. Delete separate integer-mode vec_set<mode> expander.
12859 (aarch64_simd_vec_setv2di): Delete.
12860 (vec_setv2di): Delete.
12861 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12862 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12863 the "w, r" alternative.
12864
12865 2018-05-18 Martin Liska <mliska@suse.cz>
12866
12867 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12868 * tree-pass.h (make_pass_lower_switch_O0): New function.
12869 * tree-switch-conversion.c (node_has_low_bound): Remove.
12870 (node_has_high_bound): Likewise.
12871 (node_is_bounded): Likewise.
12872 (class pass_lower_switch): Make it a template type and create
12873 two instances.
12874 (pass_lower_switch::execute): Add template argument.
12875 (make_pass_lower_switch): New function.
12876 (make_pass_lower_switch_O0): New function.
12877 (do_jump_if_equal): Remove.
12878 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12879 all the hard work to tree optimization passes.
12880
12881 2018-05-18 Martin Liska <mliska@suse.cz>
12882
12883 * dbgcnt.c (limit_low): Renamed from limit.
12884 (limit_high): New variable.
12885 (dbg_cnt_is_enabled): Check for upper limit.
12886 (dbg_cnt): Adjust dumping.
12887 (dbg_cnt_set_limit_by_index): Add new argument for high
12888 value.
12889 (dbg_cnt_set_limit_by_name): Likewise.
12890 (dbg_cnt_process_single_pair): Parse new format.
12891 (dbg_cnt_process_opt): Use strtok.
12892 (dbg_cnt_list_all_counters): Remove 'value' and add
12893 'limit_high'.
12894 * doc/invoke.texi: Document changes.
12895
12896 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12897
12898 * doc/sourcebuild.texi (scalar_all_fma): Document.
12899 * tree.def (FMA_EXPR): Delete.
12900 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12901 * internal-fn.c (ternary_direct): New macro.
12902 (expand_ternary_optab_fn): Likewise.
12903 (direct_ternary_optab_supported_p): Likewise.
12904 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12905 * builtins.c (fold_builtin_fma): Delete.
12906 (fold_builtin_3): Don't call it.
12907 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12908 * expr.c (expand_expr_real_2): Likewise.
12909 * fold-const.c (operand_equal_p): Likewise.
12910 (fold_ternary_loc): Likewise.
12911 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12912 * gimple.c (DEFTREECODE): Likewise.
12913 * gimplify.c (gimplify_expr): Likewise.
12914 * optabs-tree.c (optab_for_tree_code): Likewise.
12915 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12916 * tree-eh.c (operation_could_trap_p): Likewise.
12917 (stmt_could_throw_1_p): Likewise.
12918 * tree-inline.c (estimate_operator_cost): Likewise.
12919 * tree-pretty-print.c (dump_generic_node): Likewise.
12920 (op_code_prio): Likewise.
12921 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12922 * tree-ssa-operands.c (get_expr_operands): Likewise.
12923 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12924 * fold-const-call.h (fold_fma): Delete.
12925 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12926 CFN_FNMA and CFN_FNMS.
12927 (fold_fma): Delete.
12928 * genmatch.c (combined_fn): New enum.
12929 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12930 (commutative_op): New function.
12931 (commutate): Use it. Handle more than 2 operands.
12932 (dt_operand::gen_gimple_expr): Use commutative_op.
12933 (parser::parse_expr): Allow :c to be used with non-binary
12934 operators if the commutative operand is known.
12935 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12936 CFN_FMS, CFN_FNMA and CFN_FNMS.
12937 (backprop::process_assign_use): Remove FMA_EXPR handling.
12938 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12939 (gen_hsa_fma): New function.
12940 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12941 IFN_FNMA and IFN_FNMS.
12942 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12943 * gimple-fold.h (follow_all_ssa_edges): Declare.
12944 * gimple-fold.c (follow_all_ssa_edges): New function.
12945 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12946 gimple_build interface and use follow_all_ssa_edges to fold the result.
12947 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12948 instead of checking for optabs directly.
12949 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12950 rather than FMA_EXPRs.
12951 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12952 call to IFN_FMA instead of an FMA_EXPR.
12953
12954 2018-05-17 Jim Wilson <jimw@sifive.com>
12955
12956 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12957 sign extended promoted subreg, and the range does not have the sign bit
12958 set, then do a sign extend.
12959
12960 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12961 test, check for sign extended subreg and/or constant operands, and
12962 do a sign extend in that case.
12963
12964 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12965
12966 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12967 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12968 Add untyped.
12969 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12970 Change logics_shift_reg to logics_shift_imm.
12971 (thunderx2t99_fp_loadpair_basic): Delete.
12972 (thunderx2t99_fp_storepair_basic): Delete.
12973 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12974 (thunderx2t99_asimd_polynomial): Delete.
12975 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12976 and neon_fp_mul_d_scalar_q.
12977 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12978 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12979 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12980 (thunderx2t99_asimd_lut): Add missing tbl types.
12981 (thunderx2t99_asimd_ext): Delete.
12982 (thunderx2t99_asimd_load1_1_mult): Delete.
12983 (thunderx2t99_asimd_load1_2_mult): Delete.
12984 (thunderx2t99_asimd_load1_ldp): New.
12985 (thunderx2t99_asimd_load1): New.
12986 (thunderx2t99_asimd_load2): Add missing *load2* types.
12987 (thunderx2t99_asimd_load3): New.
12988 (thunderx2t99_asimd_load4): New.
12989 (thunderx2t99_asimd_store1_1_mult): Delete.
12990 (thunderx2t99_asimd_store1_2_mult): Delete.
12991 (thunderx2t99_asimd_store2_mult): Delete.
12992 (thunderx2t99_asimd_store2_onelane): Delete.
12993 (thunderx2t99_asimd_store_stp): New.
12994 (thunderx2t99_asimd_store1): New.
12995 (thunderx2t99_asimd_store2): New.
12996 (thunderx2t99_asimd_store3): New.
12997 (thunderx2t99_asimd_store4): New.
12998
12999 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
13000
13001 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
13002 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
13003
13004 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
13005 Segher Boessenkool <segher@kernel.crashing.org>
13006
13007 PR target/85698
13008 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
13009 operand.
13010
13011 2018-05-17 Richard Biener <rguenther@suse.de>
13012
13013 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
13014 for pruning loop and prune defs feeding only already visited PHIs.
13015
13016 2018-05-17 Richard Biener <rguenther@suse.de>
13017
13018 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
13019
13020 2018-05-17 Bin Cheng <bin.cheng@arm.com>
13021 Richard Biener <rguenther@suse.de>
13022
13023 PR tree-optimization/85793
13024 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
13025 for VMAT_ELEMENTWISE.
13026
13027 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13028
13029 * internal-fn.h (lookup_internal_fn): Declare
13030 * internal-fn.c (lookup_internal_fn): New function.
13031 * gimple.c (gimple_build_call_from_tree): Handle calls to
13032 internal functions.
13033 * gimple-pretty-print.c (dump_gimple_call): Print "." before
13034 internal function names.
13035 * tree-pretty-print.c (dump_generic_node): Likewise.
13036 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
13037
13038 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
13039
13040 * gimple-fold.h (gimple_build): Make the function forms take
13041 combined_fn rather than built_in_function.
13042 (gimple_simplify): Likewise.
13043 * gimple-match-head.c (gimple_simplify): Likewise.
13044 * gimple-fold.c (gimple_build): Likewise.
13045 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
13046 rather than gimple_build_call_internal.
13047 (get_initial_defs_for_reduction): Likewise.
13048 (vect_create_epilog_for_reduction): Likewise.
13049 (vectorizable_live_operation): Likewise.
13050
13051 2018-05-17 Martin Liska <mliska@suse.cz>
13052
13053 * gimple-ssa-sprintf.c (format_directive): Do not use
13054 space in between 'G_' and '('.
13055
13056 2018-05-17 Jakub Jelinek <jakub@redhat.com>
13057
13058 PR target/85323
13059 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
13060 even if the mask is not all ones.
13061
13062 PR target/85323
13063 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
13064 vector.
13065 (ix86_gimple_fold_builtin): Likewise.
13066
13067 PR target/85323
13068 * config/i386/i386.c: Include tree-vector-builder.h.
13069 (ix86_vector_shift_count): New function.
13070 (ix86_fold_builtin): Fold shift builtins by scalar count.
13071 (ix86_gimple_fold_builtin): Likewise.
13072
13073 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
13074 _mm512_setzero): New intrinsics.
13075
13076 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
13077 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13078
13079 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
13080 code generation for cases where splatting a value is not useful.
13081 * simplify-rtx.c (simplify_ternary_operation): Simplify
13082 vec_merge across a vec_duplicate and a paradoxical subreg forming
13083 a vector mode to a vec_concat.
13084
13085 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
13086
13087 * config.gcc: Support "goldmont-plus".
13088 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13089 "goldmont-plus".
13090 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13091 PROCESSOR_GOLDMONT_PLUS.
13092 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
13093 (processor_target_table): Add "goldmont-plus".
13094 (PTA_GOLDMONT_PLUS): Define.
13095 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
13096 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
13097 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
13098 (fold_builtin_cpu): Add "goldmont-plus".
13099 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
13100 (ix86_option_override_internal): Add "goldmont-plus".
13101 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
13102 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
13103 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
13104 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
13105
13106 2018-05-17 Richard Biener <rguenther@suse.de>
13107
13108 PR tree-optimization/85757
13109 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
13110 remove defs that only feed that PHI from further processing.
13111
13112 2018-05-16 Jim Wilson <jimw@sifive.com>
13113
13114 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
13115 asterisk to name.
13116 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
13117
13118 2018-05-16 Mark Wielaard <mark@klomp.org>
13119
13120 * dwarf2out.c (count_index_strings): New function.
13121 (output_indirect_strings): Call count_index_strings and generate
13122 header for dwarf_version >= 5.
13123
13124 2018-05-16 Mark Wielaard <mark@klomp.org>
13125
13126 * dwarf2out.c (dwarf_FORM): New function.
13127 (set_indirect_string): Use dwarf_FORM.
13128 (reset_indirect_string): Likewise.
13129 (size_of_die): Likewise.
13130 (value_format): Likewise.
13131 (output_die): Likewise.
13132 (add_skeleton_AT_string): Likewise.
13133 (output_macinfo_op): Likewise.
13134 (index_string): Likewise.
13135 (output_index_string_offset): Likewise.
13136 (output_index_string): Likewise.
13137 (count_index_strings): Likewise.
13138
13139 2018-05-16 Carl Love <cel@us.ibm.com>
13140
13141 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13142 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
13143
13144 2018-05-16 Martin Jambor <mjambor@suse.cz>
13145
13146 * ipa-prop.c (ipa_free_all_edge_args): Remove.
13147 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
13148
13149 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
13150
13151 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
13152 (fnma<mode>4): Likewise.
13153 (fms<mode>4): Likewise.
13154 (fnms<mode>4): Likewise.
13155 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
13156 (aarch64_fnma<mode>4): Likewise.
13157 (aarch64_fms<mode>4): Likewise.
13158 (aarch64_fnms<mode>4): Likewise.
13159 (aarch64_fnmadd<mode>4): Likewise.
13160
13161 2018-05-16 Jason Merrill <jason@redhat.com>
13162
13163 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
13164
13165 2018-05-16 Richard Biener <rguenther@suse.de>
13166
13167 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
13168 (dump_stmt_cost): Declare.
13169 (add_stmt_cost): Dump cost we add.
13170 (add_stmt_costs): New function.
13171 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
13172 No longer exported.
13173 (vect_analyze_stmt): Adjust prototype.
13174 (vectorizable_condition): Likewise.
13175 (vectorizable_live_operation): Likewise.
13176 (vectorizable_reduction): Likewise.
13177 (vectorizable_induction): Likewise.
13178 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
13179 cost vector to pass to vectorizable_ and record afterwards.
13180 (vect_model_reduction_cost): Take cost vector argument and adjust.
13181 (vect_model_induction_cost): Likewise.
13182 (vectorizable_reduction): Likewise.
13183 (vectorizable_induction): Likewise.
13184 (vectorizable_live_operation): Likewise.
13185 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
13186 SLP_TREE_NUMBER_OF_VEC_STMTS.
13187 (vect_analyze_slp_cost_1): Remove.
13188 (vect_analyze_slp_cost): Likewise.
13189 (vect_slp_analyze_node_operations): Take visited args and
13190 a target cost vector. Avoid processing already visited stmt sets.
13191 (vect_slp_analyze_operations): Use a local cost vector to gather
13192 costs and register those of non-discarded instances.
13193 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
13194 (vect_schedule_slp_instance): Remove copying of
13195 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
13196 zero.
13197 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
13198 adding cost. Record cost entry location.
13199 (vect_prologue_cost_for_slp_op): Function to compute cost of
13200 a constant or invariant generated for SLP vect in the prologue,
13201 split out from vect_analyze_slp_cost_1.
13202 (vect_model_simple_cost): Make static. Adjust for SLP costing.
13203 (vect_model_promotion_demotion_cost): Likewise.
13204 (vect_model_store_cost): Likewise, make static.
13205 (vect_model_load_cost): Likewise.
13206 (vectorizable_bswap): Add cost vector arg and adjust.
13207 (vectorizable_call): Likewise.
13208 (vectorizable_simd_clone_call): Likewise.
13209 (vectorizable_conversion): Likewise.
13210 (vectorizable_assignment): Likewise.
13211 (vectorizable_shift): Likewise.
13212 (vectorizable_operation): Likewise.
13213 (vectorizable_store): Likewise.
13214 (vectorizable_load): Likewise.
13215 (vectorizable_condition): Likewise.
13216 (vectorizable_comparison): Likewise.
13217 (can_vectorize_live_stmts): Likewise.
13218 (vect_analyze_stmt): Likewise.
13219 (vect_transform_stmt): Adjust calls to vectorizable_*.
13220 * tree-vectorizer.c: Include gimple-pretty-print.h.
13221 (dump_stmt_cost): New function.
13222
13223 2018-05-16 Richard Biener <rguenther@suse.de>
13224
13225 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
13226 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
13227 * tree-ssa-dse.c: Include tree-ssa-loop.h.
13228 (check_name): New callback.
13229 (dse_classify_store): Track cycles via a visited bitmap of PHI
13230 defs and simplify handling of in-loop and across loop dead stores
13231 and properly fail for loop-variant refs. Handle byte-tracking with
13232 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
13233 limiting the walk.
13234
13235 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
13236
13237 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
13238 (vect_get_mask_type_for_stmt): Likewise.
13239 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
13240 split out from...
13241 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
13242 to determine the statement's vector type and the vector type that
13243 should be used for calculating nunits. Deal with cases in which
13244 the type has to be deferred.
13245 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
13246 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
13247 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
13248 (vect_determine_vf_for_stmt): New functions, split out from...
13249 (vect_determine_vectorization_factor): ...here.
13250 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
13251 (vect_get_mask_type_for_stmt): New functions, split out from
13252 vect_determine_vectorization_factor.
13253
13254 2018-05-16 Richard Biener <rguenther@suse.de>
13255
13256 * tree-cfg.c (verify_gimple_assign_ternary): Properly
13257 verify the [VEC_]COND_EXPR embedded comparison.
13258
13259 2018-05-15 Martin Sebor <msebor@redhat.com>
13260
13261 PR tree-optimization/85753
13262 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
13263 RECORD_TYPE in addition to ARRAY_TYPE.
13264
13265 2018-05-15 Martin Sebor <msebor@redhat.com>
13266
13267 PR middle-end/85643
13268 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
13269
13270 2018-05-15 Richard Biener <rguenther@suse.de>
13271
13272 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
13273 add by_clobber_p one. Change algorithm to collect all defs
13274 representing uses we need to walk and try reducing them to
13275 a single one before failing.
13276 (dse_dom_walker::dse_optimize_stmt): Adjust.
13277
13278 2018-05-13 Mark Wielaard <mark@klomp.org>
13279
13280 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
13281 (size_of_loc_descr): Likewise.
13282 (output_loc_operands): Likewise.
13283 (output_loc_operands_raw): Likewise.
13284 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
13285 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
13286 (hash_loc_operands): Likewise.
13287 (compare_loc_operands): Likewise.
13288
13289 2018-05-14 Mark Wielaard <mark@klomp.org>
13290
13291 * dwarf2out.c (count_index_addrs): New function.
13292 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
13293
13294 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13295
13296 PR tree-optimization/83648
13297 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
13298 return value as malloc candidate.
13299
13300 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13301
13302 PR ipa/85734
13303 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
13304 param as true in call to suggest_attribute.
13305
13306 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
13307
13308 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
13309 -mreadonly-in-sdata.
13310
13311 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13312
13313 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
13314 New pattern.
13315 (aarch64_crypto_aesd_fused): Likewise.
13316
13317 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
13318
13319 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
13320 (movsi_aarch64): Likewise.
13321 (load_pairsi): Likewise.
13322 (load_pairdi): Likewise.
13323 (store_pairsi): Likewise.
13324 (store_pairdi): Likewise.
13325 (load_pairsf): Likewise.
13326 (load_pairdf): Likewise.
13327 (store_pairsf): Likewise.
13328 (store_pairdf): Likewise.
13329 (zero_extend): Likewise.
13330 (trunc): Swap alternatives.
13331 (fcvt_target): Add '?' to prefer w over r.
13332
13333 2018-05-14 Jakub Jelinek <jakub@redhat.com>
13334
13335 PR target/85756
13336 * config/i386/i386.md: Disallow non-commutative arithmetics in
13337 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
13338 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
13339 in the peephole2 before it.
13340
13341 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
13342
13343 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13344 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13345 (ix86_handle_option): Handle -mcldemote.
13346 * config.gcc: New header.
13347 * config/i386/cldemoteintrin.h: New file.
13348 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13349 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13350 -mcldemote.
13351 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13352 OPTION_MASK_ISA_CLDEMOTE.
13353 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13354 (ix86_valid_target_attribute_inner_p): Ditto.
13355 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13356 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13357 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13358 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13359 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13360 (cldemote): New.
13361 * config/i386/i386.opt: Add -mcldemote.
13362 * config/i386/x86intrin.h: New header.
13363 * doc/invoke.texi: Add -mcldemote.
13364
13365 2018-05-14 Richard Biener <rguenther@suse.de>
13366
13367 * doc/match-and-simplify.texi: Adjust :s documentation.
13368
13369 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
13370
13371 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13372 intended memcpy size.
13373 (REORDER_45): Likewise.
13374
13375 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
13376
13377 * sort.cc: New file.
13378 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13379 * vec.c (qsort_chk): Use gcc_qsort.
13380 * Makefile.in (OBJS-libcommon): Add sort.o.
13381 (build/sort.o): New target. Use it...
13382 (BUILD_RTL): ... here, and...
13383 (build/gencfn-macros): ... here, and...
13384 (build/genmatch): ... here.
13385
13386 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13387 Chung-Ju Wu <jasonwucj@gmail.com>
13388
13389 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13390 * config/nds32/nds32-graywolf.md: New file.
13391 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13392 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13393 pipeline.
13394 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13395 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13396 * config/nds32/nds32.md (pipeline_model): Add graywolf.
13397 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13398 * config/nds32/pipelines.md: Include n15 settings.
13399
13400 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13401 Chung-Ju Wu <jasonwucj@gmail.com>
13402
13403 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13404 * config/nds32/nds32-n13.md: New file.
13405 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13406 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13407 pipeline.
13408 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13409 * config/nds32/nds32.md (pipeline_model): Add n13.
13410 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13411 * config/nds32/pipelines.md: Include n13 settings.
13412
13413 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13414 Chung-Ju Wu <jasonwucj@gmail.com>
13415
13416 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13417 * config/nds32/nds32-n10.md: New file.
13418 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13419 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13420 pipeline.
13421 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13422 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13423 * config/nds32/nds32.md (pipeline_model): Add n10.
13424 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13425 * config/nds32/pipelines.md: Include n10 settings.
13426
13427 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
13428 Kito Cheng <kito.cheng@gmail.com>
13429 Chung-Ju Wu <jasonwucj@gmail.com>
13430
13431 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13432 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13433 Add enum values for DSP extension instructions.
13434 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13435 New constraints.
13436 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13437 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13438 New code iterators.
13439 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13440 * config/nds32/nds32-dspext.md: New file for DSP implementation.
13441 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13442 * config/nds32/nds32-intrinsic.md: Likewise.
13443 * config/nds32/nds32_intrinsic.h: Likewise.
13444 * config/nds32/nds32-md-auxiliary.c: Likewise.
13445 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13446 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13447 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13448 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13449 * config/nds32/nds32-protos.h: New declarations for DSP extension.
13450 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13451 TYPE_DMAC in switch statement.
13452 * config/nds32/nds32.c: New checking and implementation for DSP
13453 extension instructions.
13454 * config/nds32/nds32.h: Likewise.
13455 * config/nds32/nds32.md: Likewise.
13456 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13457 * config/nds32/predicates.md: Implement new predicates for DSP
13458 extension.
13459
13460 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13461
13462 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13463 Reformat alternatives and attributes so it is easier to identify
13464 which constraints/attributes go with which instruction.
13465 (mov<mode>_hardfloat32, FMOVE64): Likewise.
13466 (mov<mode>_softfloat32, FMOVE64): Likewise.
13467 (mov<mode>_hardfloat64, FMOVE64): Likewise.
13468 (mov<mode>_softfloat64, FMOVE64): Likewise.
13469
13470 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
13471
13472 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13473 subsection.
13474 (Basic PowerPC Built-in Functions): The new name of the
13475 subsection previously known as "PowerPC Built-in Functions".
13476 (Basic PowerPC Built-in Functions Available on all Configurations):
13477 New subsubsection.
13478 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13479 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13480 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13481 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13482
13483 2018-05-11 Martin Jambor <mjambor@suse.cz>
13484
13485 PR ipa/85655
13486 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13487 single const.
13488
13489 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13490
13491 PR target/85733
13492 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13493
13494 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
13495
13496 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13497 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13498 (ix86_handle_option): Handle -mwaitpkg.
13499 * config.gcc: New header.
13500 * config/i386/cpuid.h (bit_WAITPKG): New bit.
13501 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13502 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13503 function type.
13504 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13505 OPTION_MASK_ISA_WAITPKG.
13506 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13507 (ix86_option_override_internal): Add PTA_WAITPKG.
13508 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13509 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13510 IX86_BUILTIN_TPAUSE.
13511 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13512 __builtin_ia32_umwait and __builtin_ia32_tpause.
13513 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13514 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13515 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13516 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13517 UNSPECV_TPAUSE): New.
13518 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13519 * config/i386/i386.opt: Add -mwaitpkg.
13520 * config/i386/waitpkgintrin.h: New file.
13521 * config/i386/x86intrin.h: New header.
13522 * doc/invoke.texi: Add -mwaitpkg.
13523
13524 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13525
13526 PR target/85606
13527 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13528 equivalent.
13529 (cortex-m0): Use armv6s-m isa.
13530 (cortex-m0plus): Likewise.
13531 (cortex-m1): Likewise.
13532 (cortex-m0.small-multiply): Likewise.
13533 (cortex-m0plus.small-multiply): Likewise.
13534 (cortex-m1.small-multiply): Likewise.
13535
13536 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
13537 Jakub Jelinek <jakub@redhat.com>
13538
13539 PR tree-optimization/85692
13540 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13541 source permute as well.
13542
13543 2018-05-11 Martin Liska <mliska@suse.cz>
13544
13545 PR sanitizer/85556
13546 * doc/extend.texi: Document LLVM style format for no_sanitize
13547 attribute.
13548
13549 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13550
13551 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13552 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13553 (mode_supports_vsx_dform_quad): Likewise.
13554 (mode_supports_vmx_dform): Move these functions to be next to the
13555 other mode_supports functions.
13556 (mode_supports_dq_form): Likewise.
13557 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13558 mode_supports_dq_form.
13559 (reg_offset_addressing_ok_p): Likewise.
13560 (offsettable_ok_by_alignment): Likewise.
13561 (rs6000_legitimate_offset_address_p): Likewise.
13562 (legitimate_lo_sum_address_p): Likewise.
13563 (rs6000_legitimize_address): Likewise.
13564 (rs6000_legitimize_reload_address): Likewise.
13565 (rs6000_secondary_reload_inner): Likewise.
13566 (rs6000_preferred_reload_class): Likewise.
13567 (rs6000_output_move_128bit): Likewise.
13568
13569 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13570
13571 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13572 Generate SImode target register for null target.
13573 <case IX86_BUILTIN_XGETBV>: Ditto.
13574 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13575 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13576
13577 2018-05-10 Carl Love <cel@us.ibm.com>
13578
13579 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13580 dcbtt and dcbtstt if operands[2] is 0.
13581
13582 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13583
13584 PR target/85693
13585 * config/i386/sse.md (usadv64qi): New expander.
13586
13587 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13588
13589 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13590 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13591 -maltivec=be support.
13592 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13593 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13594 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13595 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13596 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13597 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13598 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13599 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13600 altivec_vsumsws): Adjust.
13601 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13602 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13603 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13604 support.
13605 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13606 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13607 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13608 (altivec_lve<VI_char>x): Delete expand.
13609 (*altivec_lve<VI_char>x_internal): Rename to...
13610 (altivec_lve<VI_char>x): ... this.
13611 (altivec_lvxl_<mode>): Delete expand.
13612 (*altivec_lvxl_<mode>_internal): Rename to ...
13613 (altivec_lvxl_<mode>): ... this.
13614 (altivec_stvxl_<mode>): Delete expand.
13615 (*altivec_stvxl_<mode>_internal): Rename to ...
13616 (altivec_stvxl_<mode>): ... this.
13617 (altivec_stve<VI_char>x): Delete expand.
13618 (*altivec_stve<VI_char>x_internal): Rename to ...
13619 (altivec_stve<VI_char>x): ... this.
13620 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13621 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13622 reduc_plus_scal_<mode>): Adjust.
13623 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13624 comment.
13625 (rs6000_cpu_cpp_builtins): Adjust.
13626 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13627 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13628 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13629 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13630 -maltivec=be support.
13631 (rs6000_split_vec_extract_var): Adjust.
13632 (rs6000_split_v4si_init): Adjust.
13633 (swap_selector_for_mode): Delete.
13634 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13635 altivec_expand_stvex_be): Delete.
13636 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13637 -maltivec=be support.
13638 (rs6000_gimple_fold_builtin): Ditto.
13639 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13640 Adjust.
13641 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13642 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13643 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13644 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13645 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13646 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13647 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13648 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13649 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13650 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13651 anonymous split): Adjust.
13652 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13653 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13654
13655 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13656
13657 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13658 when --with-gxx-include-dir is also specified.
13659 * configure: Regenerate.
13660
13661 2018-05-09 Jim Wilson <jimw@sifive.com>
13662
13663 PR target/84797
13664 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13665 * config/riscv/t-withmultilib: New.
13666 * config/riscv/withmultilib.h: New.
13667 * doc/install.texi: Document RISC-V --with-multilib-list support.
13668
13669 2018-05-09 Richard Biener <rguenther@suse.de>
13670
13671 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13672 vector.
13673 (vect_bb_vectorization_profitable_p): Adjust. Compute
13674 actual scalar cost using the cost vector and the add_stmt_cost
13675 machinery.
13676
13677 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13678
13679 PR rtl-optimization/85645
13680 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13681 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13682
13683 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13684
13685 PR rtl-optimization/85645
13686 * shrink-wrap.c (spread_components): Return a boolean saying if
13687 anything was changed.
13688 (try_shrink_wrapping_separate): Iterate spread_components until
13689 nothing changes anymore.
13690
13691 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13692
13693 PR rtl-optimization/85645
13694 * regrename.c (build_def_use): Also kill the chains that include the
13695 destination of a REG_CFA_REGISTER note.
13696
13697 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13698
13699 PR rtl-optimization/85645
13700 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13701 insn that has a REG_CFA_REGISTER note.
13702
13703 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13704
13705 * cfgexpand.c (expand_clobber): New function.
13706 (expand_gimple_stmt_1): Use it.
13707 * tree-vect-stmts.c (vect_clobber_variable): New function,
13708 split out from...
13709 (vectorizable_simd_clone_call): ...here.
13710 (vectorizable_store): Emit a clobber either side of an
13711 IFN_STORE_LANES sequence.
13712 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13713
13714 2018-05-09 Tom de Vries <tom@codesourcery.com>
13715
13716 PR target/85626
13717 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13718 (define_insn "trap_if_false"): Add exit after trap.
13719
13720 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13721
13722 PR rtl-optimization/85638
13723 * bb-reorder.c: Include common/common-target.h.
13724 (create_forwarder_block): New function extracted from...
13725 (fix_up_crossing_landing_pad): ...here. Rename into...
13726 (dw2_fix_up_crossing_landing_pad): ...this.
13727 (sjlj_fix_up_crossing_landing_pad): New function.
13728 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13729 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13730 from both partitions and exit the loop after one iteration.
13731
13732 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13733
13734 Revert:
13735 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13736 subsection.
13737 (Basic PowerPC Built-in Functions): The new name of the
13738 subsection previously known as "PowerPC Built-in Functions".
13739 (Basic PowerPC Built-in Functions Available on all Configurations):
13740 New subsubsection.
13741 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13742 subsubsection.
13743 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13744 subsubsection.
13745 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13746 subsubsection.
13747 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13748 subsubsection.
13749
13750 2018-05-08 Jim Wilson <jimw@sifive.com>
13751
13752 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13753 (LD_EMUL_SUFFIX): New.
13754 (LINK_SPEC): Use it.
13755
13756 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13757
13758 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13759 subsection.
13760 (Basic PowerPC Built-in Functions): The new name of the
13761 subsection previously known as "PowerPC Built-in Functions".
13762 (Basic PowerPC Built-in Functions Available on all Configurations):
13763 New subsubsection.
13764 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13765 subsubsection.
13766 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13767 subsubsection.
13768 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13769 subsubsection.
13770 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13771 subsubsection.
13772
13773 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13774
13775 PR target/85683
13776 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13777 after cmpelim optimization.
13778
13779 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13780
13781 * config.gcc: Support "goldmont".
13782 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13783 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13784 PROCESSOR_GOLDMONT.
13785 * config/i386/i386.c (m_GOLDMONT): Define.
13786 (processor_target_table): Add "goldmont".
13787 (PTA_GOLDMONT): Define.
13788 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13789 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13790 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13791 (fold_builtin_cpu): Add "goldmont".
13792 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13793 (ix86_option_override_internal): Add "goldmont".
13794 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13795 (processor_type): Add PROCESSOR_GOLDMONT.
13796 * config/i386/i386.md: Add CPU "glm".
13797 * config/i386/glm.md: New file.
13798 * config/i386/x86-tune.def: Add m_GOLDMONT.
13799 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13800
13801 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13802
13803 PR target/85572
13804 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13805 E_V4DImode.
13806 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13807 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13808 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13809
13810 PR target/85317
13811 * config/i386/i386.c (ix86_fold_builtin): Handle
13812 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13813
13814 PR target/85480
13815 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13816 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13817
13818 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13819
13820 PR target/85658
13821 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13822 (check_arch): Likewise.
13823 (check_fpu): Return the result rather than printing it.
13824 (end arch): Fix operator precedence.
13825 (end cpu): Likewise.
13826 (END): Print the result from check_fpu.
13827
13828 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13829 Alan Hayward <alan.hayward@arm.com>
13830 David Sherwood <david.sherwood@arm.com>
13831
13832 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13833 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13834 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13835 (*fcmuo<mode>_and): New patterns.
13836
13837 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13838
13839 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13840 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13841 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13842 (cmp_op, sve_imm_con): New code attributes.
13843 (SVE_COND_INT_CMP, imm_con): Delete.
13844 (cmp_op): Remove above unspecs from int attribute.
13845 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13846 to...
13847 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13848 comparison-specific unspecs.
13849 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13850 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13851 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13852 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13853 (*vec_fcm<cmp_op><mode>): Rename to...
13854 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13855 (*vec_fcmuo<mode>): Rename to...
13856 (*fcmuo<mode>): ...this and adjust likewise.
13857 (*pred_fcm<cmp_op><mode>): New pattern.
13858 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13859 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13860 functions.
13861 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13862 and UNORDERED.
13863 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13864 (aarch64_emit_sve_predicated_cond): New function.
13865 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13866 (aarch64_emit_unspec_cond_or): Replace with...
13867 (aarch64_emit_sve_or_conds): ...this new function. Use
13868 aarch64_emit_sve_ptrue_op for the individual comparisons and
13869 aarch64_emit_binop to OR them together.
13870 (aarch64_emit_inverted_unspec_cond): Replace with...
13871 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13872 aarch64_emit_sve_ptrue_op for the comparison and
13873 aarch64_emit_unop to invert the result.
13874 (aarch64_expand_sve_vec_cmp_float): Update after the above
13875 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13876
13877 2018-05-07 Nathan Sidwell <nathan@acm.org>
13878
13879 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13880 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13881 (Backwards Compatibility): Likewise.
13882
13883 2018-05-07 Luis Machado <luis.machado@linaro.org>
13884
13885 PR bootstrap/85681
13886 Revert:
13887 2018-05-07 Luis Machado <luis.machado@linaro.org>
13888
13889 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13890 <prefetch_dynamic_strides>: New const bool field.
13891 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13892 prefetch_dynamic_strides.
13893 (exynosm1_prefetch_tune): Likewise.
13894 (thunderxt88_prefetch_tune): Likewise.
13895 (thunderx_prefetch_tune): Likewise.
13896 (thunderx2t99_prefetch_tune): Likewise.
13897 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13898 to false.
13899 (aarch64_override_options_internal): Update to set
13900 PARAM_PREFETCH_DYNAMIC_STRIDES.
13901 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13902 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13903 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13904 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13905 prefetch-dynamic-strides setting.
13906
13907 2018-05-07 Luis Machado <luis.machado@linaro.org>
13908
13909 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13910 <minimum_stride>: New const int field.
13911 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13912 minimum_stride field.
13913 (exynosm1_prefetch_tune): Likewise.
13914 (thunderxt88_prefetch_tune): Likewise.
13915 (thunderx_prefetch_tune): Likewise.
13916 (thunderx2t99_prefetch_tune): Likewise.
13917 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13918 (aarch64_override_options_internal): Update to set
13919 PARAM_PREFETCH_MINIMUM_STRIDE.
13920 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13921 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13922 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13923 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13924 stride is constant and is below the minimum stride threshold.
13925
13926 2018-05-07 Luis Machado <luis.machado@linaro.org>
13927
13928 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13929 to 512.
13930
13931 2018-05-07 Luis Machado <luis.machado@linaro.org>
13932
13933 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13934 <prefetch_dynamic_strides>: New const bool field.
13935 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13936 prefetch_dynamic_strides.
13937 (exynosm1_prefetch_tune): Likewise.
13938 (thunderxt88_prefetch_tune): Likewise.
13939 (thunderx_prefetch_tune): Likewise.
13940 (thunderx2t99_prefetch_tune): Likewise.
13941 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13942 to false.
13943 (aarch64_override_options_internal): Update to set
13944 PARAM_PREFETCH_DYNAMIC_STRIDES.
13945 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13946 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13947 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13948 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13949 prefetch-dynamic-strides setting.
13950
13951 2018-05-07 Luis Machado <luis.machado@linaro.org>
13952
13953 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13954 <minimum_stride>: New const int field.
13955 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13956 minimum_stride field.
13957 (exynosm1_prefetch_tune): Likewise.
13958 (thunderxt88_prefetch_tune): Likewise.
13959 (thunderx_prefetch_tune): Likewise.
13960 (thunderx2t99_prefetch_tune): Likewise.
13961 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13962 (aarch64_override_options_internal): Update to set
13963 PARAM_PREFETCH_MINIMUM_STRIDE.
13964 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13965 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13966 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13967 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13968 stride is constant and is below the minimum stride threshold.
13969
13970 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13971
13972 PR c++/85659
13973 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13974 the type is addressable. Don't force op into register if it has
13975 BLKmode.
13976
13977 2018-05-05 Roland McGrath <mcgrathr@google.com>
13978
13979 PR other/77609
13980 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13981 any section for which we don't know a specific type it should have,
13982 regardless of name. Previously this was done only for the exact
13983 names ".init_array", ".fini_array", and ".preinit_array".
13984 (default_elf_asm_named_section): Add comment about
13985 relationship with default_section_type_flags and SECTION_NOTYPE.
13986 (get_section): Don't consider it a type conflict if one side has
13987 SECTION_NOTYPE and the other doesn't, as long as neither has the
13988 SECTION_BSS et al used in the default_section_type_flags logic.
13989
13990 2018-05-05 Tom de Vries <tom@codesourcery.com>
13991
13992 PR target/85653
13993 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13994 (workaround_barsyncs): New function.
13995 (nvptx_reorg): Use workaround_barsyncs.
13996 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13997 (define_expand "nvptx_membar_cta"): New define_expand.
13998 (define_insn "*nvptx_membar_cta"): New insn.
13999
14000 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
14001
14002 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
14003 To improve optimization opportunities.
14004 * builtin-types.def: The new needed builtin types for the above.
14005
14006 2018-05-04 Richard Biener <rguenther@suse.de>
14007
14008 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
14009 * gimple-ssa-store-merging.c
14010 (imm_store_chain_info::output_merged_store): Remove redundant create,
14011 release split_store vector contents on failure.
14012 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
14013 scalar stmt vector on cache hit.
14014
14015 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
14016
14017 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
14018 Xilinx FP support.
14019 * config.gcc (powerpc-xilinx-eabi*): Remove.
14020 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
14021 support.
14022 (fusion_addis_mem_combo_load): Ditto.
14023 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
14024 FP support.
14025 (rs6000_cpu_cpp_builtins): Ditto.
14026 * config/rs6000/rs6000-linux.c
14027 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
14028 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
14029 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
14030 support.
14031 (rs6000_setup_reg_addr_masks): Ditto.
14032 (rs6000_init_hard_regno_mode_ok): Ditto.
14033 (rs6000_option_override_internal): Ditto.
14034 (legitimate_lo_sum_address_p): Ditto.
14035 (rs6000_legitimize_address): Ditto.
14036 (rs6000_legitimize_reload_address): Ditto.
14037 (rs6000_legitimate_address_p): Ditto.
14038 (abi_v4_pass_in_fpr): Ditto.
14039 (setup_incoming_varargs): Ditto.
14040 (rs6000_gimplify_va_arg): Ditto.
14041 (rs6000_split_multireg_move): Ditto.
14042 (rs6000_savres_strategy): Ditto.
14043 (rs6000_emit_prologue_components): Ditto.
14044 (rs6000_emit_epilogue_components): Ditto.
14045 (rs6000_emit_prologue): Ditto.
14046 (rs6000_emit_epilogue): Ditto.
14047 (rs6000_elf_file_end): Ditto.
14048 (rs6000_function_value): Ditto.
14049 (rs6000_libcall_value): Ditto.
14050 * config/rs6000/rs6000.h: Ditto.
14051 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
14052 (TARGET_MINMAX): ... this. New.
14053 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
14054 * config/rs6000/rs6000.md: Remove Xilinx FP support.
14055 (*movsi_internal1_single): Delete.
14056 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
14057 mfpu=, mxilinx-fpu): Delete.
14058 * config/rs6000/singlefp.h: Delete.
14059 * config/rs6000/sysv4.h: Remove Xilinx FP support.
14060 * config/rs6000/t-rs6000: Ditto.
14061 * config/rs6000/t-xilinx: Delete.
14062 * config/rs6000/titan.md: Adjust for fp_type removal.
14063 * config/rs6000/vsx.md: Remove Xilinx FP support.
14064 (VStype_simple): Delete.
14065 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
14066 * config/rs6000/xfpu.h: Delete.
14067 * config/rs6000/xfpu.md: Delete.
14068 * config/rs6000/xilinx.h: Delete.
14069 * config/rs6000/xilinx.opt: Delete.
14070 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
14071 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
14072
14073 2018-05-04 Tom de Vries <tom@codesourcery.com>
14074
14075 PR libgomp/85639
14076 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
14077 if ignore == 0.
14078
14079 2018-05-04 Richard Biener <rguenther@suse.de>
14080
14081 PR middle-end/85627
14082 * tree-complex.c (update_complex_assignment): We are always in SSA form.
14083 (expand_complex_div_wide): Likewise.
14084 (expand_complex_operations_1): Likewise.
14085 (expand_complex_libcall): Preserve EH info of the original stmt.
14086 (tree_lower_complex): Handle removed blocks.
14087 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
14088 on complex multiplication and division libcall builtins.
14089
14090 2018-05-04 Richard Biener <rguenther@suse.de>
14091
14092 PR middle-end/85574
14093 * fold-const.c (negate_expr_p): Restrict negation of operand
14094 zero of a division to when we know that can happen without
14095 overflow.
14096 (fold_negate_expr_1): Likewise.
14097
14098 2018-05-04 Jakub Jelinek <jakub@redhat.com>
14099
14100 PR libstdc++/85466
14101 * real.h (real_nextafter): Declare.
14102 * real.c (real_nextafter): New function.
14103 * fold-const-call.c (fold_const_nextafter): New function.
14104 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
14105 CASE_CFN_NEXTTOWARD.
14106 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
14107 even when arg1_mode is different from arg0_mode.
14108
14109 2018-05-03 Nathan Sidwell <nathan@acm.org>
14110
14111 * doc/extend.texi (Deprecated Features): Remove
14112 -ffriend-injection.
14113 (Backwards Compatibility): Likewise.
14114 * doc/invoke.texi (C++ Language Options): Likewise.
14115 (C++ Dialect Options): Likewise.
14116
14117 2018-05-03 Jakub Jelinek <jakub@redhat.com>
14118
14119 PR target/85530
14120 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
14121 _mm512_mask_mullox_epi64): New intrinsics.
14122
14123 2018-05-03 Tom de Vries <tom@codesourcery.com>
14124
14125 PR testsuite/85106
14126 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14127 dump files): Add offload-tree.
14128
14129 2018-05-03 Richard Biener <rguenther@suse.de>
14130
14131 PR tree-optimization/85615
14132 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
14133 to loops not nested in BBs loop father to avoid creating multi-entry
14134 loops.
14135
14136 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14137
14138 PR tree-optimization/70291
14139 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
14140 arguments. Change return type to tree. Emit libcall as a new
14141 statement rather than replacing existing one when inplace_p is true.
14142 (expand_complex_multiplication_components): New function.
14143 (expand_complex_multiplication): Expand floating-point complex
14144 multiplication using the above.
14145 (expand_complex_division): Rename inner_type parameter to type.
14146 Update expand_complex_libcall call-site.
14147 (expand_complex_operations_1): Update expand_complex_multiplication
14148 and expand_complex_division call-sites.
14149
14150 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14151
14152 PR target/85582
14153 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14154 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14155 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
14156 the highest significant bit of the shift count mask is clear. In
14157 check whether and[sq]i3 is needed verify that all significant bits
14158 of the shift count other than the highest are set.
14159
14160 2018-05-02 Tom de Vries <tom@codesourcery.com>
14161
14162 PR libgomp/82428
14163 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
14164 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
14165 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
14166 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
14167 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
14168 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
14169 __builtin_goacc_parlevel_size.
14170
14171 2018-05-02 Richard Biener <rguenther@suse.de>
14172
14173 PR tree-optimization/85597
14174 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
14175 do not use split vect_get_vec_defs call but call vect_get_slp_defs
14176 directly.
14177
14178 2018-05-02 Tom de Vries <tom@codesourcery.com>
14179
14180 PR testsuite/85106
14181 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14182 dump files): Add ltrans-tree.
14183
14184 2018-05-02 Tom de Vries <tom@codesourcery.com>
14185
14186 PR testsuite/85106
14187 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
14188 dump files): Add wpa-ipa.
14189
14190 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
14191
14192 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
14193 powerpc*-*-linux*paired* target.
14194 * config/rs6000/750cl.h: Delete.
14195 * config/rs6000/paired.h: Delete.
14196 * config/rs6000/paired.md: Delete.
14197 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
14198 float support.
14199 * config/rs6000/rs6000-builtin.def: Remove paired float support.
14200 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
14201 comment. Remove paired float support.
14202 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
14203 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
14204 VECTOR_PAIRED.
14205 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
14206 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
14207 declarations.
14208 * config/rs6000/rs6000.c: Remove paired float support.
14209 (paired_expand_vector_init, paired_expand_vector_move,
14210 paired_emit_vector_compare, paired_emit_vector_cond_expr,
14211 (paired_expand_lv_builtin, paired_expand_stv_builtin,
14212 paired_expand_builtin, paired_expand_predicate_builtin,
14213 paired_init_builtins): Delete.
14214 * config/rs6000/rs6000.h: Remove paired float support.
14215 * config/rs6000/rs6000.md: Remove paired float support.
14216 (move_from_CR_ov_bit): Delete.
14217 * config/rs6000/rs6000.opt (mpaired): Delete.
14218 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
14219 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
14220
14221 2018-05-02 Richard Biener <rguenther@suse.de>
14222
14223 PR middle-end/85567
14224 * gimplify.c (gimplify_save_expr): When in SSA form allow
14225 SAVE_EXPRs to compute to SSA vars.
14226
14227 2018-05-02 Jakub Jelinek <jakub@redhat.com>
14228
14229 PR target/85582
14230 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
14231 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
14232 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
14233 clobber operands[2], instead use a new pseudo. Formatting fixes.
14234
14235 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
14236
14237 PR tree-optimization/85586
14238 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
14239 exit early for statements in the same group if the accesses are
14240 not strided.
14241
14242 2018-05-02 Tom de Vries <tom@codesourcery.com>
14243
14244 PR lto/85451
14245 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
14246 error message.
14247
14248 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
14249
14250 PR tree-optimization/85143
14251 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
14252
14253 2018-05-01 Tom de Vries <tom@codesourcery.com>
14254
14255 PR lto/85451
14256 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
14257 not found" error message.
14258
14259 2018-05-01 Tom de Vries <tom@codesourcery.com>
14260
14261 PR other/83786
14262 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
14263 * vec.c (test_ordered_remove_if): New function.
14264 (vec_c_tests): Call test_ordered_remove_if.
14265 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
14266 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
14267 * tree-vect-patterns.c (vect_pattern_recog_1): Use
14268 VEC_ORDERED_REMOVE_IF.
14269
14270 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14271
14272 PR tree-optimization/82665
14273 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
14274 pointer subtraction where arguments come from a memchr call.
14275
14276 2018-05-01 Jakub Jelinek <jakub@redhat.com>
14277
14278 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
14279 --push-state --as-needed and --pop-state instead of --as-needed and
14280 --no-as-needed if ld supports it.
14281 * configure: Regenerated.
14282
14283 PR web/85578
14284 * doc/install.texi2html: Replace _002d with - and _002a with * in
14285 generated html files using sed.
14286
14287 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14288
14289 PR c++/85523
14290 * gcc-rich-location.c (blank_line_before_p): New function.
14291 (use_new_line): New function.
14292 (gcc_rich_location::add_fixit_insert_formatted): New function.
14293 * gcc-rich-location.h
14294 (gcc_rich_location::add_fixit_insert_formatted): New function.
14295
14296 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14297
14298 * selftest.c (assert_streq): Rename "expected" and "actual" to
14299 "val1" and "val2". Extend NULL-handling to cover both inputs
14300 symmetrically, while still requiring both to be non-NULL for a pass.
14301 * selftest.h (assert_streq): Rename "expected" and "actual" to
14302 "val1" and "val2".
14303 (ASSERT_EQ): Likewise.
14304 (ASSERT_EQ_AT): Likewise.
14305 (ASSERT_KNOWN_EQ): Likewise.
14306 (ASSERT_KNOWN_EQ_AT): Likewise.
14307 (ASSERT_NE): Likewise.
14308 (ASSERT_MAYBE_NE): Likewise.
14309 (ASSERT_MAYBE_NE_AT): Likewise.
14310 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
14311 the assertion to pass.
14312 (ASSERT_STREQ_AT): Likewise.
14313
14314 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14315
14316 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
14317 interaction with -pie.
14318
14319 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14320
14321 * selftest.h: Fix alphabetization of per-source-file selftest
14322 declarations.
14323
14324 2018-04-30 Jason Merrill <jason@redhat.com>
14325
14326 PR c++/61982 - dead stores to destroyed objects.
14327 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
14328 of clobber.
14329
14330 2018-04-30 Jason Merrill <jason@redhat.com>
14331
14332 * tree.c (build_clobber): New.
14333 * tree.h: Declare it.
14334 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
14335
14336 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14337
14338 * diagnostic-show-locus.c (layout::layout): Update for
14339 location_get_source_line returning a char_span.
14340 (struct char_span): Move to input.h.
14341 (struct correction): Update for fields in char_span becoming
14342 private.
14343 (struct source_line): Update for location_get_source_line
14344 returning a char_span.
14345 (layout::print_line): Likewise.
14346 * edit-context.c (edited_file::print_content): Likewise.
14347 (edited_file::print_diff_hunk): Likewise.
14348 (edited_file::print_run_of_changed_lines): Likewise.
14349 (edited_file::get_num_lines): Likewise.
14350 (edited_line::edited_line): Likewise.
14351 * final.c (asm_show_source): Likewise.
14352 * input.c (location_get_source_line): Convert return type
14353 from const char * to char_span, losing the final "line_len"
14354 param.
14355 (dump_location_info): Update for the above.
14356 (get_substring_ranges_for_loc): Likewise. Use a char_span
14357 when handling the literal within the line.
14358 (test_reading_source_line): Update for location_get_source_line
14359 returning a char_span.
14360 * input.h (class char_span): Move here from
14361 diagnostic-show-locus.c, converting from a struct to a class.
14362 Make data members private.
14363 (char_span::operator bool): New.
14364 (char_span::length): New.
14365 (char_span::get_buffer): New.
14366 (char_span::operator[]): New.
14367 (char_span::subspan): Make const.
14368 (char_span::xstrdup): New.
14369 (location_get_source_line): Convert return type from const char *
14370 to char_span, losing the final "line_size" param.
14371
14372 2018-04-30 Jan Hubicka <jh@suse.cz>
14373
14374 * lto-wrapper.c (ltrans_priorities): New static var.
14375 (cmp_priority): New.
14376 (run_gcc): Read priorities and if doing parallel build order
14377 the Makefile by them.
14378
14379 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14380
14381 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14382
14383 2018-04-30 Richard Biener <rguenther@suse.de>
14384
14385 * tree-cfg.c (verify_address): Remove base argument, add
14386 flag whether to check TREE_ADDRESSABLE and do that.
14387 (verify_expr): Remove.
14388 (verify_types_in_gimple_reference): Add pieces from verify_expr.
14389 (verify_gimple_assign_single): Likewise.
14390 (verify_gimple_switch): Likewise.
14391 (verify_expr_location_1): Dereference tp once. Add (disabled)
14392 piece from verify_expr.
14393 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14394
14395 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14396
14397 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14398
14399 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14400
14401 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14402 (small_data_pattern): Likewise.
14403 (arc_rewrite_small_data): Likewise.
14404 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14405 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14406 (get_symbol_alignment): New function.
14407 (legitimate_small_data_address_p): Likewise.
14408 (legitimate_scaled_address): Update, call
14409 legitimate_small_data_address_p.
14410 (output_sdata): New static variable.
14411 (arc_print_operand): Update how we handle small data operands.
14412 (arc_print_operand_address): Likewise.
14413 (arc_legitimate_address_p): Update, use
14414 legitimate_small_data_address_p.
14415 (arc_rewrite_small_data_p): Remove.
14416 (arc_rewrite_small_data_1): Likewise.
14417 (arc_rewrite_small_data): Likewise.
14418 (small_data_pattern): Likewise.
14419 (compact_sda_memory_operand): Update to use
14420 legitimate_small_data_address_p and get_symbol_alignment.
14421 (prepare_move_operands): Don't rewite sdata pattern.
14422 (prepare_extend_operands): Remove.
14423 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14424 pattern.
14425 (zero_extendqisi2): Likewise.
14426 (zero_extendhisi2): Likewise.
14427 (extendqihi2): Likewise.
14428 (extendqisi2): Likewise.
14429 (extendhisi2): Likewise.
14430 (addsi3): Likewise.
14431 (subsi3): Likewise.
14432 (andsi3): Likewise.
14433 * config/arc/constraints.md (Usd): Change it to memory constraint.
14434
14435 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14436
14437 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14438 as source of std instructions.
14439 * config/arc/arc.md (movsi_insn): Update pattern predicate to
14440 allow 6-bit constants as source for store instructions.
14441 (movdi_insn): Update instruction pattern to allow 6-bit constants
14442 as source for store instructions.
14443
14444 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14445
14446 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14447
14448 2018-04-30 Nathan Sidwell <nathan@acm.org>
14449 Sandra Loosemore <sandra@codesourcery.com>
14450
14451 * dumpfile.c (dump_open): Allow '-' for stdout.
14452 * doc/invoke.texi (Developer Options): Document dump filename
14453 determination early. Document stdin/stdout selection.
14454
14455 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
14456
14457 Microblaze Target: PIC data text relative
14458
14459 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14460 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14461 Add declaration.
14462 * config/microblaze/microblaze.h (microblaze_constant_address_p):
14463 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14464 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14465 New addressing mode for data-text relative position indepenedent code.
14466 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14467 'ADDRESS_SYMBOLIC_TXT_REL'.
14468 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14469 (microblaze_legitimate_pic_operand): Exclude function calls from
14470 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14471 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14472 addresses cases.
14473 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14474 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14475 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14476 for 'address + offset'.
14477 (microblaze_expand_prologue): Add new function prologue call for
14478 'r20' assignation.
14479 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14480 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14481 table in case of TARGET_PIC_DATA_TEXT_REL.
14482 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14483 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14484 Add new macros 'UNSPEC_TEXT',
14485 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14486 + exclude function calls from 'UNSPEC_PLT' in case of data text
14487 relative mode.
14488 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14489 new target hook for generating address diff vector tables in case of
14490 flag_pic.
14491 * doc/tm.texi : Regenerate.
14492 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14493 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14494 of addr diff vector generation.
14495 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14496 target hook definition.
14497 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14498 Add default function for generate_pic_addr_diff_vec -> flag_pic.
14499 * doc/invoke.texi (Add new pic option): Add new microblaze pic
14500 option for data text relative.
14501
14502 2018-04-30 Richard Biener <rguenther@suse.de>
14503
14504 * tree-chrec.h (evolution_function_is_constant_p): Remove
14505 redundant check.
14506 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14507
14508 2018-04-30 Richard Biener <rguenther@suse.de>
14509
14510 PR bootstrap/85571
14511 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14512
14513 2018-04-30 Richard Biener <rguenther@suse.de>
14514
14515 PR tree-optimization/28364
14516 PR tree-optimization/85275
14517 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14518 copying first exit test.
14519
14520 2018-04-28 Mark Wielaard <mark@klomp.org>
14521
14522 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14523 dwarf_version >= 5.
14524 (dwarf_AT): Handle DW_AT_addr_base.
14525 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14526
14527 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
14528
14529 PR target/84431
14530 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14531 (*ashl<dwi>3_doubleword_mask_1): Ditto.
14532 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14533 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14534
14535 2018-04-28 Richard Biener <rguenther@suse.de>
14536
14537 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14538 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14539 to reflect use. Only add interesting stmts.
14540
14541 2018-04-27 Martin Jambor <mjambor@suse.cz>
14542
14543 PR ipa/85549
14544 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14545 the jump function allows for passing through aggregate values.
14546
14547 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14548
14549 * input.h (in_system_header_at): Convert from macro to inline
14550 function.
14551 (from_macro_expansion_at): Likewise.
14552 (from_macro_definition_at): Likewise.
14553
14554 2018-04-27 Jeff Law <law@redhat.com>
14555
14556 * config.gcc: Mark tile* targets as deprecated/obsolete.
14557
14558 2018-04-27 Richard Biener <rguenther@suse.de>
14559
14560 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14561 fix for ILP32.
14562
14563 2018-04-27 Richard Biener <rguenther@suse.de>
14564
14565 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14566
14567 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14568
14569 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14570 with Yd constraint. Set "preferred_for_speed" attribute from
14571 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14572 with Yd constraint.
14573 (*movdi_internal): Ditto.
14574 (movti_interunit splitters): Remove
14575 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14576 (movdi_interunit splitters): Ditto.
14577 * config/i386/constraints.md (Ye): Remove.
14578 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14579
14580 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14581
14582 PR target/85512
14583 * config/aarch64/constraints.md (Usg): Limit to 31.
14584 (Usj): Limit to 63.
14585
14586 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14587
14588 PR tree-optimization/85529
14589 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14590 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14591 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14592 zero extension or masking of the MSB bit.
14593 (optimize_range_tests): Add FIRST_BB argument, pass it through
14594 to optimize_range_tests_var_bound.
14595 (maybe_optimize_range_tests, reassociate_bb): Adjust
14596 optimize_range_tests callers.
14597
14598 2018-04-26 Richard Biener <rguenther@suse.de>
14599 Jakub Jelinek <jakub@redhat.com>
14600
14601 * cgraph.h (symbol_table): Just declare debug method here.
14602 * symtab.c (symbol_table::debug): Define.
14603
14604 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14605
14606 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14607
14608 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14609
14610 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14611 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14612 (*movdi_internal): Substitute Yi and Yj constraint with x
14613 and Ym and Yn constraint with y constraint. Update "isa"
14614 attribute and set "preferred_for_speed" attribute from
14615 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14616 (*movsi_internal): Ditto.
14617 (*movdf_internal): Ditto.
14618 (*movsf_internal): Ditto.
14619 (*zero_extendsidi2): Ditto.
14620 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14621 (sse2_loadld): Ditto.
14622 (*vec_extract<ssevecmodelower>_0): Ditto.
14623 (*vec_extractv4si_0_zext_sse4): Ditto.
14624 (vec_concatv2di): Ditto.
14625 (*vec_dup<mode>): Ditto.
14626 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14627 * config/i386/constraints.md (Yi): Remove.
14628 (Yj): Remove.
14629 (Ym): Remove.
14630 (Yn): Remove.
14631
14632 2018-04-26 Nathan Sidwell <nathan@acm.org>
14633
14634 * dumpfile.c (dump_open): New.
14635 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14636 (dump_finish): Detect stdio/stderr by value not name.
14637
14638 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14639
14640 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14641
14642 2018-04-26 Tom de Vries <tom@codesourcery.com>
14643
14644 PR target/84952
14645 * config/nvptx/nvptx.c (verify_neutering_jumps)
14646 (verify_neutering_labels): New function
14647 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14648
14649 2018-04-26 Tom de Vries <tom@codesourcery.com>
14650
14651 PR target/84025
14652 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14653 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14654 need neutering.
14655
14656 2018-04-26 Richard Biener <rguenther@suse.de>
14657 Tom de Vries <tom@codesourcery.com>
14658
14659 PR lto/85422
14660 * lto-streamer-out.c (output_function): Fixup loops if required to match
14661 discovery done in the reader.
14662
14663 2018-04-26 Richard Biener <rguenther@suse.de>
14664
14665 PR tree-optimization/85116
14666 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14667 have a loop exit from the single latch predecessor. Remove
14668 case of header with just condition.
14669 (ch_base::copy_headers): Exclude infinite loops from any
14670 processing.
14671 (pass_ch::execute): Record exits.
14672
14673 2018-04-26 Richard Biener <rguenther@suse.de>
14674
14675 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14676 prologue cost vector and pass it to vect_get_load_cost.
14677 (vect_get_peeling_costs_all_drs): Likewise.
14678 (vect_peeling_hash_get_lowest_cost): Likewise.
14679 (vect_enhance_data_refs_alignment): Likewise.
14680
14681 2018-04-26 Richard Biener <rguenther@suse.de>
14682
14683 PR middle-end/85450
14684 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14685 checking of integer<->pointer conversions.
14686 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14687 sign-/zero-extending pointer types.
14688 (expand_omp_for_static_chunk): Likewise.
14689
14690 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14691 Jean Lee <xiaoyur347@gmail.com>
14692
14693 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14694 (TARGET_ASAN_SHADOW_OFFSET): Define.
14695 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14696 true for -fsanitize=address.
14697
14698 2018-04-25 Mark Wielaard <mark@klomp.org>
14699
14700 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14701 shorter ones.
14702
14703 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14704
14705 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14706 than "alu", remove explicit "memory" and "imm_disp" attributes.
14707 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14708
14709 PR middle-end/85414
14710 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14711 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14712 gen_lowpart_no_emit.
14713
14714 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14715
14716 PR target/85473
14717 * config/i386/i386.c (ix86_expand_builtin): Change memory
14718 operand to XI, extend p0 to Pmode.
14719 * config/i386/i386.md: Change unspec volatile and operand
14720 1 mode to XI, change operand 0 mode to P.
14721
14722 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14723
14724 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14725 GET_MODE_MASK before any checking.
14726 (nds32_can_use_bset_p): Likewise.
14727 (nds32_can_use_btgl_p): Likewise.
14728
14729 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14730
14731 * config/nds32/nds32-doubleword.md: New define_split pattern for
14732 illegal register number.
14733
14734 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14735
14736 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14737
14738 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14739
14740 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14741
14742 2018-04-25 Richard Biener <rguenther@suse.de>
14743
14744 * lto-streamer.h (LTO_major_version): Bump to 8.
14745
14746 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14747
14748 * BASE-VER: Set to 9.0.0.
14749
14750 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14751
14752 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14753 in __abskf2 and __powikf2.
14754
14755 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14756
14757 PR target/85512
14758 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14759 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14760 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14761 Use the above on operand 2. Reindent.
14762 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14763
14764 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14765
14766 PR target/85485
14767 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14768 handle OPT_mcet.
14769 * config/i386/i386.opt (mcet): Removed.
14770 * doc/install.texi: Remove -mcet documentation.
14771 * doc/invoke.texi: Likewise.
14772
14773 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14774
14775 PR target/85485
14776 * doc/install.texi: Remove -mcet from bootstrap-cet.
14777
14778 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14779
14780 PR target/85511
14781 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14782 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14783 if TARGET_64BIT.
14784
14785 PR target/85503
14786 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14787 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14788 containing a CONST_VECTOR.
14789
14790 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14791
14792 * doc/install.texi: Update newlib dependency for nvptx.
14793
14794 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14795
14796 PR target/85508
14797 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14798 instead of INTVAL when shifting x left.
14799
14800 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14801
14802 PR tree-optimization/85478
14803 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14804 vect_grouped_store_supported for single element vectors.
14805
14806 2018-04-24 Richard Biener <rguenther@suse.de>
14807
14808 PR target/85491
14809 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14810 load cost increase to the case of non-constant step.
14811
14812 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14813
14814 PR target/84828
14815 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14816 destination if any_malformed_asm.
14817
14818 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14819
14820 PR middle-end/85496
14821 * expr.c (store_field): In the bitfield case, if the value comes from
14822 a function call and is returned in registers by means of a PARALLEL,
14823 do not change the mode of the temporary unless BLKmode and VOIDmode.
14824
14825 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14826
14827 PR rtl-optimization/85423
14828 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14829 dependencies to debug insns when the previous insn is non-debug.
14830
14831 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14832
14833 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14834 enums into a single definition.
14835 (fls): Fix predicates and printing.
14836 (seti): Likewise.
14837
14838 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14839
14840 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14841 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14842 and short u6 immediate.
14843 (check_if_valid_sleep_operand): Remove.
14844 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14845
14846 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14847
14848 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14849 flag_always_save_lp condition.
14850 * config/nds32/nds32.opt (malways-save-lp): New option.
14851
14852 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14853
14854 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14855 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14856 * config/nds32/nds32.h
14857 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14858 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14859
14860 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14861
14862 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14863 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14864
14865 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14866 Chung-Ju Wu <jasonwucj@gmail.com>
14867
14868 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14869 Declare.
14870 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14871 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14872
14873 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14874
14875 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14876
14877 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14878
14879 * config/nds32/nds32-protos.h (nds32_data_alignment,
14880 nds32_local_alignment): Declare.
14881 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14882 nds32_local_alignment): New functions.
14883 (TARGET_CONSTANT_ALIGNMENT): Define.
14884 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14885
14886 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14887
14888 * config/nds32/nds32.c
14889 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14890 (TARGET_MODES_TIEABLE_P): Likewise.
14891
14892 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14893
14894 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14895 level Ofast and Og.
14896
14897 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14898 Chung-Ju Wu <jasonwucj@gmail.com>
14899
14900 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14901 for unaligned access.
14902 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14903 unaligned access.
14904 * config/nds32/nds32-intrinsic.md: Likewise.
14905 * config/nds32/nds32_intrinsic.h: Likewise.
14906 * config/nds32/nds32.h (nds32_builtins): Likewise.
14907 * config/nds32/nds32.opt (munaligned-access): New option.
14908 * config/nds32/nds32.c (nds32_asm_file_start): Display
14909 flag_unaligned_access status.
14910
14911 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14912
14913 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14914 -mno-relax is present.
14915 * config/riscv/linux.h (LINK_SPEC): Ditto.
14916
14917 2018-04-20 Martin Sebor <msebor@redhat.com>
14918
14919 PR c/85365
14920 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14921 for null pointers.
14922 (gimple_fold_builtin_stxcpy_chk): Same.
14923 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14924
14925 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14926
14927 PR target/85456
14928 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14929 __powikf2 when long double is IEEE 128-bit.
14930
14931 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14932
14933 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14934 step to make sure stack always aligned.
14935
14936 2018-04-20 Carl Love <cel@us.ibm.com>
14937
14938 PR target/83402
14939 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14940 size check for arg0.
14941
14942 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14943 Tom de Vries <tom@codesourcery.com>
14944
14945 PR target/85445
14946 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14947 Emit insns for calls too.
14948 (nvptx_find_par): Always look for worker-level predecessor insn.
14949 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14950 calls.
14951 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14952 (nvptx_process_pars): Propagate frames for calls.
14953
14954 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14955
14956 PR target/85469
14957 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14958 Removed.
14959 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14960 (ix86_handle_option): Don't handle OPT_mibt.
14961 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14962 __SHSTK__.
14963 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14964 has_ibt and ibt.
14965 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14966 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14967 (ix86_target_macros): Define __CET__ with flag_cf_protection
14968 for -fcf-protection.
14969 * config/i386/i386.c (isa2_opts): Remove -mibt.
14970 * config/i386/i386.h (TARGET_IBT): Removed.
14971 (TARGET_IBT_P): Likewise.
14972 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14973 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14974 * config/i386/i386.opt (mcet): Update help message.
14975 (mshstk): Likewise.
14976 (mibt): Removed.
14977 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14978 -mcet as an alias for -mshstk.
14979
14980 2018-04-20 Richard Biener <rguenther@suse.de>
14981
14982 PR middle-end/85475
14983 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14984 complexity by forcing a single use of the multiply operand.
14985
14986 2018-04-20 Martin Jambor <mjambor@suse.cz>
14987
14988 ipa/85449
14989 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14990 recursion dependency to only apply to non-clones.
14991
14992 2018-04-20 Martin Jambor <mjambor@suse.cz>
14993
14994 ipa/85447
14995 * ipa-cp.c (create_specialized_node): Check that clones of
14996 self-recursive edges exist during IPA-CP.
14997
14998 2018-04-19 Toon Moene <toon@moene.org>
14999
15000 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
15001 by -O3.
15002
15003 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15004
15005 PR tree-optimization/85467
15006 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
15007 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
15008 VECTOR_CST element to type.
15009
15010 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15011
15012 PR target/85397
15013 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
15014 * config/i386/i386.md (builtin_setjmp_setup): Removed.
15015 (builtin_longjmp): Likewise.
15016 (save_stack_nonlocal): New pattern.
15017 (restore_stack_nonlocal): Likewise.
15018
15019 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15020
15021 PR target/85404
15022 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15023 Replace ASM_OUTPUT_LABEL with fprintf.
15024
15025 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
15026
15027 PR target/85417
15028 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
15029 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
15030 * config/i386/i386-c.c (ix86_target_macros_internal): Also
15031 define __IBT__ and __SHSTK__ for -fcf-protection.
15032 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
15033 TARGET_IBT.
15034 (ix86_trampoline_init): Likewise.
15035 (x86_output_mi_thunk): Likewise.
15036 (ix86_notrack_prefixed_insn_p): Likewise.
15037 (ix86_option_override_internal): Don't disallow -fcf-protection.
15038 * config/i386/i386.md (rdssp<mode>): Also enable for
15039 -fcf-protection.
15040 (incssp<mode>): Likewise.
15041 (nop_endbr): Likewise.
15042 * config/i386/i386.opt (mcet): Change help message to built-in
15043 functions only.
15044 (mibt): Likewise.
15045 (mshstk): Likewise.
15046 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
15047 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
15048 enable CET built-in functions.
15049
15050 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
15051
15052 * common/config/i386/i386-common.c
15053 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
15054 OPTION_MASK_ISA_MOVDIRI_UNSET,
15055 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
15056 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
15057 * config.gcc (movdirintrin.h): New header.
15058 * config/i386/cpuid.h (bit_MOVDIRI,
15059 bit_MOVDIR64B): New bits.
15060 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
15061 and -mmvodir64b.
15062 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
15063 (VOID, PVOID, PCVOID)): New function types.
15064 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
15065 __builtin_ia32_directstoreu_u64,
15066 __builtin_ia32_movdir64b): New builtins.
15067 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
15068 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
15069 and -mmovdiri.
15070 (ix86_valid_target_attribute_inner_p): Ditto.
15071 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
15072 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
15073 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
15074 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
15075 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
15076 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
15077 (movdiri<mode>, movdir64b_<mode>): New.
15078 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
15079 * config/i386/immintrin.h: Include movdirintrin.h.
15080 * config/i386/movdirintrin.h: New file.
15081 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
15082
15083 2018-04-19 Richard Biener <rguenther@suse.de>
15084
15085 PR middle-end/85455
15086 * cfg.c (clear_bb_flags): When loop state says we have
15087 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
15088
15089 2018-04-19 Richard Biener <rguenther@suse.de>
15090
15091 PR tree-optimization/84737
15092 * tree-vect-data-refs.c (vect_copy_ref_info): New function
15093 copying restrict info.
15094 (vect_setup_realignment): Use it.
15095 * tree-vectorizer.h (vect_copy_ref_info): Declare.
15096 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
15097 the first DR to all generated stores.
15098 (vectorizable_load): Likewise for loads.
15099
15100 2018-04-19 Jakub Jelinek <jakub@redhat.com>
15101
15102 PR tree-optimization/85446
15103 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
15104 the integral and pointer types to have the same precision.
15105
15106 * doc/install.texi: Document --disable-cet being the default and
15107 --enable-cet=auto.
15108
15109 2018-04-18 Martin Liska <mliska@suse.cz>
15110
15111 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
15112 style.
15113
15114 2018-04-18 Martin Liska <mliska@suse.cz>
15115
15116 Revert
15117 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15118
15119 PR ipa/83983
15120 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15121 arguments if they are comparable.
15122
15123 2018-04-18 Martin Liska <mliska@suse.cz>
15124
15125 Revert
15126 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15127
15128 PR lto/84805
15129 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15130 incomplete types.
15131
15132 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
15133
15134 PR target/85388
15135 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
15136 ENDBR after calling __morestack.
15137
15138 2018-04-18 David Malcolm <dmalcolm@redhat.com>
15139
15140 PR jit/85384
15141 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
15142 by using gcc_base_ver to generate a gcc_driver_version, and use
15143 it when generating GCC_DRIVER_NAME.
15144 * configure: Regenerate.
15145
15146 2018-04-18 Jakub Jelinek <jakub@redhat.com>
15147
15148 PR target/81084
15149 * config.gcc: Obsolete powerpc*-*-*spe*.
15150
15151 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15152
15153 PR debug/84637
15154 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
15155 (stabstr_D): Change type of unum from unsigned int to
15156 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
15157 type.
15158
15159 2018-04-17 Jim Wilson <jimw@sifive.com>
15160
15161 PR 84856
15162 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
15163 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
15164 Set arg_pointer_offset after using pretend_args_size.
15165
15166 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15167
15168 PR rtl-optimization/85431
15169 * dse.c (record_store): Ignore zero width stores.
15170
15171 PR sanitizer/85230
15172 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
15173 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
15174 __builtin_stack_restore rather than after it.
15175 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
15176 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
15177 argument instead of virtual_dynamic_stack_rtx.
15178
15179 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
15180
15181 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
15182 New prototype.
15183 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15184 Add note to error message to explain internal mapping of overloaded
15185 built-in function name to non-overloaded built-in function name.
15186 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
15187 function.
15188
15189 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15190
15191 PR target/85424
15192 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
15193 where the inputs overlap with the output.
15194
15195 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15196
15197 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
15198 (=v, v) alternative and explicit "memory" attribute.
15199 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
15200 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15201 attributes.
15202 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
15203 "sselog1" type instead of "sselog".
15204 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
15205 "sselog". Remove explicit "memory" attribute.
15206 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
15207 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15208 attributes.
15209 (vec_extract_hi_v32hi): Merge all alternatives into one, use
15210 "sselog1" type instead of "sselog". Remove explicit "memory"
15211 attribute.
15212 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
15213 use "sselog1" type instead of "sselog". Remove explicit "memory"
15214 attribute.
15215 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
15216 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
15217 attributes.
15218 (vec_extract_hi_v64qi): Merge all alternatives into one, use
15219 "sselog1" type instead of "sselog". Remove explicit "memory"
15220 attribute.
15221 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
15222 use "sselog1" type instead of "sselog". Remove explicit "memory"
15223 attribute.
15224
15225 PR target/85430
15226 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
15227
15228 PR middle-end/85414
15229 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
15230 on a SUBREG.
15231
15232 2018-04-17 Martin Jambor <mjambor@suse.cz>
15233
15234 PR ipa/85421
15235 * ipa-cp.c (create_specialized_node): Call
15236 expand_all_artificial_thunks if necessary.
15237
15238 2018-04-17 Martin Liska <mliska@suse.cz>
15239
15240 PR lto/85405
15241 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
15242 in message, remote space in between '_G' and '('.
15243
15244 2018-04-17 Jakub Jelinek <jakub@redhat.com>
15245
15246 PR target/85281
15247 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
15248 avx512f_vmcmp<mode>3<round_saeonly_name>,
15249 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
15250 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
15251 avx512f_rndscale<mode><round_saeonly_name>,
15252 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
15253 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
15254 Use %<iptr>2 instead of %2 for -masm=intel.
15255 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
15256 avx512f_vcvttss2usi<round_saeonly_name>,
15257 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
15258 -masm=intel.
15259 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
15260 avx512f_vcvttsd2usi<round_saeonly_name>,
15261 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
15262 Use %q1 instead of %1 for -masm=intel.
15263 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
15264 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
15265 of %3 for -masm=intel.
15266 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
15267 -masm=intel.
15268 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
15269 -masm=intel.
15270 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
15271 -masm=intel.
15272 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
15273 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
15274 %g1.
15275 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
15276 -masm=intel.
15277 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
15278 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
15279 %g1 and one with %0 and %1.
15280 (avx512er_vmrcp28<mode><round_saeonly_name>,
15281 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
15282 %1 for -masm=intel.
15283 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
15284 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
15285 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
15286 of %0 and %{%4%} for -masm=intel.
15287 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
15288 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
15289 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
15290 order of %0 and %{%5%}%{z%} for -masm=intel.
15291
15292 2018-04-17 Jan Hubicka <jh@suse.cz>
15293
15294 PR lto/85405
15295 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
15296
15297 2018-04-17 Martin Liska <mliska@suse.cz>
15298
15299 PR ipa/85329
15300 * multiple_target.c (create_dispatcher_calls): Set apostrophes
15301 for target_clone error message. Make default implementation
15302 clone to be a local declaration.
15303 (separate_attrs): Add new argument and check for an empty
15304 string.
15305 (expand_target_clones): Handle it.
15306 (ipa_target_clone): Make redirection just for target_clones
15307 functions.
15308
15309 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
15310 Tom de Vries <tom@codesourcery.com>
15311
15312 PR middle-end/84955
15313 * omp-expand.c (expand_oacc_for): Add dummy false branch for
15314 tiled basic blocks without omp continue statements.
15315
15316 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
15317
15318 PR target/83660
15319 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
15320 vec_extract expression as having side effects to make sure it gets
15321 a cleanup point.
15322
15323 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
15324
15325 PR target/85403
15326 * config/i386/i386.c (get_builtin_code_for_version): Check
15327 error_mark_node.
15328
15329 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
15330
15331 PR target/84331
15332 * config.gcc: Support "skylake".
15333 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15334 PROCESSOR_SKYLAKE.
15335 * config/i386/i386.c (m_SKYLAKE): Define.
15336 (processor_target_table): Add "skylake".
15337 (ix86_option_override_internal): Add "skylake".
15338 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
15339 PROCESSOR_CANNONLAKE.
15340 (get_builtin_code_for_version): Fix priority for
15341 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15342 PROCESSOR_SKYLAKE-AVX512.
15343 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15344 (processor_type): Add PROCESSOR_SKYLAKE.
15345
15346 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
15347 Jason Merrill <jason@redhat.com>
15348
15349 PR c++/85112
15350 * convert.c (convert_to_integer_1): Use direct recursion for
15351 enumeral types and types with a precision less than the number
15352 of bits in their mode.
15353
15354 2018-04-16 Julia Koval <julia.koval@intel.com>
15355
15356 PR target/84413
15357 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15358 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15359
15360 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
15361
15362 PR target/85293
15363 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15364 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15365 and -mno-direct-move.
15366
15367 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
15368
15369 PR target/83402
15370 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15371 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15372 Ensure negative shifts result in {0}.
15373
15374 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
15375
15376 PR rtl-optimization/79916
15377 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15378 regs (if any) to define how to gnerate SD moves when LRA is in
15379 progress.
15380
15381 2018-04-13 Jakub Jelinek <jakub@redhat.com>
15382
15383 PR rtl-optimization/85393
15384 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15385 * except.c (expand_dw2_landing_pad_for_region): Make static.
15386 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15387 a label and unconditional jump to old_bb, rather than
15388 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15389 basic block.
15390
15391 PR rtl-optimization/85376
15392 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15393 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15394 instead of a specific value.
15395
15396 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15397 Bin Cheng <bin.cheng@arm.com>
15398
15399 PR tree-optimization/82965
15400 PR tree-optimization/83991
15401 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15402 by_profile_only parameter.
15403 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15404 information if the loop was predicted to iterate too many times.
15405 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15406
15407 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15408
15409 PR lto/71991
15410 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15411 always inline.
15412
15413 2018-04-13 Martin Liska <mliska@suse.cz>
15414 Jakub Jelinek <jakub@redhat.com>
15415
15416 PR middle-end/81657
15417 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15418 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15419 * builtins.c (expand_builtin_memory_copy_args): Use
15420 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15421 handle dest_addr == pc_rtx.
15422
15423 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
15424
15425 PR target/85291
15426 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15427 asked to not generate direct moves.
15428 (fix_trunc<mode>si2_stfiwx): Similar.
15429 (fix_trunc<mode>si2_internal): Similar.
15430
15431 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15432
15433 PR debug/83157
15434 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15435 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15436 lookup if dest in some wider mode is known to be const0_rtx and
15437 if so, record permanent equivalence for it to be ZERO_EXTEND of
15438 the narrower mode destination.
15439
15440 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15441
15442 * lto-streamer-out.c (output_function): Revert 259346.
15443 * omp-expand.c (expand_oacc_for): Likewise.
15444
15445 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
15446
15447 PR rtl-optimization/85354
15448 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15449 * sel-sched.c (sel_global_init): ... here.
15450
15451 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
15452
15453 PR target/85238
15454 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15455 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15456 mode for PE-COFF targets.
15457 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15458 (i386_pe_asm_lto_end): Likewise.
15459 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15460 (TARGET_ASM_LTO_END): Likewise.
15461 * config/i386/winnt.c (saved_debug_info_level): New static variable.
15462 (i386_pe_asm_lto_start): New function.
15463 (i386_pe_asm_lto_end): Likewise.
15464
15465 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15466 Richard Biener <rguenther@suse.de>
15467
15468 PR middle-end/84955
15469 * lto-streamer-out.c (output_function): Fix CFG loop state before
15470 streaming out.
15471 * omp-expand.c (expand_oacc_for): Handle calls to internal
15472 functions like regular functions.
15473
15474 2018-04-12 Richard Biener <rguenther@suse.de>
15475
15476 PR lto/85371
15477 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15478 for the early LTO debug to properly generate references to it
15479 during DIE emission. Do not re-use that for the skeleton for
15480 split-dwarf.
15481 (dwarf2out_early_finish): Likewise.
15482
15483 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15484
15485 PR target/85328
15486 * config/i386/sse.md
15487 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15488 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15489 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15490 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15491 and output is a reg, avoid creating invalid lowpart subreg, but
15492 instead split into a 512-bit move. Don't split if not AVX512VL,
15493 input is xmm16+ reg and output is a mem.
15494 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15495 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15496 xmm16+ reg and output is a mem.
15497
15498 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15499
15500 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15501 also for flag_dwarf2_cfi_asm.
15502
15503 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15504
15505 PR rtl-optimization/85342
15506 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15507 a bool scalar var inside of the loop instead. Don't try to update
15508 recog_data.operand after failed apply_change_group.
15509
15510 2018-04-12 Tom de Vries <tom@codesourcery.com>
15511
15512 PR target/85296
15513 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15514 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
15515 array with flexible array member as array without given dimension.
15516 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15517 argument for undefined param to true.
15518
15519 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
15520
15521 PR target/85321
15522 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15523 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15524 from PowerPC section.
15525 * config/rs6000/sysv4.opt (mcall-): Improve help text.
15526 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15527 help text that is too long.
15528 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15529 help text that is too long.
15530 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15531 help text that is too long.
15532
15533 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
15534
15535 * config/alpha/alpha.md (stack_probe_internal): Rename
15536 from "probe_stack". Update all callers.
15537
15538 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15539
15540 PR rtl-optimization/84566
15541 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15542 sched_macro_fuse_insns.
15543
15544 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15545
15546 PR target/84301
15547 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15548 (compute_block_dependences): ... from here.
15549
15550 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15551
15552 PR tree-optimization/85331
15553 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15554 from int to HOST_WIDE_INT.
15555
15556 2018-04-11 Martin Jambor <mjambor@suse.cz>
15557
15558 PR ipa/84149
15559 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15560 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15561 not the same as the source val.
15562 (cgraph_edge_brings_value_p): New parameter.
15563 (gather_edges_for_value): Pass destination value to
15564 cgraph_edge_brings_value_p.
15565 (perhaps_add_new_callers): Likewise.
15566 (get_info_about_necessary_edges): Likewise and exclude values brought
15567 only by self-recursive edges.
15568 (create_specialized_node): Redirect only clones of self-calling edges.
15569 (+self_recursive_pass_through_p): New function.
15570 (find_more_scalar_values_for_callers_subset): Use it.
15571 (find_aggregate_values_for_callers_subset): Likewise.
15572 (known_aggs_to_agg_replacement_list): Removed.
15573 (decide_whether_version_node): Re-calculate known constants for all
15574 remaining context clones.
15575
15576 2018-04-11 Richard Biener <rguenther@suse.de>
15577
15578 PR lto/85339
15579 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15580 from early DWARF output.
15581 (dwarf2out_early_finish): Output line info unconditionally into
15582 early DWARF and add reference to it.
15583
15584 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15585
15586 PR target/85281
15587 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15588 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15589 other than V2DFmode using iptr mode attribute.
15590 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15591
15592 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15593
15594 PR rtl-optimization/84659
15595 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15596
15597 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15598
15599 PR debug/85302
15600 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15601 SIZEP is NULL.
15602 (output_loc_list): Pass address of a dummy size variable even in the
15603 locview handling loop.
15604 (index_location_lists): Add comment on why skip_loc_list_entry can't
15605 call size_of_locs.
15606
15607 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15608
15609 PR target/85261
15610 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15611 into register.
15612
15613 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15614
15615 PR target/85321
15616 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15617 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15618 and -mstring-compare-inline-limit.
15619
15620 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15621
15622 PR target/85287
15623 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15624 for stack clash protection in a register whenever we need it to be in
15625 a register.
15626
15627 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15628
15629 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15630 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15631
15632 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15633
15634 PR target/85321
15635 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15636 the help text.
15637 (mlong-double-): Ditto.
15638 * config/rs6000/sysv4.opt (msdata=): Ditto.
15639 (mtls-size=): Ditto.
15640
15641 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15642
15643 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15644 erroneous entries for
15645 "vector int vec_ldl (int, long int *)", and
15646 "vector unsigned int vec_ldl (int, unsigned long int *)".
15647 Add comments and entries for
15648 "vector bool char vec_ldl (int, bool char *)",
15649 "vector bool short vec_ldl (int, bool short *)",
15650 "vector bool int vec_ldl (int, bool int *)",
15651 "vector bool long long vec_ldl (int, bool long long *)",
15652 "vector pixel vec_ldl (int, pixel *)",
15653 "vector long long vec_ldl (int, long long *)",
15654 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15655 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15656 type tree bool_long_long_type_node and correct definition of
15657 bool_V2DI_type_node to make reference to this new type tree.
15658 (rs6000_mangle_type): Replace erroneous reference to
15659 bool_long_type_node with bool_long_long_type_node.
15660 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15661 comments to emphasize sign distinctions for char and int types and
15662 replace RS6000_BTI_bool_long constant with
15663 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15664 use of RS6000_BTI_pixel.
15665 (bool_long_type_node): Remove this macro definition.
15666 (bool_long_long_type_node): New macro definition
15667
15668 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15669
15670 PR rtl-optimization/85300
15671 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15672 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15673 simplify_unary_operation fails.
15674
15675 2018-04-10 Martin Liska <mliska@suse.cz>
15676
15677 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15678 cgraph_edge and ipa_ref.
15679
15680 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15681
15682 PR target/85177
15683 PR target/85255
15684 * config/i386/sse.md
15685 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15686 computation of the VEC_MERGE selector from mask.
15687 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15688 Fix decoding of the VEC_MERGE selector into mask.
15689
15690 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15691
15692 PR tree-optimization/85286
15693 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15694
15695 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15696
15697 * final.c (final_1): Set insn_last_address as well as
15698 insn_current_address.
15699
15700 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15701
15702 PR target/85173
15703 * explow.c (emit_stack_probe): Call validize_mem on memory location
15704 before passing it to gen_probe_stack. Create address operand and
15705 legitimize it for the probe_stack_address case.
15706
15707 2018-04-09 Jan Hubicka <jh@suse.cz>
15708
15709 PR lto/85078
15710 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15711 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15712 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15713 walk basetypes.
15714 (free_lang_data): Rebuild type inheritance graph.
15715
15716 2018-04-09 Martin Sebor <msebor@redhat.com>
15717
15718 * invoke.texi (-finline-small-functions): Mention other optimization
15719 options.
15720 (-findirect-inlining, -fpartial-inlining): Same.
15721 (-finline-functions-called-once): Same.
15722 (-freorder-blocks-and-partition): Same.
15723
15724 2018-04-09 Jan Hubicka <jh@suse.cz>
15725
15726 PR rtl/84058
15727 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15728 jumps; choose last target that matches the criteria (i.e.
15729 no partition changes for non-crossing jumps).
15730 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15731 support for redirecting crossing jumps to non-crossing.
15732
15733 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15734
15735 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15736 also for naked functions.
15737
15738 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15739
15740 * config/arc/arc.md (add_shift): New pattern.
15741 (add_shift2): Likewise.
15742 (sub_shift): Likewise.
15743 (sub_shift_cmp0_noout): Likewise.
15744 (compare_si_ashiftsi): Likewise.
15745 (xbfu_cmp0_noout): New combine pattern.
15746 (xbfu_cmp0"): Likewise.
15747 (movsi_set_cc_insn): Place the predicable variant first.
15748 (commutative_binary_cmp0_noout): Remove clobber.
15749 (commutative_binary_cmp0): New pattern.
15750 (noncommutative_binary_cmp0): Likewise.
15751 (noncommutative_binary_cmp0_noout): Likewise.
15752 (noncommutative_binary_comparison_result_used): Removed.
15753 (rsub_cmp0): New pattern.
15754 (rsub_cmp0_noout): Likewise.
15755 (extzvsi): Changed, keep only meaningful variants.
15756 (SQH, SEZ): New iterators.
15757 (SQH_postfix): New mode attribute.
15758 (SEZ_prefix): New code attribute.
15759 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15760 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15761 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15762 of numerical value.
15763 (noncommutative_operator): Check the availability of barrel
15764 shifter option.
15765
15766 2018-04-09 Richard Biener <rguenther@suse.de>
15767
15768 PR tree-optimization/85284
15769 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15770 Only use the niter constraining form of simple_iv when the exit
15771 is always executed.
15772
15773 2018-04-09 Tom de Vries <tom@codesourcery.com>
15774
15775 PR target/84041
15776 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15777 (define_expand "*memory_barrier"): New define_expand.
15778 (define_insn "memory_barrier"): New insn.
15779
15780 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15781
15782 PR rtl-optimization/80463
15783 PR rtl-optimization/83972
15784 PR rtl-optimization/83480
15785
15786 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15787 correct producer for the insn.
15788 (tidy_control_flow): Fixup seqnos in case of debug insns.
15789
15790 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15791
15792 PR rtl-optimization/83913
15793
15794 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15795 different sched-times when merging exprs.
15796
15797 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15798
15799 PR rtl-optimization/83962
15800
15801 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15802 tidy_fallthru_edge and tidy_control_flow.
15803
15804 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15805
15806 PR rtl-optimization/83530
15807
15808 * sel-sched.c (force_next_insn): New global variable.
15809 (remove_insn_for_debug): When force_next_insn is true, also leave only
15810 next insn in the ready list.
15811 (sel_sched_region): When the region wasn't scheduled, make another pass
15812 over it with force_next_insn set to 1.
15813
15814 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15815
15816 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15817 into tm_file.
15818 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15819 for interrupt control.
15820 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15821 functions for interrupt control.
15822 * config/nds32/nds32-intrinsic.md: Likewise.
15823 * config/nds32/nds32_intrinsic.h: Likewise.
15824 * config/nds32/nds32.h (nds32_builtins): Likewise.
15825
15826 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15827
15828 * config/nds32/nds32.c (nds32_init_machine_status,
15829 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15830 strict_aligned_p field.
15831 (nds32_expand_to_rtl_hook): New function.
15832 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15833 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15834
15835 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15836 Chung-Ju Wu <jasonwucj@gmail.com>
15837
15838 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15839 * config/nds32/nds32-n7.md: New file.
15840 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15841 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15842 pipeline.
15843 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15844 * config/nds32/nds32.md (pipeline_model): Add n7.
15845 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15846 * config/nds32/pipelines.md: Include n7 settings.
15847
15848 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15849 Chung-Ju Wu <jasonwucj@gmail.com>
15850
15851 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15852 * config/nds32/nds32-e8.md: New file.
15853 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15854 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15855 pipeline.
15856 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15857 * config/nds32/nds32.md (pipeline_model): Add e8.
15858 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15859 * config/nds32/pipelines.md: Include e8 settings.
15860
15861 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15862 Chung-Ju Wu <jasonwucj@gmail.com>
15863
15864 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15865 * config/nds32/nds32-n8.md: New file.
15866 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15867 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15868 pipeline.
15869 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15870 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15871 * config/nds32/nds32.md (pipeline_model): Add n8.
15872 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15873 * config/nds32/pipelines.md: Include n8 settings.
15874
15875 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15876 Chung-Ju Wu <jasonwucj@gmail.com>
15877
15878 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15879 * config/nds32/nds32-n9-2r1w.md: New file.
15880 * config/nds32/nds32-n9-3r2w.md: New file.
15881 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15882 nds32_register_ports): New or modify for cpu n9.
15883 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15884 pipeline.
15885 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15886 * config/nds32/nds32-utils.c: New file.
15887 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15888 TARGET_MUL_SLOW): Define.
15889 * config/nds32/nds32.md (pipeline_model): New attribute.
15890 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15891 New options that support cpu n9.
15892 * config/nds32/pipelines.md: Include n9 settings.
15893 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15894
15895 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15896
15897 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15898 information if necessary.
15899 (output_cond_branch_compare_zero): Likewise.
15900 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15901 (nds32_target_alignment): Refine for alignment.
15902 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15903 (FUNCTION_BOUNDARY): Modify.
15904 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15905 align case.
15906 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15907
15908 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15909
15910 * config/nds32/constants.md (unspec_volatile_element): Add values for
15911 TLB operation and data prefetch.
15912 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15913 functions for TLB operation and data prefetch.
15914 * config/nds32/nds32-intrinsic.md: Likewise.
15915 * config/nds32/nds32_intrinsic.h: Likewise.
15916 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15917 (nds32_print_operand): Likewise.
15918 * config/nds32/nds32.h (nds32_builtins): Likewise.
15919
15920 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15921 Andrew Pinski <pinsika@gcc.gnu.org>
15922
15923 PR middle-end/82976
15924 * match.pd: Use constant_boolean_node of correct type instead of
15925 boolean_true_node or boolean_false_node for simplifying
15926 pointer comparisons to zero.
15927
15928 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15929
15930 PR tree-optimization/80021
15931 * tree.c (verify_type_variant): Make error call in verify_variant_match
15932 translatable and remove final full stop.
15933
15934 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15935
15936 * config/nds32/constants.md (unspec_volatile_element): Add
15937 UNSPEC_VOLATILE_EH_RETURN.
15938 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15939 nds32_output_stack_pop): Support dwarf exception handling process.
15940 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15941 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15942 exception handling process.
15943 (nds32_compute_stack_frame): Likewise.
15944 (nds32_return_addr_rtx): Likewise.
15945 (nds32_initial_elimination_offset): Likewise.
15946 (nds32_expand_prologue): Likewise.
15947 (nds32_expand_epilogue): Likewise.
15948 (nds32_dynamic_chain_address): New function.
15949 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15950 exception handling.
15951 (DYNAMIC_CHAIN_ADDRESS): Define.
15952 (EH_RETURN_DATA_REGNO): Define.
15953 (EH_RETURN_STACKADJ_RTX): Define.
15954 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15955 patterns for dwarf exception handling.
15956
15957 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15958
15959 * config/nds32/nds32.h: Clean up obsolete macros.
15960
15961 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15962
15963 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15964 Add enum values for particular instructions.
15965 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15966 particular intrinsic functions.
15967 * config/nds32/nds32-intrinsic.md: Likewise.
15968 * config/nds32/nds32_intrinsic.h: Likewise.
15969 * config/nds32/nds32.h (nds32_builtins): Likewise.
15970 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15971 (btst, ave): New patterns for particular instructions.
15972
15973 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15974
15975 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15976 Add enum values for atomic load/store and memory sync.
15977 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15978 and memory sync.
15979 * config/nds32/nds32-intrinsic.md: Likewise.
15980 * config/nds32/nds32_intrinsic.h: Likewise.
15981 * config/nds32/nds32.h (nds32_builtins): Likewise.
15982
15983 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15984
15985 PR tree-optimization/85257
15986 * fold-const.c (native_encode_vector): If not all elts could fit
15987 and off is -1, return 0 rather than offset.
15988 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15989 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15990 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15991 adjust buffer in native_interpret_expr call.
15992
15993 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15994
15995 * config/nds32/constants.md (unspec_volatile_element): Add cache
15996 control enum values.
15997 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15998 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15999 * config/nds32/nds32.c (nds32_cctl_names): New.
16000 (nds32_print_operand): Handle cache control register names.
16001 * config/nds32/nds32.h (nds32_builtins): New enum values.
16002 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
16003 macros.
16004 * config/nds32/nds32.md (type): Add mmu.
16005 * config/nds32/pipelines.md (simple_insn): Add mmu.
16006
16007 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16008
16009 * config/nds32/nds32.md (type): Remove call.
16010 * config/nds32/pipelines.md (simple_insn): Likewise.
16011
16012 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16013
16014 * config/nds32/constants.md (unspec_volatile_element): Add
16015 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
16016 UNSPEC_VOLATILE_FMFCFG.
16017 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
16018 description for fmfcfg and fmfcsr.
16019 (bdesc_1arg): Add fmtcsr.
16020 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
16021 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
16022 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
16023 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
16024 unspec_fmfcfg): New patterns.
16025 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
16026 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
16027 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
16028 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
16029 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
16030 __nds32__fmfcfg): Define.
16031
16032 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
16033
16034 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
16035 intrinsic register names.
16036 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
16037 intrinsic register enum values and macros.
16038
16039 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
16040
16041 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
16042 for load/store addressing form.
16043 (nds32_print_operand_address): Likewise.
16044
16045 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
16046
16047 PR target/85196
16048 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
16049 based on LABEL_REF. Remove useless assertion.
16050 (pic_address_needs_scratch): Fix formatting.
16051 (sparc_legitimize_pic_address): Minor tweaks.
16052 (sparc_delegitimize_address): Adjust assertion accordingly.
16053 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
16054 into symbolic_operand.
16055 (movsi_high_pic_label_ref): Likewise.
16056 (movsi_lo_sum_pic_label_ref): Likewise.
16057 (movdi_pic_label_ref): Likewise.
16058 (movdi_high_pic_label_ref): Likewise.
16059 (movdi_lo_sum_pic_label_ref): Likewise.
16060
16061 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
16062
16063 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
16064 custom LIB_SPEC setup.
16065
16066 2018-04-06 Ruslan Bukin <br@bsdpad.com>
16067 Kito Cheng <kito.cheng@gmail.com>
16068
16069 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
16070 * config/riscv/freebsd.h: New.
16071
16072 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16073
16074 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
16075 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
16076 file.
16077
16078 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16079 Kito Cheng <kito.cheng@gmail.com>
16080
16081 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
16082 nds32_output_call, nds32_symbol_binds_local_p): New functions.
16083 * config/nds32/nds32-protos.h (nds32_output_call,
16084 nds32_output_return): Declare.
16085 * config/nds32/nds32.md: Refine all the call and return patterns.
16086
16087 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16088
16089 PR debug/85252
16090 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
16091 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
16092
16093 PR rtl-optimization/84872
16094 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
16095 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
16096 EDGE_CROSSING edge.
16097
16098 2018-04-06 Tamar Christina <tamar.christina@arm.com>
16099
16100 * expr.c (copy_blkmode_to_reg): Revert 254862.
16101 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
16102
16103 2018-04-06 Richard Biener <rguenther@suse.de>
16104
16105 PR middle-end/85244
16106 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
16107 after seeing a component reference with an adjacent field. Treat
16108 refs to arrays at struct end of external decls similar to
16109 refs to unconstrained commons.
16110
16111 2018-04-06 Jakub Jelinek <jakub@redhat.com>
16112
16113 PR sanitizer/85213
16114 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
16115 look through SAVE_EXPRs with non-side-effects argument. Adjust
16116 recursive calls.
16117 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
16118 save_p here.
16119
16120 2018-04-06 Richard Biener <rguenther@suse.de>
16121
16122 PR middle-end/85180
16123 * alias.c (find_base_term): New wrapper around find_base_term
16124 unwinding CSELIB_VAL_PTR changes.
16125 (find_base_term): Do not restore CSELIB_VAL_PTR during the
16126 recursion.
16127
16128 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16129
16130 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
16131 instructions.
16132 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
16133 constant definitions.
16134 ("nop"): lr 0,0 -> nopr r0
16135 ("nop_lr0", "nop_lr1"): New insn definitions.
16136
16137 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
16138
16139 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
16140 NDS32_V3PUSH_AVAILABLE_P macro.
16141
16142 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
16143 Chung-Ju Wu <jasonwucj@gmail.com>
16144
16145 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
16146 (nds32*-*-*): Add float and fpu_config into supported_defaults.
16147 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
16148 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
16149 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
16150 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
16151 * config/nds32/constraints.md: New constraints and checking for hard
16152 float configuration.
16153 * config/nds32/iterators.md: New mode iterator and attribute for hard
16154 float configuration.
16155 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
16156 patterns.
16157 * config/nds32/nds32-fpu.md: New file.
16158 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
16159 deal with hard float code generation.
16160 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
16161 ARCH_V3S.
16162 (abi_type, float_reg_number): New enum type.
16163 * config/nds32/nds32-predicates.c: New predicates for hard float.
16164 * config/nds32/nds32-protos.h: Declare functions for hard float.
16165 * config/nds32/nds32.c: Implementation for hard float configuration.
16166 * config/nds32/nds32.h: Definitions for hard float configuration.
16167 * config/nds32/nds32.md: Include hard float machine description and
16168 modify patterns for hard float configuration.
16169 * config/nds32/nds32.opt: New options for hard float configuration.
16170 * config/nds32/predicates.md: New predicates for hard float
16171 configuration.
16172
16173 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16174
16175 * common/config/nds32/nds32-common.c
16176 (nds32_option_optimization_table): Enable -mreleax-hint by default.
16177
16178 2018-04-05 Jakub Jelinek <jakub@redhat.com>
16179
16180 PR middle-end/85195
16181 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
16182 CONSTRUCTOR_ELT (ctor, ...)->value.
16183
16184 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
16185
16186 PR target/85193
16187 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
16188
16189 2018-04-05 Tom de Vries <tom@codesourcery.com>
16190
16191 PR target/85204
16192 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
16193 cond jump.
16194
16195 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16196 Kito Cheng <kito.cheng@gmail.com>
16197
16198 * config/nds32/constraints.md (U33): Fine-tune checking condition.
16199 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
16200 * config/nds32/nds32.h (nds32_16bit_address_type): Add
16201 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
16202
16203 2018-04-05 Shiva Chen <shiva0217@gmail.com>
16204 Kito Cheng <kito.cheng@gmail.com>
16205
16206 * config/nds32/constraints.md (Ufe): New memory constraint.
16207 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
16208 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
16209 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
16210 operands.
16211 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
16212 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
16213
16214 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16215
16216 * config/nds32/nds32.md: Use optimize_size in the condition for
16217 alu-shift instructions.
16218
16219 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16220
16221 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
16222
16223 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16224
16225 * config/nds32/nds32.md (negsi2): Refine pattern.
16226
16227 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16228 Chung-Ju Wu <jasonwucj@gmail.com>
16229
16230 * config/nds32/iterators.md (shift_rotate): New code iterator.
16231 (shift): New code attribute.
16232 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
16233 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
16234 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
16235 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
16236 bit-wise operations.
16237 (andsi3, *andsi3): Ditto.
16238 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
16239 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
16240 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
16241 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
16242 nds32_ior_operand, nds32_xor_operand): New predicates.
16243
16244 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16245
16246 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
16247 (addsi3, subsi3): ... this.
16248
16249 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16250
16251 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
16252
16253 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16254
16255 * config/nds32/nds32.md: Adjust indention.
16256
16257 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
16258
16259 * config/nds32/nds32.md (feature): New attribute.
16260
16261 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
16262
16263 * config/nds32/nds32.md (subtype): New attribute.
16264
16265 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
16266
16267 PR target/85203
16268 * config/arm/arm-builtins.c (arm_expand_builtin): Change
16269 expansion to perform a bitwise AND of the argument followed by a
16270 boolean negation of the result.
16271
16272 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
16273
16274 PR rtl-optimization/84878
16275 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
16276 the basic block. Assert the use reference is not artificial and that
16277 it has an associated insn.
16278
16279 2018-04-04 Michael Matz <matz@suse.de>
16280
16281 * builtins.c (compute_objsize): Pass correct operand
16282 to array_at_struct_end_p.
16283
16284 2018-04-04 Richard Biener <rguenther@suse.de>
16285
16286 PR lto/85176
16287 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
16288 from contexts for DINFO_LEVEL_TERSE and below.
16289
16290 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16291
16292 * config/nds32/nds32-doubleword.md (move_<mode>): Require
16293 resiter_operand condition.
16294 * config/nds32/nds32.md (*move<mode>): Ditto.
16295
16296 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16297 Monk Chiang <sh.chiang04@gmail.com>
16298
16299 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
16300
16301 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16302
16303 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
16304
16305 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16306 Kito Cheng <kito.cheng@gmail.com>
16307
16308 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
16309 nds32_cond_code_str, output_cond_branch,
16310 output_cond_branch_compare_zero, nds32_expand_cbranch,
16311 nds32_expand_cstore, nds32_expand_movcc,
16312 nds32_output_cbranchsi4_equality_zero,
16313 nds32_output_cbranchsi4_equality_reg,
16314 nds32_output_cbranchsi4_equality_reg_or_const_int,
16315 nds32_output_cbranchsi4_greater_less_zero: New functions.
16316 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
16317 nds32_expand_cstore, nds32_expand_movcc,
16318 nds32_output_cbranchsi4_equality_zero,
16319 nds32_output_cbranchsi4_equality_reg,
16320 nds32_output_cbranchsi4_equality_reg_or_const_int,
16321 nds32_output_cbranchsi4_greater_less_zero): Declare.
16322 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
16323 nds32_rimm11s_operand): New predicates.
16324 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
16325 * config/nds32/nds32.md: Rewrite all the branch and conditional move
16326 patterns.
16327
16328 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
16329
16330 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
16331 * config/nds32/nds32.md: Ditto.
16332 * config/nds32/pipelines.md: Ditto.
16333
16334 2018-04-04 Richard Biener <rguenther@suse.de>
16335
16336 PR tree-optimization/85168
16337 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
16338 propagating abnormals.
16339
16340 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16341
16342 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16343
16344 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16345 Kito Cheng <kito.cheng@gmail.com>
16346
16347 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16348 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16349 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16350 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16351 * config/nds32/nds32.md (sibcall_internal): New.
16352 (sibcall_register): Remove.
16353 (sibcall_immediate): Remove.
16354 (sibcall_value_internal): New.
16355 (sibcall_value_register): Remove.
16356 (sibcall_value_immediate): Remove.
16357 * config/nds32/predicates.md (nds32_general_register_operand): New.
16358 (nds32_call_address_operand): New.
16359
16360 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16361
16362 PR rtl-optimization/85167
16363 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16364 bb_defs if *split_p, instead preinitialize it to NULL.
16365
16366 PR tree-optimization/85156
16367 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16368 evaluating the argument multiple times.
16369
16370 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
16371
16372 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16373 than vector.
16374 (_mm_cvtpd_ps): Likewise.
16375 (_mm_cvttpd_epi32): Likewise.
16376 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16377 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16378 vector, pixel, and bool following altivec.h include.
16379
16380 2018-04-03 Martin Sebor <msebor@redhat.com>
16381
16382 * doc/extend.texi (Common Function Attributes): Clarify.
16383 (const attribute): Likewise.
16384 (pure attribute): Likewise.
16385
16386 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16387
16388 PR target/85169
16389 * config/i386/i386.c (ix86_expand_vector_set): Use
16390 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
16391
16392 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
16393
16394 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16395 instructions when changing rounding bits to preserve precision bits
16396 in the x87 control word.
16397
16398 2018-04-03 Martin Liska <mliska@suse.cz>
16399
16400 PR tree-optimization/82491
16401 * rtl.h (strip_offset_and_add): Replace += suboffset with
16402 poly_uint64 () + suboffset.
16403
16404 2018-03-29 Martin Liska <mliska@suse.cz>
16405 Martin Jambor <mjambor@suse.cz>
16406
16407 PR ipa/84947
16408 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16409 param_type is not an integral or pointer type.
16410
16411 2018-04-03 Richard Biener <rguenther@suse.de>
16412
16413 * sese.h (recompute_all_dominators): Remove.
16414
16415 2018-04-02 Martin Sebor <msebor@redhat.com>
16416
16417 * doc/invoke.texi (-Wrestrict): Fix typos.
16418
16419 2018-04-02 Jim Wilson <jimw@sifive.com>
16420
16421 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16422 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16423 (<optab>di3, <optab>si3_extend): Likewise.
16424 (<optab>si3_mask, <optab>si3_mask_1): New.
16425 (<optab>di3_mask, <optab>di3_mask_1): New.
16426 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16427 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16428 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16429
16430 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
16431
16432 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16433 example.
16434
16435 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
16436
16437 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16438 (nds32_canonicalize_comparison): New function.
16439
16440 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16441 Kito Cheng <kito.cheng@gmail.com>
16442 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16443
16444 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16445 * config/nds32/constants.md (unspec_volatile_element): Add
16446 UNSPEC_VOLATILE_RELAX_GROUP.
16447 * config/nds32/nds32-relax-opt.c: New file.
16448 * config/nds32/nds32-predicates.c
16449 (nds32_symbol_load_store_p): New function.
16450 * config/nds32/nds32-protos.h
16451 (nds32_symbol_load_store_p): Declare function.
16452 (make_pass_nds32_relax_opt): Declare new rtl pass function.
16453 * config/nds32/nds32.c
16454 (nds32_register_pass): New function to register pass.
16455 (nds32_register_passes): New function to register passes.
16456 * config/nds32/nds32.md (relax_group): New pattern.
16457 * config/nds32/nds32.opt (mrelax-hint): New option.
16458 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16459
16460 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
16461
16462 * config/nds32/t-nds32: Modify files dependency.
16463
16464 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16465
16466 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16467 (PROFILE_HOOK): Define its implementation.
16468
16469 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16470
16471 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16472 type and 32-bit size.
16473
16474 2018-04-01 Jakub Jelinek <jakub@redhat.com>
16475
16476 PR middle-end/85090
16477 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16478 (V_128_256): New mode iterator.
16479 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16480 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16481 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16482 of V.
16483 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16484 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16485
16486 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
16487
16488 PR target/83315
16489 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16490 NaN inputs correctly.
16491
16492 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
16493
16494 PR target/80546
16495 * config/rs6000/vsx.md (??r): New mode attribute.
16496 (*vsx_mov<mode>_64bit): Use it.
16497 (*vsx_mov<mode>_32bit): Likewise.
16498
16499 2018-03-30 Martin Sebor <msebor@redhat.com>
16500
16501 PR tree-optimization/84818
16502 * builtins.c (check_access): Use warning_n.
16503
16504 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16505
16506 PR target/83822
16507 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16508 condition.
16509 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16510 condition.
16511
16512 2018-03-30 Julia Koval <julia.koval@intel.com>
16513
16514 PR target/84413
16515 * x86-tune.def (movx, partial_reg_dependency): Enable for
16516 m_SKYLAKE_AVX512.
16517
16518 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
16519
16520 PR inline-asm/84985
16521 * lra-constraints.c (process_alt_operands): Move setting
16522 this_alternative_matches below.
16523
16524 2018-03-29 Martin Liska <mliska@suse.cz>
16525
16526 PR lto/84995.
16527 * doc/invoke.texi: Document how LTO works with debug info.
16528 Describe auto-load support of binutils. Mention 'x86-64'
16529 as valid option value of -march option.
16530
16531 2018-03-29 Jakub Jelinek <jakub@redhat.com>
16532
16533 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16534
16535 PR c/85094
16536 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16537 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16538 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16539 checking.
16540
16541 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16542
16543 PR target/84912
16544 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16545 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16546 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16547 for RS6000_BTM_POWERPC64.
16548 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16549 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16550 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16551 definition.
16552 (DIVDE): Use it.
16553 (DIVDEU): Likewise.
16554
16555 2018-03-28 Carl Love <cel@us.ibm.com>
16556
16557 Revert
16558 2017-09-27 Carl Love <cel@us.ibm.com>
16559
16560 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16561 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16562 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16563 fctiw instruction.
16564
16565 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16566
16567 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16568 instead of __vector bool.
16569 (_mm_max_pu8): Likewise.
16570 (_mm_min_pi16): Likewise.
16571
16572 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16573
16574 PR target/84912
16575 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16576 (DIVWEUO): Likewise.
16577 (DIVDEO): Likewise.
16578 (DIVDEUO): Likewise.
16579 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16580 DIVWEUO and DIVDEUO.
16581 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16582 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16583 (div_extend): Likewise.
16584 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16585 builtin function.
16586 (__builtin_divweuo): Likewise.
16587 (__builtin_divdeo): Likewise.
16588 (__builtin_divdeuo): Likewise.
16589
16590 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16591
16592 PR target/85095
16593 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16594 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16595
16596 PR tree-optimization/82004
16597 * gimple-match-head.c (optimize_pow_to_exp): New function.
16598 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16599 Don't fold to exp if optimize_pow_to_exp is false.
16600
16601 2018-03-28 Martin Liska <mliska@suse.cz>
16602
16603 PR other/84819
16604 * calls.c (initialize_argument_information): Fix trailing space.
16605 * common.opt: Fix typo and provide better explanation for
16606 -fsanitize-coverage option.
16607 * config/i386/i386.opt: Fix typo.
16608
16609 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16610 Martin Liska <mliska@suse.cz>
16611
16612 PR sanitizer/85081
16613 * gimplify.c (asan_poison_variable): Don't do the check for
16614 gimplify_omp_ctxp here.
16615 (gimplify_decl_expr): Do it here.
16616 (gimplify_target_expr): Likewise.
16617
16618 2018-03-28 Martin Liska <mliska@suse.cz>
16619
16620 PR target/84988
16621 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16622 chkp_type_bounds_count if MPX is not enabled.
16623
16624 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16625
16626 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16627
16628 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16629
16630 PR target/84914
16631 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16632 function to create the function decl for complex long double
16633 multiply and divide for -mabi=ieeelongdouble.
16634 (init_float128_ieee): Call it.
16635
16636 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16637
16638 PR target/85044
16639 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16640 -fcf-protection=branch -mibt.
16641 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16642
16643 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16644
16645 PR target/81863
16646 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16647 arm_word_relocations.
16648
16649 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16650
16651 PR target/85056
16652 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16653 extern array declarations.
16654
16655 2018-03-27 Richard Biener <rguenther@suse.de>
16656
16657 PR middle-end/84067
16658 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16659 explicit single_use checks.
16660
16661 2018-03-27 Richard Biener <rguenther@suse.de>
16662
16663 PR tree-optimization/85082
16664 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16665 Valueize the VUSE.
16666
16667 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16668
16669 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16670 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16671 Turn on fasynchronous-unwind-tables and funwind-tables.
16672
16673 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16674
16675 PR target/85073
16676 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16677 (*bmi_blsr_<mode>_ccz): Ditto.
16678
16679 2018-03-26 Tom de Vries <tom@codesourcery.com>
16680
16681 PR tree-optimization/85063
16682 * omp-general.c (offloading_function_p): New function. Factor out
16683 of ...
16684 * omp-offload.c (pass_omp_target_link::gate): ... here.
16685 * omp-general.h (offloading_function_p): Declare.
16686 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16687 with attribute omp declare target for offloading functions.
16688
16689 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16690
16691 PR tree-optimization/84005
16692 * tree-data-ref.h (get_base_for_alignment): Declare.
16693 * tree-data-ref.c (get_base_for_alignment_1): New function.
16694 (get_base_for_alignment): Likewise.
16695 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16696 get_base_for_alignment to find a suitable base object, instead
16697 of always using drb->base_address.
16698
16699 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16700
16701 PR inline-asm/85022
16702 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16703 known size by default.
16704
16705 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16706
16707 PR inline-asm/85030
16708 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16709 and non BLKmode operands.
16710
16711 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16712
16713 PR target/85026
16714 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16715 Clean up attributes.
16716
16717 2018-03-23 Richard Biener <rguenther@suse.de>
16718
16719 PR debug/85020
16720 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16721 we are going to emit early debug for LTO.
16722
16723 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16724
16725 PR inline-asm/85034
16726 * function.c (match_asm_constraints_1): Don't optimize if input
16727 doesn't satisfy general_operand predicate for output's mode.
16728
16729 PR inline-asm/85022
16730 * alias.c (write_dependence_p): Don't require for x_canonicalized
16731 non-VOIDmode if x has VOIDmode.
16732
16733 PR sanitizer/85029
16734 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16735 just don't try to optimize it rather than assert it never happens.
16736
16737 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16738
16739 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16740 macro expansions for definition of ST_INTERNAL_<mode> and
16741 LD_INTERNAL_<mode> builtins.
16742 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16743 Remove prototype.
16744 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16745 function.
16746 (altivec_expand_st_builtin): Likewise.
16747 (altivec_expand_builtin): Remove calls to deleted functions.
16748 (rs6000_address_for_altivec): Delete this function.
16749 * config/rs6000/vector.md: Remove expands for
16750 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16751
16752 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16753
16754 PR target/84826
16755 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16756 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16757 re-computing once computed.
16758 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16759 (arm_init_machine_status): Initialize
16760 machine->static_chain_stack_bytes.
16761
16762 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16763
16764 PR target/84760
16765 * doc/extend.texi: Add four new prototypes for vec_ld.
16766 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16767 definitions for more logical presentation.
16768 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16769 entries for V1TI variants of __builtin_altivec_ld builtin.
16770 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16771 handling of V1TI variant of LVX icode pattern.
16772 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16773 (rs6000_gimple_fold_builtin): Likewise.
16774 (altivec_init_builtins): Add code to define
16775 __builtin_altivec_lvx_v1ti function.
16776
16777 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16778
16779 PR inline-asm/84941
16780 * function.c (match_asm_constraints_1): Don't do the optimization
16781 if input isn't a REG, SUBREG, MEM or constant.
16782
16783 2018-03-22 Tom de Vries <tom@codesourcery.com>
16784
16785 PR tree-optimization/84956
16786 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16787 bb_has_abnormal_pred.
16788
16789 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16790
16791 PR sanitizer/85018
16792 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16793 DECL_INITIAL (decl) to decl at the end.
16794 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16795 adjust the comment.
16796
16797 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16798
16799 * doc/extend.texi (__builtin_tgmath): Document when complex
16800 integer types are treated as _Complex _Float64.
16801
16802 2018-03-21 Tom de Vries <tom@codesourcery.com>
16803
16804 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16805
16806 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16807
16808 PR tree-optimization/84960
16809 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16810 if it is ENTRY block, move them into single succ of ENTRY in that case.
16811
16812 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16813
16814 PR tree-optimization/84811
16815 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16816 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16817 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16818 (known_subrange_p): Update accordingly. Cast each value involved
16819 in the size comparison, rather than casting the result of the
16820 subtraction.
16821
16822 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16823
16824 PR tree-optimization/84982
16825 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16826 by flipping the least significant bit rather than all bits from
16827 bitpos to bitpos + bitsize - 1.
16828
16829 2018-03-21 Nathan Sidwell <nathan@acm.org>
16830
16831 * doc/extend.texi (Deprecated Features): Remove mention of
16832 long-deleted deprecations.
16833
16834 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16835
16836 PR jit/84288
16837 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16838 * configure: Regenerate.
16839
16840 2018-03-21 Tom de Vries <tom@codesourcery.com>
16841
16842 PR tree-optimization/83126
16843 * tree-parloops.c (num_phis): New function.
16844 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16845
16846 2018-03-21 Nathan Sidwell <nathan@acm.org>
16847
16848 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16849 mention anon-struct/union members and trailing attributes.
16850
16851 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16852
16853 PR tree-optimization/84969
16854 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16855 builtin memset partitions if they set different rhs values.
16856
16857 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16858
16859 PR rtl-optimization/84989
16860 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16861 VEC_DUPLICATE with scalar result mode.
16862
16863 2018-03-21 Martin Liska <mliska@suse.cz>
16864
16865 PR ipa/84963
16866 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16867 not intended return statement.
16868
16869 2018-03-21 Martin Liska <mliska@suse.cz>
16870
16871 PR target/84988
16872 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16873 (chkp_find_bound_slots_1): Limit number of iterations.
16874
16875 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16876
16877 PR target/84838
16878 * Minor grammar fixes for x86 options.
16879
16880 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16881
16882 PR debug/84875
16883 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16884 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16885
16886 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16887
16888 PR target/83789
16889 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16890 (altivec_lvx_<mode>_1op): Likewise.
16891 (altivec_stvx_<mode>_2op): Likewise.
16892 (altivec_stvx_<mode>_1op): Likewise.
16893 (altivec_lvx_<VM2:mode>): New define_expand.
16894 (altivec_stvx_<VM2:mode>): Likewise.
16895 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16896 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16897 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16898 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16899 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16900 (rs6000_gen_lvx): Likewise.
16901 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16902 (altivec_expand_stv_builtin): Likewise.
16903 (altivec_expand_builtin): Likewise.
16904 * config/rs6000/vector.md: Likewise.
16905
16906 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16907
16908 PR target/82518
16909 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16910 BYTES_BIG_ENDIAN.
16911
16912 2018-03-20 Richard Biener <rguenther@suse.de>
16913
16914 PR target/84986
16915 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16916 sign-conversions as zero, fall back to standard scalar_stmt
16917 cost for the rest.
16918
16919 2018-03-20 Martin Liska <mliska@suse.cz>
16920
16921 PR ipa/84825
16922 * predict.c (rebuild_frequencies): Handle case when we have
16923 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16924
16925 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16926
16927 PR target/84990
16928 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16929 flag_section_anchors.
16930 * varasm.c (use_blocks_for_decl_p): Remove hack for
16931 dw2_force_const_mem.
16932
16933 PR target/84845
16934 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16935 to ...
16936 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16937 be created, use lowpart_subreg of operands[0] rather than operands[0]
16938 itself.
16939 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16940 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16941 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16942 and n constraint instead of aarch64_shift_imm_di and Usd.
16943 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16944 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16945
16946 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16947
16948 PR target/82989
16949 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16950 to favor GPR over NEON registers.
16951 (<shift>di3_neon): Likewise.
16952
16953 2018-03-20 Tom de Vries <tom@codesourcery.com>
16954
16955 PR target/84952
16956 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16957 (nvptx_process_pars): Emit bar.sync asap and alap.
16958
16959 2018-03-20 Tom de Vries <tom@codesourcery.com>
16960
16961 PR target/84954
16962 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16963 seen_label if seen_label is already set.
16964
16965 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16966
16967 PR target/84945
16968 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16969 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16970 Use 1U instead of 1. Formatting fixes.
16971
16972 PR c/84953
16973 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16974 instead of TREE_TYPE (s1) for the return value.
16975
16976 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16977
16978 PR tree-optimization/84946
16979 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16980 bitsize + bitsize in poly_uint64 rather than poly_int64.
16981
16982 PR sanitizer/78651
16983 * dwarf2asm.c: Include fold-const.c.
16984 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16985 of decl rather than decl itself.
16986
16987 PR rtl-optimization/84643
16988 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16989
16990 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16991
16992 PR sanitizer/78651
16993 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16994 calling assemble_variable.
16995
16996 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16997
16998 PR target/81647
16999 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
17000 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
17001
17002 2018-03-19 Jim Wilson <jimw@sifive.com>
17003
17004 PR bootstrap/84856
17005 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
17006 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
17007 (riscv_first_stack_step): Likewise.
17008 (riscv_option_override): Use STACK_BOUNDARY instead of
17009 MIN_STACK_BOUNDARY.
17010 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
17011 MIN_STACK_BOUNDARY.
17012 (BIGGEST_ALIGNMENT): Set to 128.
17013 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
17014 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
17015 STACK_BOUNDARY.
17016
17017 2018-03-19 Richard Biener <rguenther@suse.de>
17018
17019 PR tree-optimization/84933
17020 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
17021 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
17022
17023 2018-03-19 Richard Biener <rguenther@suse.de>
17024
17025 PR tree-optimization/84859
17026 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
17027 (cond_if_else_store_replacement): Perform sinking operation on
17028 single-store BBs regardless of MAX_STORES_TO_SINK setting.
17029 Generalize what a BB with a single eligible store is.
17030
17031 2018-03-19 Richard Biener <rguenther@suse.de>
17032
17033 PR tree-optimization/84929
17034 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
17035 chrec_is_positive against non-chrec arg.
17036
17037 2018-03-19 Tamar Christina <tamar.christina@arm.com>
17038
17039 PR target/84711
17040 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
17041
17042 2018-03-18 Martin Liska <mliska@suse.cz>
17043
17044 PR rtl-optimization/84635
17045 * regrename.c (build_def_use): Use matches_mode only when
17046 matches >= 0.
17047
17048 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
17049
17050 PR tree-optimization/84913
17051 * tree-vect-loop.c (vectorizable_reduction): Don't try to
17052 vectorize chains of COND_EXPRs.
17053
17054 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17055
17056 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
17057
17058 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17059
17060 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
17061
17062 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
17063
17064 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
17065
17066 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17067 Kito Cheng <kito.cheng@gmail.com>
17068
17069 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
17070 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
17071 (nds32_adjust_reg_alloc_order): New function.
17072 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
17073
17074 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
17075
17076 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
17077 nds32_print_operand, nds32_print_operand_address): Use
17078 HOST_WIDE_INT_PRINT_DEC instead.
17079
17080 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
17081
17082 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
17083
17084 2018-03-17 Jakub Jelinek <jakub@redhat.com>
17085
17086 PR target/84902
17087 * config/i386/i386.c (initial_ix86_tune_features,
17088 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
17089 unsigned long long.
17090 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
17091 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
17092 rather than 1u << ix86_tune. Formatting fix.
17093 (ix86_option_override_internal): Change ix86_arch_mask from
17094 unsigned int to unsigned HOST_WIDE_INT, initialize to
17095 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
17096 (ix86_function_specific_restore): Likewise.
17097
17098 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17099
17100 PR target/84899
17101 * postreload.c (reload_combine_recognize_pattern): Perform
17102 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
17103 truncate_int_for_mode the result for the destination's mode.
17104
17105 PR c/84909
17106 * hsa-gen.c (mem_type_for_type): Fix comment typo.
17107 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
17108 Likewise.
17109 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17110 Likewise.
17111
17112 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
17113
17114 PR target/84876
17115 * lra-assigns.c (lra_split_hard_reg_for): Don't use
17116 regno_allocno_class_array and sorted_pseudos.
17117 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
17118 insns where regno is used.
17119
17120 2018-03-16 Martin Liska <mliska@suse.cz>
17121
17122 PR ipa/84833
17123 * multiple_target.c (create_dispatcher_calls): Redirect
17124 reference in the symbol table.
17125
17126 2018-03-16 Martin Liska <mliska@suse.cz>
17127
17128 PR ipa/84722
17129 * multiple_target.c (create_dispatcher_calls): Redirect also
17130 an alias.
17131
17132 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17133
17134 PR c++/79937
17135 PR c++/82410
17136 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
17137 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
17138 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
17139
17140 2018-03-16 Julia Koval <julia.koval@intel.com>
17141
17142 * doc/invoke.texi (Skylake Server): Add CLWB.
17143 Cannonlake): Remove CLWB.
17144
17145 2018-03-16 Jakub Jelinek <jakub@redhat.com>
17146
17147 PR tree-optimization/84841
17148 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
17149 1 << 3.
17150 (FLOAT_ONE_CONST_TYPE): Define.
17151 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
17152 (sort_by_operand_rank): Put entries with higher constant_type last
17153 rather than first to match comments.
17154
17155 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
17156
17157 * config/nios2/nios2.md (movsi_internal): Fix thinko in
17158 split predicate.
17159
17160 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17161
17162 PR c++/79085
17163 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
17164 check and use address of target always.
17165
17166 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
17167
17168 PR target/84574
17169 * config/i386/i386.c (indirect_thunk_needed): Update comments.
17170 (indirect_thunk_bnd_needed): Likewise.
17171 (indirect_thunks_used): Likewise.
17172 (indirect_thunks_bnd_used): Likewise.
17173 (indirect_return_needed): New.
17174 (indirect_return_bnd_needed): Likewise.
17175 (output_indirect_thunk_function): Add a bool argument for
17176 function return.
17177 (output_indirect_thunk_function): Don't generate alias for
17178 function return thunk.
17179 (ix86_code_end): Call output_indirect_thunk_function to generate
17180 function return thunks.
17181 (ix86_output_function_return): Set indirect_return_bnd_needed
17182 and indirect_return_needed instead of indirect_thunk_bnd_needed
17183 and indirect_thunk_needed.
17184
17185 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
17186
17187 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
17188 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
17189 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
17190
17191 2018-03-15 David Malcolm <dmalcolm@redhat.com>
17192 Paul Hua <paul.hua.gm@gmail.com>
17193
17194 PR c/84852
17195 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
17196
17197 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
17198
17199 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
17200 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
17201 resp. SFmode cases.
17202
17203 2018-03-15 Tamar Christina <tamar.christina@arm.com>
17204
17205 PR target/84711
17206 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17207 instead of GET_MODE_SIZE when comparing Units.
17208
17209 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
17210
17211 PR target/68256
17212 * varasm.c (hash_section): Return an unchangeble hash value
17213 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
17214 Return !aarch64_can_use_per_function_literal_pools_p ().
17215
17216 2018-03-15 Jakub Jelinek <jakub@redhat.com>
17217
17218 PR target/84860
17219 * optabs.c (emit_conditional_move): Pass address of cmode's copy
17220 rather than address of cmode as last argument to prepare_cmp_insn.
17221
17222 2018-03-15 Julia Koval <julia.koval@intel.com>
17223
17224 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
17225 F_AVX512VNNI, F_AVX512BITALG): New.
17226
17227 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
17228
17229 PR target/83451
17230 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
17231 insn for floating-point loads and stores.
17232
17233 2018-03-14 Carl Love <cel@us.ibm.com>
17234
17235 * config/rs6000/rs6000-c.c: Add macro definitions for
17236 ALTIVEC_BUILTIN_VEC_PERMXOR.
17237 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
17238 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
17239 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
17240 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
17241 UNSPEC_VPERMXOR.
17242 * config/doc/extend.texi: Add prototypes for vec_permxor.
17243
17244 2018-03-14 David Malcolm <dmalcolm@redhat.com>
17245
17246 PR c/84852
17247 * diagnostic-show-locus.c (class layout_point): Convert m_line
17248 from int to linenum_type.
17249 (line_span::comparator): Use linenum "compare" function when
17250 comparing line numbers.
17251 (test_line_span): New function.
17252 (layout_range::contains_point): Convert param "row" from int to
17253 linenum_type.
17254 (layout_range::intersects_line_p): Likewise.
17255 (layout::will_show_line_p): Likewise.
17256 (layout::print_source_line): Likewise.
17257 (layout::should_print_annotation_line_p): Likewise.
17258 (layout::print_annotation_line): Likewise.
17259 (layout::print_leading_fixits): Likewise.
17260 (layout::annotation_line_showed_range_p): Likewise.
17261 (struct line_corrections): Likewise for field m_row.
17262 (line_corrections::line_corrections): Likewise for param "row".
17263 (layout::print_trailing_fixits): Likewise.
17264 (layout::get_state_at_point): Likewise.
17265 (layout::get_x_bound_for_row): Likewise.
17266 (layout::print_line): Likewise.
17267 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
17268 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
17269 * input.c (selftest::test_linenum_comparisons): New function.
17270 (selftest::input_c_tests): Call it.
17271 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
17272 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
17273 * selftest.h (ASSERT_GT): New macro.
17274 (ASSERT_GT_AT): New macro.
17275 (ASSERT_LT): New macro.
17276 (ASSERT_LT_AT): New macro.
17277
17278 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
17279
17280 PR rtl-optimization/84780
17281 * combine.c (distribute_links): Don't make a link based on pc_rtx.
17282
17283 2018-03-14 Martin Liska <mliska@suse.cz>
17284
17285 * tree.c (record_node_allocation_statistics): Use
17286 get_stats_node_kind.
17287 (get_stats_node_kind): New function extracted from
17288 record_node_allocation_statistics.
17289 (free_node): Use get_stats_node_kind.
17290
17291 2018-03-14 Richard Biener <rguenther@suse.de>
17292
17293 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
17294 that the value-set of ANTIC_IN doesn't grow.
17295
17296 Revert
17297 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17298 member.
17299 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17300 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17301
17302 2018-03-14 Julia Koval <julia.koval@intel.com>
17303
17304 * config.gcc (icelake-client, icelake-server): New.
17305 (icelake): Remove.
17306 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
17307 (initial_ix86_arch_features): Ditto.
17308 (PTA_SKYLAKE): Add SGX.
17309 (PTA_ICELAKE): Remove.
17310 (PTA_ICELAKE_CLIENT): New.
17311 (PTA_ICELAKE_SERVER): New.
17312 (ix86_option_override_internal): Split up icelake on icelake client and
17313 icelake server.
17314 (get_builtin_code_for_version): Ditto.
17315 (fold_builtin_cpu): Ditto.
17316 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
17317 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
17318 * config/i386/i386.h (processor_type): Ditto.
17319 * doc/invoke.texi: Ditto.
17320
17321 2018-03-14 Jakub Jelinek <jakub@redhat.com>
17322
17323 PR sanitizer/83392
17324 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
17325 INTEGER_CST offset, add it together with bitpos / 8 and
17326 sign extend based on POINTER_SIZE.
17327
17328 PR target/84844
17329 Revert
17330 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
17331
17332 PR target/78090
17333 * config/i386/constraints.md (Yc): New register constraint.
17334 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
17335 Use Yc constraint for alternative 2 of operand 0. Remove
17336 preferred_for_speed attribute.
17337
17338 2018-03-14 Richard Biener <rguenther@suse.de>
17339
17340 PR tree-optimization/84830
17341 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17342 with the old one to avoid oscillations.
17343
17344 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
17345
17346 PR target/83712
17347 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17348 pseudos.
17349 (assign_by_spills): Return a flag of reload assignment failure.
17350 Do not process the reload assignment failures. Do not spill other
17351 reload pseudos if they has the same reg class. Update n if
17352 necessary.
17353 (lra_assign): Add a return arg. Set up from the result of
17354 assign_by_spills call.
17355 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17356 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17357 usage_insns if it is not NULL.
17358 (spill_hard_reg_in_range): New function.
17359 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17360 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17361 function prototypes.
17362 (lra_assign): Change prototype.
17363 * lra.c (lra): Add code to deal with fails by splitting hard reg
17364 live ranges.
17365
17366 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
17367
17368 * config/riscv/riscv.opt (mrelax): New option.
17369 * config/riscv/riscv.c (riscv_file_start): Emit ".option
17370 "norelax" when riscv_mrelax is disabled.
17371 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17372
17373 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17374
17375 PR target/84743
17376 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17377 reassociation for int modes.
17378
17379 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17380
17381 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17382 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17383 for big-endian.
17384 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17385 * config/aarch64/aarch64-sve.md
17386 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17387 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17388 (*extend<mode><Vwide>2): Rename to...
17389 (aarch64_sve_extend<mode><Vwide>2): ...this.
17390 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17391 renaming the old pattern to...
17392 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
17393 unsigned packs.
17394 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17395 define_expand, renaming the old pattern to...
17396 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17397 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17398 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17399 account when deciding which SVE instruction the optab should use.
17400 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17401
17402 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17403
17404 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17405 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17406 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17407 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17408 (tlsdesc_small_<mode>): Turn a define_expand and use
17409 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
17410 (tlsdesc_small_advsimd_<mode>): ...this.
17411 (tlsdesc_small_sve_<mode>): New pattern.
17412
17413 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17414
17415 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17416 (UNSPEC_UMUL_HIGHPART): New constants.
17417 (MUL_HIGHPART): New int iteraor.
17418 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17419 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17420 define_expand.
17421 (*<su>mul<mode>3_highpart): New define_insn.
17422
17423 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17424
17425 PR lto/84805
17426 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17427 incomplete types.
17428
17429 2018-03-13 Martin Liska <mliska@suse.cz>
17430
17431 PR ipa/84658.
17432 * (sem_item_optimizer::sem_item_optimizer): Initialize new
17433 vector.
17434 (sem_item_optimizer::~sem_item_optimizer): Release it.
17435 (sem_item_optimizer::merge_classes): Register variable aliases.
17436 (sem_item_optimizer::fixup_pt_set): New function.
17437 (sem_item_optimizer::fixup_points_to_sets): Likewise.
17438 * ipa-icf.h: Declare new variables and functions.
17439
17440 2018-03-13 Jakub Jelinek <jakub@redhat.com>
17441
17442 PR middle-end/84834
17443 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17444 integer_pow2p@2 and test integer_pow2p in condition.
17445 (A < 0 ? C : 0): Similarly for @1.
17446
17447 PR middle-end/84831
17448 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17449 characters starting at p contain '\0' character, don't look beyond
17450 that.
17451
17452 PR target/84827
17453 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17454 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17455
17456 PR target/84828
17457 * reg-stack.c (change_stack): Change update_end var from int to
17458 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17459 also call set_block_for_insn on the newly added insns and rescan.
17460
17461 PR target/84786
17462 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17463 on the last operand.
17464
17465 PR c++/84704
17466 * tree.c (stabilize_reference_1): Return save_expr (e) for
17467 STATEMENT_LIST even if it doesn't have side-effects.
17468
17469 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
17470
17471 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17472
17473 2018-03-12 Renlin Li <renlin.li@arm.com>
17474
17475 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17476 aarch64_output_scalar_simd_mov_immediate.
17477
17478 2018-03-12 Martin Sebor <msebor@redhat.com>
17479
17480 PR tree-optimization/83456
17481 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17482 for perfectly overlapping calls to memcpy.
17483 (gimple_fold_builtin_memory_chk): Same.
17484 (gimple_fold_builtin_strcpy): Handle no-warning.
17485 (gimple_fold_builtin_stxcpy_chk): Same.
17486 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17487
17488 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17489
17490 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17491 parameter. Use it for SFmode.
17492 (rs6000_function_arg_advance_1): Adjust.
17493 (rs6000_function_arg): Adjust.
17494 (rs6000_gimplify_va_arg): Pass false for that new parameter.
17495
17496 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17497
17498 PR rtl-optimization/84169
17499 PR rtl-optimization/84780
17500 * combine.c (can_combine_p): Check for a 2-insn combination whether
17501 the destination register is used between the two insns, too.
17502
17503 2018-03-12 Richard Biener <rguenther@suse.de>
17504
17505 PR tree-optimization/84803
17506 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17507 for refs DR analysis didn't process.
17508
17509 2018-03-12 Richard Biener <rguenther@suse.de>
17510
17511 PR tree-optimization/84777
17512 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17513 force-vectorize loops ignore whether we are optimizing for size.
17514
17515 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
17516
17517 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17518 (TARGET_MD_ASM_ADJUST): Define.
17519
17520 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
17521 Kito Cheng <kito.cheng@gmail.com>
17522 Chung-Ju Wu <jasonwucj@gmail.com>
17523
17524 * config/nds32/nds32.c (nds32_compute_stack_frame,
17525 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17526 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17527 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17528 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17529 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17530 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17531 * config/nds32/nds32.md (prologue, epilogue): Use macro
17532 NDS32_V3PUSH_AVAILABLE_P to do checking.
17533
17534 2018-03-11 Jakub Jelinek <jakub@redhat.com>
17535
17536 PR debug/58150
17537 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17538 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17539 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
17540 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
17541 addition of most attributes on !orig_type_die or the attribute not
17542 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17543
17544 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17545 Chung-Ju Wu <jasonwucj@gmail.com>
17546
17547 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17548 __NDS32_VH__ macro.
17549 * config/nds32/nds32.opt (mvh): New option.
17550
17551 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17552 Chung-Ju Wu <jasonwucj@gmail.com>
17553
17554 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17555 function.
17556 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17557 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17558 definition.
17559
17560 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17561 Chung-Ju Wu <jasonwucj@gmail.com>
17562
17563 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17564 function.
17565 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17566 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17567
17568 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17569 Kito Cheng <kito.cheng@gmail.com>
17570 Chung-Ju Wu <jasonwucj@gmail.com>
17571
17572 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17573 UNSPEC_FFMISM and UNSPEC_FLMISM.
17574 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17575 for ffb, ffmism and flmism.
17576 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17577 (unspec_ffmism): Ditto.
17578 (unspec_flmism): Ditto.
17579 (nds32_expand_builtin_impl): Check if string extension is available.
17580 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17581 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17582
17583 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17584
17585 Reverting patch:
17586 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17587
17588 PR target/83712
17589 * lra-assigns.c (assign_by_spills): Return a flag of reload
17590 assignment failure. Do not process the reload assignment
17591 failures. Do not spill other reload pseudos if they has the same
17592 reg class.
17593 (lra_assign): Add a return arg. Set up from the result of
17594 assign_by_spills call.
17595 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17596 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17597 usage_insns if it is not NULL.
17598 (spill_hard_reg_in_range): New function.
17599 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17600 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17601 function prototypes.
17602 (lra_assign): Change prototype.
17603 * lra.c (lra): Add code to deal with fails by splitting hard reg
17604 live ranges.
17605
17606 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17607
17608 PR target/84807
17609 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17610
17611 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17612
17613 PR debug/84620
17614 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17615 (dw_val_node): Add val_symbolic_view.
17616 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17617 (symview_upper_bound): New.
17618 (new_line_info_table): Initialize symviews_since_reset.
17619 (dwarf2out_source_line): Count symviews_since_reset and set
17620 symview_upper_bound.
17621 (dw_val_equal_p): Handle symview.
17622 (add_AT_symview): New.
17623 (print_dw_val): Handle symview.
17624 (attr_checksum, attr_checksum_ordered): Likewise.
17625 (same_dw_val_p, size_of_die): Likewise.
17626 (value_format, output_die): Likewise.
17627 (add_high_low_attributes): Use add_AT_symview for entry_view.
17628 (dwarf2out_finish): Reset symview_upper_bound, clear
17629 zero_view_p.
17630
17631 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17632
17633 PR target/83969
17634 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17635 Add strict argument and use it.
17636 (rs6000_split_multireg_move): Update for new strict argument.
17637 (mem_operand_gpr): Disallow all non-offsettable addresses.
17638 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17639
17640 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17641
17642 PR target/84772
17643 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17644 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17645 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17646
17647 PR c++/84767
17648 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17649 decl, use remap_type if we want to use the type.
17650
17651 2018-03-09 Martin Sebor <msebor@redhat.com>
17652
17653 PR tree-optimization/84526
17654 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17655 Remove dead code.
17656 (builtin_access::generic_overlap): Be prepared to handle non-array
17657 base objects.
17658
17659 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17660
17661 PR rtl-optimization/84682
17662 * lra-constraints.c (process_address_1): Check is_address flag
17663 for address constraints.
17664 (process_alt_operands): Likewise.
17665 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17666 preprocess_constraints.
17667 * recog.h (preprocess_constraints): Add oploc parameter.
17668 Adjust callers.
17669 * recog.c (preprocess_constraints): Test address_operand for
17670 CT_ADDRESS constraints.
17671
17672 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17673
17674 PR target/83712
17675 * lra-assigns.c (assign_by_spills): Return a flag of reload
17676 assignment failure. Do not process the reload assignment
17677 failures. Do not spill other reload pseudos if they has the same
17678 reg class.
17679 (lra_assign): Add a return arg. Set up from the result of
17680 assign_by_spills call.
17681 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17682 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17683 usage_insns if it is not NULL.
17684 (spill_hard_reg_in_range): New function.
17685 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17686 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17687 function prototypes.
17688 (lra_assign): Change prototype.
17689 * lra.c (lra): Add code to deal with fails by splitting hard reg
17690 live ranges.
17691
17692 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17693
17694 PR target/83193
17695 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17696 Accept complain bool parameter. Only emit errors if it is true.
17697 (arm_parse_cpu_option_name): Likewise.
17698 (arm_target_thumb_only): Adjust callers of the above.
17699 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17700 prototype to take a default true bool parameter.
17701 (arm_parse_arch_option_name): Likewise.
17702
17703 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17704 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17705
17706 PR jit/64089
17707 PR jit/84288
17708 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17709 * configure: Regenerate.
17710 * configure.ac ("linker --version-script option"): New.
17711 ("linker soname option"): New.
17712
17713 2018-03-09 Richard Biener <rguenther@suse.de>
17714
17715 PR tree-optimization/84775
17716 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17717 immediate uses of predicate stmts and mark them modified.
17718
17719 Revert
17720 PR tree-optimization/84178
17721 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17722 to caller.
17723 (version_loop_for_if_conversion): Delay update_ssa call.
17724 (tree_if_conversion): Delay update_ssa until after predicate
17725 insertion.
17726
17727 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17728
17729 PR target/84763
17730 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17731 when the function accesses prior frames.
17732
17733 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17734
17735 PR debug/84456
17736 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17737 gen_llsym, otherwise call maybe_gen_llsym.
17738
17739 PR inline-asm/84742
17740 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17741 has ',' character inside of it.
17742
17743 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17744
17745 PR target/84748
17746 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17747 as clobbering CC_REGNUM.
17748
17749 2018-03-08 Richard Biener <rguenther@suse.de>
17750
17751 PR middle-end/84552
17752 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17753 (follow_copies_to_constant): Do not follow SSA names registered
17754 for update.
17755
17756 2018-03-08 Richard Biener <rguenther@suse.de>
17757
17758 PR tree-optimization/84178
17759 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17760 to caller.
17761 (version_loop_for_if_conversion): Delay update_ssa call.
17762 (tree_if_conversion): Delay update_ssa until after predicate
17763 insertion.
17764
17765 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17766
17767 PR tree-optimization/84178
17768 * tree-if-conv.c (release_bb_predicate): Remove the
17769 the assertion that the stmts have NULL use_ops.
17770 Discard the statements, asserting that they haven't
17771 yet been added to a BB.
17772
17773 2018-03-08 Richard Biener <rguenther@suse.de>
17774
17775 PR tree-optimization/84746
17776 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17777 (phi_translate): Pass in destination ANTIC_OUT set.
17778 (phi_translate_1): Likewise. For a simplified result lookup
17779 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17780 (phi_translate_set): Adjust.
17781 (do_pre_regular_insertion): Likewise.
17782 (do_pre_partial_partial_insertion): Likewise.
17783
17784 2018-03-08 Martin Liska <mliska@suse.cz>
17785
17786 PR gcov-profile/84735
17787 * doc/gcov.texi: Document usage of profile files.
17788 * gcov-io.h: Document changes in the format.
17789
17790 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17791
17792 PR debug/84404
17793 PR debug/84408
17794 * dwarf2out.c (struct dw_line_info_table): Update comments for
17795 view == -1.
17796 (FORCE_RESET_NEXT_VIEW): New.
17797 (FORCE_RESETTING_VIEW_P): New.
17798 (RESETTING_VIEW_P): Check for -1 too.
17799 (ZERO_VIEW_P): Likewise.
17800 (new_line_info_table): Force-reset next view.
17801 (dwarf2out_begin_function): Likewise.
17802 (dwarf2out_source_line): Simplify zero_view_p initialization.
17803 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17804 view directly. Omit view when omitting .loc at line 0.
17805
17806 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17807
17808 PR tree-optimization/84740
17809 * tree-switch-conversion.c (process_switch): Call build_constructors
17810 only if info.phi_count is non-zero.
17811
17812 PR tree-optimization/84739
17813 * tree-tailcall.c (find_tail_calls): Check call arguments against
17814 DECL_ARGUMENTS (current_function_decl) rather than
17815 DECL_ARGUMENTS (func) when checking for tail recursion.
17816
17817 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17818
17819 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17820 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17821 Volker Reichelt's entry and add entries for people that perform
17822 GCC fuzzy testing and report numerous bugs.
17823
17824 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17825
17826 PR target/82411
17827 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17828 readonly data in sdata, if that is disabled.
17829 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17830 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17831 -mreadonly-in-sdata option.
17832
17833 2018-03-07 Martin Sebor <msebor@redhat.com>
17834
17835 PR tree-optimization/84468
17836 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17837 basic block when looking for nul assignment.
17838
17839 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17840
17841 PR target/84277
17842 * except.h (output_function_exception_table): Adjust prototype.
17843 * except.c (output_function_exception_table): Remove FNNAME parameter
17844 and add SECTION parameter. Ouput one part of the table at a time.
17845 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17846 the first part of the exception table and emit unwind directives.
17847 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17848 (i386_pe_seh_cold_init): Likewise.
17849 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17850 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17851 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17852 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17853 * config/i386/winnt.c: Include except.h.
17854 (struct seh_frame_state): Add reg_offset, after_prologue and
17855 in_cold_section fields.
17856 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17857 (i386_pe_seh_cold_init): New function.
17858 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17859 to seh->in_cold_section.
17860 (seh_emit_push): Record the offset of the push.
17861 (seh_emit_save): Record the offet of the save.
17862 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17863 Test seh->after_prologue to disregard the epilogue.
17864 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17865 (i386_pe_end_cold_function): New function.
17866
17867 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17868
17869 PR fortran/84565
17870 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17871 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17872
17873 PR c++/84704
17874 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17875 on tmp_var.
17876 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17877 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17878
17879 PR middle-end/84723
17880 * multiple_target.c: Include tree-inline.h and intl.h.
17881 (expand_target_clones): Diagnose and fail if node->definition and
17882 !tree_versionable_function_p (node->decl).
17883
17884 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17885
17886 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17887 sprint_ul.
17888 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17889 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17890 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17891
17892 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17893
17894 PR target/84710
17895 * combine.c (try_combine): Use reg_or_subregno instead of handling
17896 just paradoxical SUBREGs and REGs.
17897
17898 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17899
17900 * config/arc/arc.c (arc_finalize_pic): Remove function.
17901 (arc_must_save_register): We use single base PIC register, remove
17902 checks to save/restore the PIC register.
17903 (arc_expand_prologue): Likewise.
17904 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17905 Remove.
17906 (arc_verify_short): Likewise.
17907 (arc_attr_type): Likewise.
17908 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17909 (walk_stores): Likewise.
17910 (arc_address_cost): Make it static.
17911 (arc_verify_short): Likewise.
17912 (branch_dest): Likewise.
17913 (arc_attr_type): Likewise.
17914 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17915 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17916 (arc_final_prescan_insn): Remove inserting the nops due to
17917 hardware hazards. It is done in reorg step.
17918 (insn_length_variant_t): Remove.
17919 (insn_length_parameters_t): Likewise.
17920 (arc_insn_length_parameters): Likewise.
17921 (arc_get_insn_variants): Likewise.
17922 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17923
17924 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17925
17926 PR inline-asm/84683
17927 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17928 assertion failure.
17929
17930 PR tree-optimization/84687
17931 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17932 on new_node->decl.
17933 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17934
17935 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17936
17937 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17938 Rename to ppc_speculation_barrier.
17939 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17940 __builtin_ppc_speculation_barrier.
17941
17942 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17943
17944 PR target/84700
17945 * combine.c (combine_simplify_rtx): Don't try to simplify if
17946 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17947 are equal to x.
17948
17949 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17950
17951 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17952 to 32 bytes when compiling for POWER9.
17953
17954 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17955
17956 PR target/84564
17957 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17958 regparm >= 3 with no arg reg available also for calls with
17959 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17960
17961 PR target/84524
17962 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17963 orig,vex.
17964 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17965
17966 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17967
17968 PR target/84264
17969 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17970
17971 2018-03-05 Richard Biener <rguenther@suse.de>
17972
17973 PR tree-optimization/84486
17974 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17975 When inserting a __builtin_assume_aligned call set the LHS
17976 SSA name alignment info accordingly.
17977
17978 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17979
17980 PR tree-optimization/84114
17981 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17982 Avoid reassociation of FLOAT_MODE addition.
17983
17984 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17985
17986 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17987 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17988 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17989 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17990 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17991 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17992 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17993 and -mwbnoinvd.
17994 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17995 __builtin_ia32_wbinvd): New builtins.
17996 (SPECIAL_ARGS2): New.
17997 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17998 (SPECIAL_ARGS2): New.
17999 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
18000 (ix86_valid_target_attribute_inner_p): Ditto.
18001 (ix86_init_mmx_sse_builtins): Add special_args2.
18002 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
18003 TARGET_WBNOINVD_P): New.
18004 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
18005 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
18006 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
18007 * config/i386/immintrin.h (_wbinvd): New intrinsic.
18008 * config/i386/pconfigintrin.h: New file.
18009 * config/i386/wbnoinvdintrin.h: Ditto.
18010 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
18011 wbnoinvdintrin.h.
18012 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
18013
18014 2018-03-05 Richard Biener <rguenther@suse.de>
18015
18016 PR tree-optimization/84670
18017 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18018 member.
18019 (BB_VISITED_WITH_VISITED_SUCCS): New define.
18020 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18021 (compute_antic_aux): Only assert the number of values in ANTIC_IN
18022 doesn't grow if all successors (recursively) were visited at least
18023 once.
18024
18025 2018-03-05 Richard Biener <rguenther@suse.de>
18026
18027 PR tree-optimization/84650
18028 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
18029 if executed in the loop pipeline.
18030
18031 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
18032
18033 * doc/configfiles.texi (Configuration Files): Move info about
18034 conditionalizing $target-protos.h to...
18035 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
18036 differs from $target-protos.h.
18037
18038 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
18039 Chung-Ju Wu <jasonwucj@gmail.com>
18040
18041 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
18042 * config/nds32/nds32-multiple.md (setmemsi): Define.
18043 * config/nds32/nds32-memory-manipulation.c
18044 (nds32_gen_dup_4_byte_to_word_value): New.
18045 (emit_setmem_word_loop): New.
18046 (emit_setmem_byte_loop): New.
18047 (nds32_expand_setmem_loop): New.
18048 (nds32_expand_setmem_loop_v3m): New.
18049 (nds32_expand_setmem_unroll): New.
18050 (nds32_expand_setmem): New.
18051
18052 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18053 Chung-Ju Wu <jasonwucj@gmail.com>
18054
18055 * config/nds32/nds32-memory-manipulation.c
18056 (nds32_emit_load_store): New.
18057 (nds32_emit_post_inc_load_store): New.
18058 (nds32_emit_mem_move): New.
18059 (nds32_emit_mem_move_block): New.
18060 (nds32_expand_movmemsi_loop_unknown_size): New.
18061 (nds32_expand_movmemsi_loop_known_size): New.
18062 (nds32_expand_movmemsi_loop): New.
18063 (nds32_expand_movmemsi_unroll): New.
18064 (nds32_expand_movmemqi): Rename ...
18065 (nds32_expand_movmemsi): ... to this.
18066 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
18067 (movmemsi): ... to this.
18068 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
18069 (nds32_expand_movmemsi): ... to this.
18070
18071 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18072 Monk Chiang <sh.chiang04@gmail.com>
18073 Chung-Ju Wu <jasonwucj@gmail.com>
18074
18075 * config/nds32/nds32-protos.h
18076 (nds32_expand_load_multiple): New arguments.
18077 (nds32_expand_store_multiple): Ditto.
18078 (nds32_valid_multiple_load_store): Rename ...
18079 (nds32_valid_multiple_load_store_p): ... to this.
18080 * config/nds32/nds32-memory-manipulation.c
18081 (nds32_expand_load_multiple): Refine implementation.
18082 (nds32_expand_store_multiple): Ditto.
18083 * config/nds32/nds32-multiple.md
18084 (load_multiple): Update nds32_expand_load_multiple interface.
18085 (store_multiple): Update nds32_expand_store_multiple interface.
18086 * config/nds32/nds32-predicates.c
18087 (nds32_valid_multiple_load_store): Rename ...
18088 (nds32_valid_multiple_load_store_p): ... to this and refine
18089 implementation.
18090 * config/nds32/predicates.md
18091 (nds32_load_multiple_and_update_address_operation): New predicate.
18092 (nds32_store_multiple_and_update_address_operation): New predicate.
18093
18094 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
18095 Chung-Ju Wu <jasonwucj@gmail.com>
18096
18097 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
18098 (combo): New attribute.
18099 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
18100
18101 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
18102
18103 * config/nds32/nds32.opt: Change -mcmodel= default value.
18104
18105 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
18106 Monk Chiang <sh.chiang04@gmail.com>
18107 Chung-Ju Wu <jasonwucj@gmail.com>
18108
18109 * config/nds32/constants.md (unspec_element): New enum.
18110 * config/nds32/constraints.md (Umw): New constraint.
18111 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
18112 * config/nds32/nds32-intrinsic.md: Likewise.
18113 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
18114 (nds32_valid_smw_lwm_base_p): New.
18115 (nds32_output_smw_single_word): New.
18116 (nds32_output_lmw_single_word): New.
18117 (nds32_expand_unaligned_load): New.
18118 (nds32_expand_unaligned_store): New.
18119 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
18120 (nds32_output_smw_single_word): Declare.
18121 (nds32_output_lmw_single_word): Declare.
18122 (nds32_expand_unaligned_load): Declare.
18123 (nds32_expand_unaligned_store): Declare.
18124 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
18125 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
18126 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
18127 NDS32_BUILTIN_UASTORE_DW.
18128 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
18129 predicate.
18130
18131 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
18132 Kito Cheng <kito.cheng@gmail.com>
18133 Chung-Ju Wu <jasonwucj@gmail.com>
18134
18135 * config/nds32/nds32-intrinsic.c
18136 (nds32_expand_builtin_null_ftype_reg): Delete.
18137 (nds32_expand_builtin_reg_ftype_imm): Ditto.
18138 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
18139 (nds32_read_argument): New.
18140 (nds32_legitimize_target): Ditto.
18141 (nds32_legitimize_argument): Ditto.
18142 (nds32_check_constant_argument): Ditto.
18143 (nds32_expand_unop_builtin): Ditto.
18144 (nds32_expand_unopimm_builtin): Ditto.
18145 (nds32_expand_binop_builtin): Ditto.
18146 (nds32_builtin_decl_impl): Ditto.
18147 (builtin_description): Ditto.
18148 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
18149 (nds32_init_builtins_impl): Ditto.
18150 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
18151 (nds32_builtin_decl): New.
18152 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
18153 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
18154
18155 2018-03-02 Jeff Law <law@redhat.com>
18156
18157 * reorg.c (stop_search_p): Handle DEBUG_INSN.
18158 (redundant_insn, fill_simple_delay_slots): Likewise.
18159 (fill_slots_from_thread): Likewise.
18160 * resource.c (mark_referenced_resources): Likewise.
18161 (mark_set_resources, find_dead_or_set_registers): Likewise.
18162
18163 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18164
18165 * substring-locations.h (format_warning_va): Formatting fix for
18166 ATTRIBUTE_GCC_DIAG.
18167 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
18168 argument.
18169 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
18170 * substring-locations.c: Include intl.h.
18171 (format_warning_va): Turned into small wrapper around
18172 format_warning_n_va, renamed to ...
18173 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
18174 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
18175 use ngettext.
18176 (format_warning_at_substring_n): New function.
18177 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
18178 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
18179 format_warning_at_substring with just a shorter name instead of
18180 const function pointer.
18181 (fmtwarn_n): New function.
18182 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
18183 appropriate, get rid of all the fmtstr temporaries, move conditionals
18184 with G_() wrapped string literals directly into fmtwarn arguments,
18185 cast dir.len to (int), formatting fixes.
18186
18187 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
18188
18189 * doc/invoke.texi: Remove "Cilk Plus" references.
18190
18191 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18192 Richard Biener <rguenther@suse.de>
18193
18194 PR ipa/84628
18195 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
18196 for error or warning attributes if CALL_FROM_THUNK_P is set.
18197 Formatting fixes.
18198
18199 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18200
18201 PR target/56540
18202 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
18203 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
18204
18205 PR target/56540
18206 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
18207 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
18208
18209 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
18210 instead of -1U in last predictors element's probability member.
18211
18212 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18213
18214 PR ipa/83983
18215 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18216 arguments if they are comparable.
18217
18218 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18219
18220 PR tree-optimization/84634
18221 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
18222 masks and masked_loop_p with a single loop_masks, making sure it's
18223 null for bb vectorization.
18224
18225 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
18226
18227 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
18228 (vect_analyze_data_ref_access): Use loop->safe_len rather than
18229 loop->force_vectorize to check whether there is no alias.
18230
18231 2018-03-02 Jakub Jelinek <jakub@redhat.com>
18232
18233 PR target/84614
18234 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
18235 prototypes.
18236 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
18237 comments.
18238 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
18239 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
18240 instead of a loop around prev_real_insn.
18241 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
18242 prev_real_insn.
18243
18244 PR inline-asm/84625
18245 * config/i386/i386.c (ix86_print_operand): Use conditional
18246 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
18247 zero vector.
18248
18249 2018-03-02 Richard Biener <rguenther@suse.de>
18250
18251 PR tree-optimization/84427
18252 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
18253 (bitmap_set_subtract_values): Rewrite to handle multiple
18254 exprs per value.
18255 (clean): Likewise.
18256 (prune_clobbered_mems): Likewise.
18257 (phi_translate): Take edge instead of pred/phiblock.
18258 (phi_translate_1): Likewise.
18259 (phi_translate_set): Likewise. Insert all translated
18260 exprs for a value into the set, keeping possibly multiple
18261 expressions per value.
18262 (compute_antic_aux): Adjust for phi_translate changes.
18263 When intersecting union the expressions and prune those
18264 not in the final value set, keeping possibly multiple
18265 expressions per value. Do not use value-insertion
18266 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
18267 all expressions. Add verification that the value-sets
18268 only shrink during iteration.
18269 (compute_partial_antic_aux): Adjust for the phi_translate changes.
18270 (do_pre_regular_insertion): Likewise.
18271 (do_pre_partial_partial_insertion): Likewise.
18272
18273 2018-03-02 Richard Biener <rguenther@suse.de>
18274
18275 PR target/82005
18276 * config/darwin.c (saved_debug_info_level): New static global.
18277 (darwin_asm_lto_start): Disable debug info generation for LTO out.
18278 (darwin_asm_lto_end): Restore debug info generation settings.
18279
18280 2018-03-01 Martin Liska <mliska@suse.cz>
18281
18282 PR sanitizer/82484
18283 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
18284 volatile arguments.
18285
18286 2018-03-01 Richard Biener <rguenther@suse.de>
18287
18288 PR debug/84645
18289 * dwarf2out.c (gen_variable_die): Properly handle late VLA
18290 type annotation with LTO when debug was disabled at compile-time.
18291
18292 2018-03-01 Matthew Fortune <mfortune@gmail.com>
18293
18294 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
18295 XINT with INTVAL.
18296 (mips_final_postscan_insn): Likewise.
18297
18298 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
18299
18300 PR rtl-optimization/84528
18301 * alias.c (init_alias_target): Add commentary.
18302 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
18303 a unique base value if the frame pointer is not eliminated
18304 to the stack pointer.
18305
18306 2018-03-01 Tom de Vries <tom@codesourcery.com>
18307
18308 PR rtl-optimization/83327
18309 * lra-int.h (hard_regs_spilled_into): Declare.
18310 * lra.c (hard_regs_spilled_into): Define.
18311 (init_reg_info): Init hard_regs_spilled_into.
18312 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
18313 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
18314 (process_bb_lives): Handle hard_regs_spilled_into.
18315 (lra_create_live_ranges_1): Before doing liveness propagation, clear
18316 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
18317
18318 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
18319
18320 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
18321 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
18322 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
18323 * config/rs6000/aix72.h: New file.
18324
18325 2018-02-28 Jakub Jelinek <jakub@redhat.com>
18326
18327 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
18328 instead of warning_at with conditional singular and plural messages
18329 where possible.
18330
18331 PR target/52991
18332 * stor-layout.c (update_alignment_for_field): For
18333 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
18334 && !DECL_PACKED (field), do the alignment update, just use
18335 only desired_align instead of MAX (type_align, desired_align)
18336 as the alignment.
18337 (place_field): Don't do known_align < desired_align handling
18338 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
18339 is non-NULL, instead do it after rli->prev_field handling and
18340 only if not within a bitfield word. For DECL_PACKED (field)
18341 use type_align of BITS_PER_UNIT.
18342
18343 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
18344
18345 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18346 superfluous parentheses and trailing spaces.
18347
18348 2018-02-28 Richard Biener <rguenther@suse.de>
18349
18350 PR tree-optimization/84584
18351 * graphite-scop-detection.c (scop_detection::add_scop): Discard
18352 SCoPs with fake exit edge.
18353
18354 2018-02-28 Martin Liska <mliska@suse.cz>
18355
18356 PR testsuite/84597
18357 * timevar.c (timer::print): Fix format to properly print 100%
18358 values.
18359
18360 2018-02-28 Richard Biener <rguenther@suse.de>
18361
18362 PR middle-end/84607
18363 * genmatch.c (capture_info::walk_match): Do not mark
18364 captured expressions without operands as expr_p given
18365 they act more like predicates and should be subject to
18366 "lost tail" side-effect preserving.
18367
18368 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
18369
18370 PR rtl-optimization/81611
18371 * auto-inc-dec.c (attempt_change): Move dead note from
18372 mem_insn if it's the next use of regno
18373 (find_address): Take address use of reg holding
18374 non-incremented value. Add parm to limit search to the named
18375 reg only.
18376 (merge_in_block): Attempt to use a mem insn that is the next
18377 use of the original regno.
18378
18379 2018-02-27 Martin Sebor <msebor@redhat.com>
18380
18381 PR c++/83871
18382 * doc/invoke.texi (-Wmissing-attributes): New option.
18383 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18384
18385 2018-02-27 Martin Sebor <msebor@redhat.com>
18386
18387 PR translation/84207
18388 * diagnostic-core.h (warning_n, error_n, inform_n): Change
18389 n argument to unsigned HOST_WIDE_INT.
18390 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18391 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
18392 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18393 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18394
18395 2018-02-27 Richard Biener <rguenther@suse.de>
18396
18397 PR tree-optimization/84512
18398 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18399 Do not use the estimate returned from record_stmt_cost for
18400 the scalar iteration cost but sum properly using add_stmt_cost.
18401
18402 2018-02-27 Richard Biener <rguenther@suse.de>
18403
18404 PR tree-optimization/84466
18405 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18406 Adjust last change to less strictly validate use operands.
18407
18408 2018-02-27 Martin Liska <mliska@suse.cz>
18409
18410 PR gcov-profile/84548
18411 * gcov.c (process_file): Allow partial overlap and consider it
18412 also as group functions.
18413 (output_lines): Properly calculate range of lines for a group.
18414
18415 2018-02-27 Martin Liska <mliska@suse.cz>
18416
18417 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18418 'ggc' suffixes. Change first column width.
18419 (timer::print): Fix formatting of the column.
18420
18421 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
18422
18423 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18424 preserve inline entry blocks for the sake of debug inline
18425 entry point markers alone.
18426 (remove_unused_locals): Suggest in comments a better place to
18427 force the preservation of inline entry blocks that are
18428 otherwise unused, but do not preserve them.
18429
18430 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18431
18432 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18433
18434 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18435
18436 PR target/84039
18437 * config/i386/constraints.md (Bs): Replace
18438 ix86_indirect_branch_register with
18439 TARGET_INDIRECT_BRANCH_REGISTER.
18440 (Bw): Likewise.
18441 * config/i386/i386.md (indirect_jump): Likewise.
18442 (tablejump): Likewise.
18443 (*sibcall_memory): Likewise.
18444 (*sibcall_value_memory): Likewise.
18445 Peepholes of indirect call and jump via memory: Likewise.
18446 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18447 (*sibcall_value_GOT_32): Likewise.
18448 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18449 (GOT_memory_operand): Likewise.
18450 (call_insn_operand): Likewise.
18451 (sibcall_insn_operand): Likewise.
18452 (GOT32_symbol_operand): Likewise.
18453 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18454
18455 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18456
18457 PR rtl-optimization/83496
18458 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18459 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
18460 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18461 redundant insn, if any.
18462 (relax_delay_slots): Likewise.
18463 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18464
18465 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
18466
18467 PR tree-optimization/83965
18468 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18469 that grouped statements are part of a reduction chain. Return
18470 true if the statement is not marked as a reduction itself but
18471 is part of a group.
18472 (vect_recog_dot_prod_pattern): Don't check whether the statement
18473 is part of a group here.
18474 (vect_recog_sad_pattern): Likewise.
18475 (vect_recog_widen_sum_pattern): Likewise.
18476
18477 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18478
18479 PR debug/84545
18480 * final.c (rest_of_clean_state): Also look for calls inside sequences.
18481
18482 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18483
18484 PR target/84530
18485 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18486 the bool argument.
18487 (ix86_output_indirect_function_return): New prototype.
18488 (ix86_split_simple_return_pop_internal): Likewise.
18489 * config/i386/i386.c (indirect_return_via_cx): New.
18490 (indirect_return_via_cx_bnd): Likewise.
18491 (indirect_thunk_name): Handle return va CX_REG.
18492 (output_indirect_thunk_function): Create alias for
18493 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18494 (ix86_output_indirect_jmp): Remove the bool argument.
18495 (ix86_output_indirect_function_return): New function.
18496 (ix86_split_simple_return_pop_internal): Likewise.
18497 * config/i386/i386.md (*indirect_jump): Don't pass false
18498 to ix86_output_indirect_jmp.
18499 (*tablejump_1): Likewise.
18500 (simple_return_pop_internal): Change it to define_insn_and_split.
18501 Call ix86_split_simple_return_pop_internal to split it for
18502 -mfunction-return=.
18503 (simple_return_indirect_internal): Call
18504 ix86_output_indirect_function_return instead of
18505 ix86_output_indirect_jmp.
18506
18507 2018-02-26 Jakub Jelinek <jakub@redhat.com>
18508
18509 PR bootstrap/84405
18510 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18511 memset and value initialization afterwards.
18512
18513 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
18514
18515 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18516
18517 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18518
18519 PR target/84521
18520 * common/config/aarch64/aarch64-common.c
18521 (aarch_option_optimization_table[]): Switch
18522 off fomit-frame-pointer
18523
18524 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18525 Chung-Ju Wu <jasonwucj@gmail.com>
18526
18527 * config/nds32/nds32-multiple.md (load_multiple): Disallow
18528 volatile memory.
18529 (store_multiple): Ditto.
18530
18531 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18532
18533 * config.gcc: Add --with-cpu support for nds32 target.
18534 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18535 * config/nds32/nds32.opt: Add -mcpu= option.
18536
18537 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
18538
18539 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18540 isel=yes): Warn for these deprecated options.
18541
18542 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
18543
18544 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18545 ISA_2_5_MASKS_EMBEDDED.
18546
18547 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18548
18549 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18550 p->max as pointers rather than using iterative_hash_expr.
18551
18552 2018-02-23 Carl Love <cel@us.ibm.com>
18553
18554 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18555 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18556 BU_P8V_OVERLOAD_2.
18557 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18558 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18559 P8V_BUILTIN_VEC_VUNSIGNED2.
18560
18561 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18562
18563 PR target/81572
18564 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18565 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18566 LRA_UNKNOWN_ALT.
18567 * lra-constraints.c (curr_insn_transform): Set up
18568 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18569 LRA_UNKNOWN_ALT.
18570 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18571 * lra-eliminations.c (spill_pseudos): Ditto.
18572 (process_insn_for_elimination): Ditto.
18573 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18574 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18575 LRA_NON_CLOBBERED_ALT.
18576
18577 2018-02-22 Martin Sebor <msebor@redhat.com>
18578
18579 PR tree-optimization/84480
18580 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18581 to maybe_diag_stxncpy_trunc. Call it.
18582 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18583 from gimple_fold_builtin_strcpy. Print inlining stack.
18584 (handle_builtin_stxncpy): Print inlining stack.
18585 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18586
18587 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18588
18589 PR target/84176
18590 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18591 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18592 and -fcheck-pointer-bounds are used together.
18593 (indirect_thunk_prefix): New enum.
18594 (indirect_thunk_need_prefix): New function.
18595 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18596 "_nt" instead of "_bnd" for NOTRACK prefix.
18597 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18598 (output_indirect_thunk_function): Likewise.
18599 (): Likewise.
18600 (ix86_code_end): Update output_indirect_thunk_function calls.
18601 (ix86_output_indirect_branch_via_reg): Replace
18602 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18603 (ix86_output_indirect_branch_via_push): Likewise.
18604 (ix86_output_function_return): Likewise.
18605 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18606 incompatible with -fcf-protection=branch and
18607 -fcheck-pointer-bounds.
18608
18609 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18610
18611 PR target/83335
18612 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18613 Change gcc_assert call to output_operand_lossage.
18614
18615 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18616
18617 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18618
18619 2018-02-22 DJ Delorie <dj@redhat.com>
18620 Sebastian Perta <sebastian.perta@renesas.com>
18621 Oleg Endo <olegendo@gcc.gnu.org>
18622
18623 * config/rx/rx.c (rx_rtx_costs): New function.
18624 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18625
18626 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18627
18628 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18629
18630 2018-02-22 Martin Liska <mliska@suse.cz>
18631
18632 PR driver/83193
18633 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18634 Add "native" as a possible value.
18635
18636 2018-02-22 Martin Liska <mliska@suse.cz>
18637
18638 PR driver/83193
18639 * config/i386/i386.c (ix86_option_override_internal):
18640 Add "native" as a possible value for -march and -mtune.
18641
18642 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18643
18644 PR target/84502
18645 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18646 to all type variants.
18647
18648 PR tree-optimization/84503
18649 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18650 width as info->bitpos + info->bitsize - start.
18651 (merged_store_group::merge_overlapping): Simplify width computation.
18652 (check_no_overlap): New function.
18653 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18654 start + width and last_order of the group, fail if check_no_overlap
18655 fails.
18656 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18657 to group if check_no_overlap fails.
18658
18659 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18660
18661 * config/rs6000/altivec.md: Delete contraint arguments to
18662 define_expand, define_split, and define_peephole2, and in
18663 define_insn_and_split if always unused.
18664 * config/rs6000/darwin.md: Ditto.
18665 * config/rs6000/dfp.md: Ditto.
18666 * config/rs6000/rs6000.md: Ditto.
18667 * config/rs6000/sync.md: Ditto.
18668 * config/rs6000/vector.md: Ditto.
18669 * config/rs6000/vsx.md: Ditto.
18670
18671 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18672
18673 * config/rs6000/altivec.md: Write output control strings as braced
18674 blocks instead of double-quoted strings.
18675 * config/rs6000/darwin.md: Ditto.
18676 * config/rs6000/rs6000.md: Ditto.
18677 * config/rs6000/vector.md: Ditto.
18678 * config/rs6000/vsx.md: Ditto.
18679
18680 2018-02-21 Jason Merrill <jason@redhat.com>
18681
18682 PR c++/84314 - ICE with templates and fastcall attribute.
18683 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18684
18685 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18686
18687 * ipa-cp.c (determine_versionability): Fix comment typos.
18688
18689 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18690
18691 PR c/84229
18692 * ipa-cp.c (determine_versionability): Do not version functions caling
18693 va_arg_pack.
18694
18695 2018-02-21 Martin Liska <mliska@suse.cz>
18696
18697 PR driver/83193
18698 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18699 Add "native" as a possible value.
18700 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18701 the macro when native cpu detection is available.
18702
18703 2018-02-21 Martin Liska <mliska@suse.cz>
18704
18705 PR driver/83193
18706 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18707 Add "native" as a possible value.
18708 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18709 when native cpu detection is available.
18710
18711 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18712 Martin Sebor <msebor@redhat.com>
18713
18714 PR tree-optimization/84478
18715 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18716 false.
18717 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18718 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18719 support which is conservatively correct, for 2 only stay conservative
18720 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18721 argument to the 2 argument get_range_strlen, adjust 6 arg
18722 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18723 false.
18724 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18725 (gimple_fold_builtin_strlen): Pass true as last argument to
18726 get_range_strlen.
18727
18728 2018-02-20 Martin Sebor <msebor@redhat.com>
18729
18730 PR middle-end/84095
18731 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18732 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18733 (builtin_memref::builtin_memref): Factor out parts into
18734 set_base_and_offset and call it.
18735
18736 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18737
18738 PR middle-end/84406
18739 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18740 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18741 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18742 search at the associated MODE_INT.
18743
18744 2018-02-20 Jeff Law <law@redhat.com>
18745
18746 PR middle-end/82123
18747 PR tree-optimization/81592
18748 PR middle-end/79257
18749 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18750 for range data rather than using global data.
18751 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18752 range data rather than using global data.
18753 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18754 pass it to children as needed.
18755 (struct directive::fmtresult): Similarly.
18756 (struct directive::set_width): Similarly.
18757 (struct directive::set_precision): Similarly.
18758 (format_integer, format_directive, parse_directive): Similarly.
18759 (format_none): Accept unnamed vr_values parameter.
18760 (format_percent, format_floating, format_character): Similarly.
18761 (format_string, format_plain): Similarly.
18762 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18763 the EVRP range analyzer for range data rather than using global data.
18764 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18765 gimple-ssa-evrp-analyze.h
18766 (class sprintf_dom_walker): Add after_dom_children member function.
18767 Add evrp_range_analyzer member.
18768 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18769 range analyzer as needed.
18770 (sprintf_dom_walker::after_dom_children): New member function.
18771 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18772 if not optimizing.
18773 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18774 (evrp_range_analyzer::pop_to_marker): Likewise.
18775
18776 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18777
18778 PR tree-optimization/84419
18779 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18780 with the required type if its current type is compatible but
18781 different.
18782
18783 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18784
18785 PR middle-end/82004
18786 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18787 after vectorization.
18788
18789 2018-02-20 Martin Liska <mliska@suse.cz>
18790
18791 PR driver/83193
18792 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18793 possible values if we don't have a hint.
18794
18795 2018-02-20 Martin Liska <mliska@suse.cz>
18796
18797 PR c/84310
18798 PR target/79747
18799 * final.c (shorten_branches): Build align_tab array with one
18800 more element.
18801 * opts.c (finish_options): Add alignment option limit check.
18802 (MAX_CODE_ALIGN): Likewise.
18803 (MAX_CODE_ALIGN_VALUE): Likewise.
18804 * doc/invoke.texi: Document maximum allowed option value for
18805 all -falign-* options.
18806
18807 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18808
18809 PR target/84146
18810 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18811 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18812 * var-tracking.c (emit_note_insn_var_location): Remove all references
18813 to NOTE_INSN_CALL_ARG_LOCATION.
18814 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18815 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18816 Use copy_rtx_if_shared.
18817 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18818 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18819 (dwarf2out_var_location): Remove handling of
18820 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18821 on call_insn.
18822 * final.c (final_scan_insn): Remove all references to
18823 NOTE_INSN_CALL_ARG_LOCATION.
18824 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18825 before dumping final insns.
18826 * except.c (emit_note_eh_region_end): Remove all references to
18827 NOTE_INSN_CALL_ARG_LOCATION.
18828 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18829 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18830 * config/arc/arc.c (hwloop_optimize): Likewise.
18831 * config/arm/arm.c (create_fix_barrier): Likewise.
18832 * config/s390/s390.c (s390_chunkify_start): Likewise.
18833 * config/sh/sh.c (find_barrier): Likewise.
18834 * config/i386/i386.c (rest_of_insert_endbranch,
18835 ix86_seh_fixup_eh_fallthru): Likewise.
18836 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18837 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18838 * config/frv/frv.c (frv_function_prologue): Likewise.
18839 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18840 reg note.
18841 (note_outside_basic_block_p): Remove all references to
18842 NOTE_INSN_CALL_ARG_LOCATION.
18843 * gengtype.c (adjust_field_rtx_def): Likewise.
18844 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18845 Likewise.
18846 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18847 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18848
18849 PR c++/84444
18850 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18851 is ADDR_EXPR.
18852
18853 PR tree-optimization/84452
18854 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18855 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18856 is NULL.
18857
18858 2018-02-19 Martin Liska <mliska@suse.cz>
18859
18860 PR sanitizer/82183
18861 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18862
18863 2018-02-19 Martin Liska <mliska@suse.cz>
18864 Richard Sandiford <richard.sandiford@linaro.org>
18865
18866 PR tree-optimization/82491
18867 * gimple-fold.c (get_base_constructor): Make earlier bail out
18868 to prevent ubsan.
18869
18870 2018-02-19 Carl Love <cel@us.ibm.com>
18871
18872 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18873 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18874 BU_P8V_OVERLOAD_1.
18875 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18876 P8V_BUILTIN_VEC_NEG.
18877
18878 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18879
18880 * config/rl78/rl78.md (movdf): New define expand.
18881
18882 2018-02-19 Martin Liska <mliska@suse.cz>
18883
18884 PR other/80589
18885 * doc/invoke.texi: Fix typo.
18886 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18887
18888 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18889
18890 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18891 handle rs6000_single_float and rs6000_double_float specially for
18892 e500 family CPUs.
18893
18894 2018-02-16 Jeff Law <law@redhat.com>
18895
18896 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18897 (pop_regs): Use it.
18898
18899 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18900
18901 PR ipa/84425
18902 * ipa-inline.c (inline_small_functions): Fix a typo.
18903
18904 2018-02-16 Nathan Sidwell <nathan@acm.org>
18905
18906 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18907
18908 2018-02-16 Carl Love <cel@us.ibm.com>
18909
18910 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18911 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18912 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18913 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18914 expansion to P8V_BUILTIN_VEC_FLOAT2.
18915
18916 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18917
18918 PR rtl-optimization/70023
18919 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18920 src_regno into account.
18921
18922 2018-02-16 Carl Love <cel@us.ibm.com>
18923
18924 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18925 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18926 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18927 * config/rs6000/rs6000.c: Remove case statements for
18928 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18929 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18930 and P9V_BUILTIN_VEC_VINSERT4B.
18931 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18932 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18933 * config/rs6000/vsx.md:
18934 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18935 vec_insert4b.
18936
18937 2018-02-16 Carl Love <cel@us.ibm.com>
18938
18939 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18940 vec_insert4b.
18941 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18942 definitions.
18943 * config/rs6000/rs6000-c.c: Add the definitions for
18944 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18945 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18946 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18947 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18948 definition for insert4b and define insn *insert3b_internal.
18949 * doc/extend.texi: Add documentation for vec_extract4b.
18950
18951 2018-02-16 Nathan Sidwell <nathan@acm.org>
18952
18953 * doc/extend.texi (Backwards Compatibility): Mention friend
18954 injection. Note for-scope is deprecated.
18955 * doc/invoke.texi (-ffriend-injection): Deprecate.
18956
18957 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18958
18959 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18960 that moved to I2, also allow destinations that are a paradoxical
18961 subreg (instead of a normal reg).
18962
18963 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18964
18965 PR target/83831
18966 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18967 to QImode.
18968
18969 2018-02-16 Richard Biener <rguenther@suse.de>
18970
18971 PR tree-optimization/84037
18972 PR tree-optimization/84016
18973 PR target/82862
18974 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18975 Adjust vec_construct for the fact we need additional higher latency
18976 128bit inserts for AVX256 and AVX512 vector builds.
18977 (ix86_add_stmt_cost): Scale vector construction cost for
18978 elementwise loads.
18979
18980 2018-02-16 Richard Biener <rguenther@suse.de>
18981
18982 PR tree-optimization/84417
18983 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18984 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18985 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18986
18987 2018-02-16 Martin Liska <mliska@suse.cz>
18988
18989 PR sanitizer/84307
18990 * internal-fn.def (ASAN_CHECK): Set proper flags.
18991 (ASAN_MARK): Likewise.
18992
18993 2018-02-16 Julia Koval <julia.koval@intel.com>
18994
18995 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18996 from PTA_CANNONLAKE.
18997
18998 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18999
19000 PR target/84272
19001 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
19002 Use ++iter rather than iter++ for std::list iterators.
19003 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
19004 defer deleting them until all nodes in the forest are processed. Do
19005 free even leaf nodes. Change to_process into auto_vec.
19006
19007 PR bootstrap/84405
19008 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
19009 * vec.h (vec_default_construct): Use memset instead of placement new
19010 if BROKEN_VALUE_INITIALIZATION is defined.
19011 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
19012 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
19013 is defined.
19014
19015 PR rtl-optimization/83723
19016 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
19017 * lra.c (lra_substitute_pseudo): Likewise. If true, use
19018 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
19019 recursive calls.
19020 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
19021 callers.
19022 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
19023
19024 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
19025
19026 PR rtl-optimization/81443
19027 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
19028 from inner REGs to paradoxical SUBREGs.
19029
19030 2018-02-16 Richard Biener <rguenther@suse.de>
19031
19032 PR tree-optimization/84399
19033 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19034 For operands we can analyze at their definition make sure we can
19035 analyze them at each use as well.
19036
19037 2018-02-16 Richard Biener <rguenther@suse.de>
19038
19039 PR tree-optimization/84190
19040 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
19041 volatile accesses if the decl isn't volatile.
19042
19043 2018-02-15 Jason Merrill <jason@redhat.com>
19044
19045 PR c++/84314 - ICE with templates and fastcall attribute.
19046 * attribs.c (build_type_attribute_qual_variant): Don't clobber
19047 TYPE_CANONICAL on an existing type.
19048
19049 2018-02-15 Jakub Jelinek <jakub@redhat.com>
19050
19051 PR tree-optimization/84383
19052 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
19053 dstoff nor call operand_equal_p if dstbase is NULL.
19054
19055 PR tree-optimization/84334
19056 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
19057 also a CONSTANT_CLASS_P, punt.
19058
19059 2018-02-14 Jim Wilson <jimw@sifive.com>
19060
19061 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
19062 first SMALL_OPERAND check. New local min_second_step. Move assert
19063 to where locals are set. Add TARGET_RVC support.
19064 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
19065
19066 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
19067
19068 * doc/invoke.texi: Correct -Wformat-overflow code sample.
19069
19070 2018-02-14 Martin Sebor <msebor@redhat.com>
19071
19072 PR tree-optimization/83698
19073 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
19074 arrays constrain the offset range to their bounds.
19075 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
19076 (builtin_access::overlap): Avoid setting the size of overlap if it's
19077 already been set.
19078 (maybe_diag_overlap): Also consider arrays when deciding what values
19079 of offsets to include in diagnostics.
19080
19081 2018-02-14 Martin Sebor <msebor@redhat.com>
19082
19083 PR c/84108
19084 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
19085 that correspond to the kind of a declaration.
19086
19087 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
19088
19089 PR target/83984
19090 * config/pa/pa.md: Load address of PIC label using the linkage table
19091 if the label is nonlocal.
19092
19093 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
19094
19095 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
19096 warning message if user requests -maltivec=be.
19097 * doc/invoke.texi: Document deprecation of -maltivec=be.
19098
19099 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
19100
19101 PR target/84220
19102 * config/rs6000/rs6000-c.c: Update definitions for
19103 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
19104 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
19105
19106 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19107
19108 PR target/84239
19109 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
19110 add _get_ssp intrinsics. Remove argument from
19111 __builtin_ia32_rdssp[d|q].
19112 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
19113 * config/i386/i386-builtin.def: Remove argument from
19114 __builtin_ia32_rdssp[d|q].
19115 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
19116 ix86_expand_special_args_builtin for _rdssp[d|q].
19117 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
19118 Clear register before usage.
19119 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
19120 Add documentation for new _get_ssp and _inc_ssp intrinsics.
19121
19122 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
19123
19124 PR tree-optimization/84357
19125 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
19126 operand 1 of an ARRAY_REF too.
19127
19128 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
19129
19130 PR target/83831
19131 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
19132 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19133 declarations.
19134 (set_of_reg): New struct.
19135 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
19136 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
19137 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
19138 functions.
19139 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
19140 Split into bitclr, bitset, bitinvert patterns if appropriate.
19141 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
19142 use rx_fuse_in_memory_bitop.
19143 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
19144 to named insn, correct maximum insn length.
19145
19146 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
19147
19148 PR target/79242
19149 * machmode.def: Define a complex mode for PARTIAL_INT.
19150 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
19151 MODE_PARTIAL_INT.
19152 * doc/rtl.texi: Document CSPImode.
19153 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
19154 handling.
19155 (msp430_hard_regno_nregs_with_padding): Likewise.
19156
19157 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
19158
19159 PR target/84279
19160 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
19161
19162 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
19163
19164 PR rtl-optimization/84169
19165 * combine.c (try_combine): New variable split_i2i3. Set it to true if
19166 we generated a parallel as new i3 and we split that to new i2 and i3
19167 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
19168 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
19169 those to i2, not i1. Partially rewrite this scan code.
19170
19171 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19172
19173 PR c/82210
19174 * stor-layout.c (place_field): For variable length fields, adjust
19175 offset_align afterwards not just based on the field's alignment,
19176 but also on the size.
19177
19178 PR middle-end/84309
19179 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
19180 of exps and logs in the use_exp2 case.
19181
19182 2018-02-13 Jeff Law <law@redhat.com>
19183
19184 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
19185 entry for "vector".
19186
19187 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
19188 ARGS as unused.
19189
19190 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
19191
19192 PR debug/84342
19193 PR debug/84319
19194 * common.opt (gas-loc-support, gas-locview-support): New.
19195 (ginline-points, ginternal-reset-location-views): New.
19196 * doc/invoke.texi: Document them. Use @itemx where intended.
19197 (gvariable-location-views): Adjust.
19198 * target.def (reset_location_view): New.
19199 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
19200 (TARGET_RESET_LOCATION_VIEW): New.
19201 * doc/tm.texi: Rebuilt.
19202 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
19203 (dwarf2out_default_as_locview_support): New.
19204 (output_asm_line_debug_info): Use option variables.
19205 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
19206 (output_loc_list): Likewise.
19207 (add_high_low_attributes): Check option variables.
19208 Don't output entry view attribute in strict mode.
19209 (gen_inlined_subroutine_die): Check option variables.
19210 (dwarf2out_inline_entry): Likewise.
19211 (init_sections_and_labels): Likewise.
19212 (dwarf2out_early_finish): Likewise.
19213 (maybe_reset_location_view): New, from...
19214 (dwarf2out_var_location): ... here. Call it.
19215 * debug.h (dwarf2out_default_as_loc_support): Declare.
19216 (dwarf2out_default_as_locview_support): Declare.
19217 * hooks.c (hook_int_rtx_insn_0): New.
19218 * hooks.h (hook_int_rtx_insn_0): Declare.
19219 * toplev.c (process_options): Take -gas-loc-support and
19220 -gas-locview-support from dwarf2out. Enable
19221 -gvariable-location-views by default only with locview
19222 assembler support. Enable -ginternal-reset-location-views by
19223 default only if the target defines the corresponding hook.
19224 Enable -ginline-points by default if location views are
19225 enabled; force it disabled if statement frontiers are
19226 disabled.
19227 * tree-inline.c (expand_call_inline): Check option variables.
19228 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
19229
19230 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
19231
19232 PR tree-optimization/84321
19233 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
19234 handling. Also check whether the anti-range contains any values
19235 that satisfy the mask; switch to a VR_RANGE if not.
19236
19237 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
19238
19239 PR sanitizer/84340
19240 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
19241
19242 2018-02-13 Martin Jambor <mjambor@suse.cz>
19243
19244 PR c++/83990
19245 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
19246 of call statements, also set location of a load to a temporary.
19247
19248 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
19249
19250 * config/rl78/rl78.c (add_vector_labels): New function.
19251 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
19252 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
19253 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
19254 which checks that no arguments are passed.
19255 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
19256 * doc/extend.texi: Documentation for the new attribute.
19257
19258 2018-02-13 Andreas Schwab <schwab@suse.de>
19259
19260 * config/riscv/linux.h (CPP_SPEC): Define.
19261
19262 2018-02-13 Jakub Jelinek <jakub@redhat.com>
19263
19264 PR target/84335
19265 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
19266 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
19267 OPTION_MASK_ISA_AES as first argument to def_builtin_const
19268 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
19269 instead of OPTION_MASK_ISA_PCLMUL as first argument to
19270 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
19271 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
19272 temporarily for AES and PCLMUL builtins.
19273
19274 PR tree-optimization/84339
19275 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
19276 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
19277 Formatting fixes.
19278
19279 PR middle-end/84309
19280 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
19281 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
19282 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
19283 inline function.
19284 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
19285 inline function.
19286 * omp-simd-clone.h: New file.
19287 * omp-simd-clone.c: Include omp-simd-clone.h.
19288 (expand_simd_clones): No longer static.
19289 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
19290 cgraph.h and omp-simd-clone.h.
19291 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
19292 (vect_recog_widen_shift_pattern): Formatting fix.
19293 (vect_pattern_recog_1): Don't check optab for calls.
19294
19295 PR target/84336
19296 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
19297 operands[2] into a REG before using gen_lowpart on it.
19298
19299 2018-02-12 Jeff Law <law@redhat.com>
19300
19301 PR target/83760
19302 * config/sh/sh.c (find_barrier): Consider a sibling call
19303 a barrier as well.
19304
19305 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
19306 successfully back substituting a reg.
19307
19308 2018-02-12 Richard Biener <rguenther@suse.de>
19309
19310 PR tree-optimization/84037
19311 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
19312 parameter, move visited init to caller.
19313 (vect_slp_analyze_operations): Separate cost from validity
19314 check, initialize visited once for all instances.
19315 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
19316 for all instances.
19317 * tree-vect-stmts.c (vect_model_simple_cost): Make early
19318 out an assert.
19319 (vect_model_promotion_demotion_cost): Likewise.
19320 (vectorizable_bswap): Guard cost modeling with !slp_node
19321 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
19322 SLP stmts.
19323 (vectorizable_call): Likewise.
19324 (vectorizable_conversion): Likewise.
19325 (vectorizable_assignment): Likewise.
19326 (vectorizable_shift): Likewise.
19327 (vectorizable_operation): Likewise.
19328 (vectorizable_store): Likewise.
19329 (vectorizable_load): Likewise.
19330 (vectorizable_condition): Likewise.
19331 (vectorizable_comparison): Likewise.
19332
19333 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
19334
19335 PR sanitizer/84307
19336 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
19337 (ASAN_MARK): Fix fnspec to account for return value, change pointer
19338 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
19339
19340 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19341
19342 PR middle-end/83665
19343 * params.def (inline-min-speedup): Increase from 8 to 15.
19344 (max-inline-insns-auto): Decrease from 40 to 30.
19345 * ipa-split.c (consider_split): Add some buffer for function to
19346 be considered inlining candidate.
19347 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19348 default values.
19349
19350 2018-02-12 Richard Biener <rguenther@suse.de>
19351
19352 PR tree-optimization/84037
19353 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19354 matched stmts if we cannot swap the non-matched ones.
19355
19356 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19357
19358 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19359 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19360 _mm_maskz_scalef_round_ss): New intrinsics.
19361 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19362 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19363 __builtin_ia32_scalefss_round): Remove.
19364 (__builtin_ia32_scalefsd_mask_round,
19365 __builtin_ia32_scalefss_mask_round): New intrinsics.
19366 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19367 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19368 ((match_operand:VF_128 2 "<round_nimm_predicate>"
19369 "<round_constraint>")): Changed to ...
19370 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19371 "<round_scalar_constraint>")): ... this.
19372 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19373 %0, %1, %2<round_op3>}"): Changed to ...
19374 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19375 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19376 %2<round_scalar_mask_op3>}"): ... this.
19377 * config/i386/subst.md (round_scalar_nimm_predicate): New.
19378
19379 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19380
19381 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19382 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19383 (_mm_maskz_sqrt_round_ss): New intrinsics.
19384 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19385 (__builtin_ia32_sqrtsd_mask_round)
19386 (__builtin_ia32_sqrtss_mask_round): New builtins.
19387 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19388 (__builtin_ia32_sqrtss_round): Remove.
19389 (__builtin_ia32_sqrtsd_mask_round)
19390 (__builtin_ia32_sqrtss_mask_round): New builtins.
19391 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19392 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19393 ((match_operand:VF_128 1 "vector_operand"
19394 "xBm,<round_constraint>")): Changed to ...
19395 ((match_operand:VF_128 1 "vector_operand"
19396 "xBm,<round_scalar_constraint>")): ... this.
19397 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19398 %0, %2, %<iptr>1<round_op3>}): Changed to ...
19399 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19400 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19401 %<iptr>1<round_scalar_mask_op3>}): ... this.
19402 ((set_attr "prefix" "<round_prefix>")): Changed to ...
19403 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19404
19405 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
19406
19407 PR target/84266
19408 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19409 Cast vec_cmpeq result to correct type.
19410 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19411 Cast vec_cmpgt result to correct type.
19412
19413 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
19414
19415 * final.c (final_scan_insn_1): Renamed from...
19416 (final_scan_insn): ... this. New wrapper, to recover
19417 seen from the outermost call in recursive ones.
19418 * config/sparc/sparc.c (output_return): Drop seen from call.
19419 (output_sibcall): Likewise.
19420 * config/visium/visium.c (output_branch): Likewise.
19421
19422 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
19423
19424 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19425 function label.
19426
19427 2018-02-10 Alan Modra <amodra@gmail.com>
19428
19429 PR target/84300
19430 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19431 Specify LR as an input.
19432
19433 2018-02-10 Jakub Jelinek <jakub@redhat.com>
19434
19435 PR sanitizer/83987
19436 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19437 remove_member_access_dummy_vars): New functions.
19438 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19439 lower_omp_1, execute_lower_omp): Use them.
19440
19441 PR rtl-optimization/84308
19442 * shrink-wrap.c (spread_components): Release todo vector.
19443
19444 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
19445
19446 PR rtl-optimization/57193
19447 * ira-color.c (struct allocno_color_data): Add member
19448 conflict_allocno_hard_prefs.
19449 (update_conflict_allocno_hard_prefs): New.
19450 (bucket_allocno_compare_func): Add a preference based on
19451 conflict_allocno_hard_prefs.
19452 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19453 (color_allocnos): Remove a dead code. Initiate
19454 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
19455
19456 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19457
19458 PR target/84226
19459 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19460 constraint from =wa to wa. Avoid a subreg on the output operand,
19461 instead use a pseudo and subreg it in a move.
19462 (p9_xxbrd_<mode>): Changed to ...
19463 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19464 (p9_xxbrd_v2df): New expander.
19465 (p9_xxbrw_<mode>): Changed to ...
19466 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19467 (p9_xxbrw_v4sf): New expander.
19468
19469 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19470
19471 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19472
19473 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
19474
19475 PR target/83926
19476 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19477 multiply in 32-bit mode.
19478 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19479 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19480 mode.
19481
19482 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19483
19484 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19485 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19486 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19487 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19488
19489 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
19490
19491 PR lto/84213
19492 * dwarf2out.c (is_trivial_indirect_ref): New function.
19493 (dwarf2out_late_global_decl): Do not generate a location
19494 attribute for variables that have a non-trivial DECL_VALUE_EXPR
19495 and that are not defined in the current unit.
19496
19497 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19498
19499 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19500 instead of a libcall for UNORDERED.
19501
19502 2018-02-09 Tamar Christina <tamar.christina@arm.com>
19503
19504 PR target/82641
19505 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19506 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19507
19508 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19509
19510 PR target/PR84295
19511 * config/s390/s390.c (s390_set_current_function): Invoke
19512 s390_indirect_branch_settings also if fndecl didn't change.
19513
19514 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19515
19516 * config/rs6000/rs6000.md (blockage): Set length to zero.
19517
19518 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19519
19520 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19521
19522 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19523
19524 PR sanitizer/84285
19525 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19526 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19527 -static-lib*san.
19528
19529 PR debug/84252
19530 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19531 PARALLEL incoming that failed vt_get_decl_and_offset check.
19532
19533 PR middle-end/84237
19534 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19535 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19536 TREE_READONLY bit.
19537 (get_variable_section): For decls in named .bss* sections pass true as
19538 second argument to bss_initializer_p.
19539
19540 2018-02-09 Marek Polacek <polacek@redhat.com>
19541 Jakub Jelinek <jakub@redhat.com>
19542
19543 PR c++/83659
19544 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19545 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19546 Sync some changes from cxx_fold_indirect_ref.
19547
19548 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19549
19550 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19551 markers.
19552 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19553 (BLOCK_INLINE_ENTRY_LABEL): New.
19554 (dwarf2out_var_location): Disregard inline entry markers.
19555 (inline_entry_data): New struct.
19556 (inline_entry_data_hasher): New hashtable type.
19557 (inline_entry_data_hasher::hash): New.
19558 (inline_entry_data_hasher::equal): New.
19559 (inline_entry_data_table): New variable.
19560 (add_high_low_attributes): Add DW_AT_entry_pc and
19561 DW_AT_GNU_entry_view attributes if a pending entry is found
19562 in inline_entry_data_table. Add old entry_pc attribute only
19563 if debug nonbinding markers are disabled.
19564 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19565 markers are enabled.
19566 (block_within_block_p, dwarf2out_inline_entry): New.
19567 (dwarf2out_finish): Check that no entries remained in
19568 inline_entry_data_table.
19569 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19570 (final_scan_insn, notice_source_line): Likewise.
19571 (rest_of_clean_state): Skip inline entry markers.
19572 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19573 markers.
19574 * gimple.c (gimple_build_debug_inline_entry): New.
19575 * gimple.h (enum gimple_debug_subcode): Add
19576 GIMPLE_DEBUG_INLINE_ENTRY.
19577 (gimple_build_debug_inline_entry): Declare.
19578 (gimple_debug_inline_entry_p): New.
19579 (gimple_debug_nonbind_marker_p): Adjust.
19580 * insn-notes.def (INLINE_ENTRY): New.
19581 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19582 inline entry marker notes.
19583 (print_insn): Likewise.
19584 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19585 (INSN_DEBUG_MARKER_KIND): Likewise.
19586 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19587 * tree-inline.c (expand_call_inline): Build and insert
19588 debug_inline_entry stmt.
19589 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19590 inline entry blocks early, if nonbind markers are enabled.
19591 (dump_scope_block): Dump fragment info.
19592 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19593 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19594 (gimple_build_debug_inline_entry): New.
19595 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19596 Enable/disable inline entry points too.
19597 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19598 (DEBUG_INSN): Describe inline entry markers.
19599
19600 * common.opt (gvariable-location-views): New.
19601 (gvariable-location-views=incompat5): New.
19602 * config.in: Rebuilt.
19603 * configure: Rebuilt.
19604 * configure.ac: Test assembler for view support.
19605 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19606 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19607 * dwarf2out.c (var_loc_view): New typedef.
19608 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19609 (dwarf2out_locviews_in_attribute): New.
19610 (dwarf2out_locviews_in_loclist): New.
19611 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19612 (enum dw_line_info_opcode): Add LI_adv_address.
19613 (struct dw_line_info_table): Add view.
19614 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19615 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19616 (zero_view_p): New variable.
19617 (ZERO_VIEW_P): New macro.
19618 (output_asm_line_debug_info): New.
19619 (struct var_loc_node): Add view.
19620 (add_AT_view_list, AT_loc_list): New.
19621 (add_var_loc_to_decl): Add view param. Test it against last.
19622 (new_loc_list): Add view params. Record them.
19623 (AT_loc_list_ptr): Handle loc and view lists.
19624 (view_list_to_loc_list_val_node): New.
19625 (print_dw_val): Handle dw_val_class_view_list.
19626 (size_of_die): Likewise.
19627 (value_format): Likewise.
19628 (loc_list_has_views): New.
19629 (gen_llsym): Set vl_symbol too.
19630 (maybe_gen_llsym, skip_loc_list_entry): New.
19631 (dwarf2out_maybe_output_loclist_view_pair): New.
19632 (output_loc_list): Output view list or entries too.
19633 (output_view_list_offset): New.
19634 (output_die): Handle dw_val_class_view_list.
19635 (output_dwarf_version): New.
19636 (output_compilation_unit_header): Use it.
19637 (output_skeleton_debug_sections): Likewise.
19638 (output_rnglists, output_line_info): Likewise.
19639 (output_pubnames, output_aranges): Update version comments.
19640 (output_one_line_info_table): Output view numbers in asm comments.
19641 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19642 Call maybe_gen_llsym.
19643 (loc_list_from_tree_1): Adjust.
19644 (add_AT_location_description): Create view list attribute if
19645 needed, check it's absent otherwise.
19646 (convert_cfa_to_fb_loc_list): Adjust.
19647 (maybe_emit_file): Call output_asm_line_debug_info for test.
19648 (dwarf2out_var_location): Reset views as needed. Precompute
19649 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19650 attribute. Set view.
19651 (new_line_info_table): Reset next view.
19652 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19653 (dwarf2out_source_line): Likewise. Output view resets and labels to
19654 the assembler, or select appropriate line info opcodes.
19655 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19656 (optimize_string_length): Catch it. Adjust.
19657 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19658 dw_val_class_view_list, and remove it if no longer needed.
19659 (hash_loc_list): Hash view numbers.
19660 (loc_list_hasher::equal): Compare them.
19661 (optimize_location_lists): Check whether a view list symbol is
19662 needed, and whether the locview attribute is present, and
19663 whether they match. Remove the locview attribute if no longer
19664 needed.
19665 (index_location_lists): Call skip_loc_list_entry for test.
19666 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19667 Use output_dwarf_version.
19668 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19669 (struct dw_val_node): Add val_view_list.
19670 * final.c (SEEN_NEXT_VIEW): New.
19671 (set_next_view_needed): New.
19672 (clear_next_view_needed): New.
19673 (maybe_output_next_view): New.
19674 (final_start_function): Rename to...
19675 (final_start_function_1): ... this. Take pointer to FIRST,
19676 add SEEN parameter. Emit param bindings in the initial view.
19677 (final_start_function): Reintroduce SEEN-less interface.
19678 (final): Rename to...
19679 (final_1): ... this. Take SEEN parameter. Output final pending
19680 next view at the end.
19681 (final): Reintroduce seen-less interface.
19682 (final_scan_insn): Output pending next view before switching
19683 sections or ending a block. Mark the next view as needed when
19684 outputting variable locations. Notify debug backend of section
19685 changes, and of location view changes.
19686 (rest_of_handle_final): Adjust.
19687 * toplev.c (process_options): Autodetect value for debug variable
19688 location views option. Warn on incompat5 without -gdwarf-5.
19689 * doc/invoke.texi (gvariable-location-views): New.
19690 (gvariable-location-views=incompat5): New.
19691 (gno-variable-location-views): New.
19692
19693 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19694
19695 PR tree-optimization/84136
19696 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19697 that the result of find_edge is non-NULL.
19698
19699 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19700
19701 PR target/83008
19702 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19703 storing integer register in SImode. Fix cost of 256 and 512
19704 byte aligned SSE register store.
19705
19706 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19707
19708 * config/i386/i386.c (ix86_multiplication_cost): Fix
19709 multiplication cost for TARGET_AVX512DQ.
19710
19711 2018-02-08 Marek Polacek <polacek@redhat.com>
19712
19713 PR tree-optimization/84238
19714 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19715 get_range_strlen.
19716
19717 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19718
19719 PR tree-optimization/84265
19720 * tree-vect-stmts.c (vectorizable_store): Don't treat
19721 VMAT_CONTIGUOUS accesses as grouped.
19722 (vectorizable_load): Likewise.
19723
19724 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19725
19726 PR tree-optimization/81635
19727 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19728 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19729 (test_round_for_mask): New functions.
19730 (wide_int_cc_tests): Call test_round_for_mask.
19731 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19732 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19733 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19734 range returned by get_range_info.
19735
19736 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19737
19738 PR ipa/81360
19739 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19740 * symtab.c: Include builtins.h
19741 (symtab_node::output_to_lto_symbol_table_p): Move here
19742 from lto-streamer-out.c:output_symbol_p.
19743 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19744 (output_symbol_p): Move all logic to symtab.c
19745 (produce_symtab): Update.
19746
19747 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19748
19749 * config/s390/s390-opts.h (enum indirect_branch): Define.
19750 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19751 (s390_indirect_branch_via_thunk)
19752 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19753 (enum s390_indirect_branch_type): Define.
19754 * config/s390/s390.c (struct s390_frame_layout, struct
19755 machine_function): Remove.
19756 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19757 (indirect_branch_table_label_no, indirect_branch_table_name):
19758 Define variables.
19759 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19760 (enum s390_indirect_branch_option): Define.
19761 (s390_return_addr_from_memory): New function.
19762 (s390_handle_string_attribute): New function.
19763 (s390_attribute_table): Add new attribute handler.
19764 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19765 (s390_indirect_branch_via_thunk): New function.
19766 (s390_indirect_branch_via_inline_thunk): New function.
19767 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19768 sibling call optimization for non z10 compiles.
19769 (s390_emit_call): Force indirect branch target to be a single
19770 register. Add r1 clobber for non-z10 compiles.
19771 (s390_emit_epilogue): Emit return jump via return_use expander.
19772 (s390_reorg): Handle JUMP_INSNs as execute targets.
19773 (s390_option_override_internal): Perform validity checks for the
19774 new command line options.
19775 (s390_indirect_branch_attrvalue): New function.
19776 (s390_indirect_branch_settings): New function.
19777 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19778 (s390_output_indirect_thunk_function): New function.
19779 (s390_code_end): Implement target hook.
19780 (s390_case_values_threshold): Implement target hook.
19781 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19782 macros.
19783 * config/s390/s390.h (struct s390_frame_layout)
19784 (struct machine_function): Move here from s390.c.
19785 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19786 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19787 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19788 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19789 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19790 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19791 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19792 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19793 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19794 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19795 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19796 (mnemonic attribute): Add values which aren't recognized
19797 automatically.
19798 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19799 pattern for branch conversion. Fix mnemonic attribute.
19800 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19801 indirect branch via thunk if requested.
19802 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19803 ("*indirect_jump"): Disable for branch conversion using out of
19804 line thunks.
19805 ("indirect_jump_via_thunk<mode>_z10")
19806 ("indirect_jump_via_thunk<mode>")
19807 ("indirect_jump_via_inlinethunk<mode>_z10")
19808 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19809 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19810 ("casesi_jump_via_inlinethunk<mode>_z10")
19811 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19812 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19813 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19814 ("*indirect2_jump"): Disable for branch conversion.
19815 ("casesi_jump"): Turn into expander and expand patterns for branch
19816 conversion.
19817 ("return_use"): New expander.
19818 ("*return"): Emit return via thunk and rename it to ...
19819 ("*return<mode>"): ... this one.
19820 * config/s390/s390.opt: Add new options and and enum for the
19821 option values.
19822
19823 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19824
19825 * lra-constraints.c (match_reload): Unconditionally use
19826 gen_lowpart_SUBREG, rather than selecting between that
19827 and equivalent gen_rtx_SUBREG code.
19828
19829 2018-02-08 Richard Biener <rguenther@suse.de>
19830
19831 PR tree-optimization/84233
19832 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19833 changed flag instead of boguously re-using phi_inserted.
19834
19835 2018-02-08 Martin Jambor <mjambor@suse.cz>
19836
19837 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19838 static local variables.
19839
19840 2018-02-08 Richard Biener <rguenther@suse.de>
19841
19842 PR tree-optimization/84278
19843 * tree-vect-stmts.c (vectorizable_store): When looking for
19844 smaller vector types to perform grouped strided loads/stores
19845 make sure the mode is supported by the target.
19846 (vectorizable_load): Likewise.
19847
19848 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19849
19850 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19851 Increase LDP/STP opportunities by adding adjacent callee-saves.
19852
19853 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19854
19855 PR rtl-optimization/84068
19856 PR rtl-optimization/83459
19857 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19858
19859 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19860
19861 PR tree-optimization/84224
19862 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19863 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19864 non-zero arguments.
19865
19866 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19867
19868 PR target/84113
19869 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19870 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19871 count, remove one USE.
19872
19873 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19874
19875 * doc/install.texi (Configuration): Document the
19876 --with-long-double-format={ibm,ieee} PowerPC configuration
19877 options.
19878
19879 PR target/84154
19880 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19881 Convert from define_expand to be define_insn_and_split. Rework
19882 float/double/_Float128 conversions to QI/HI/SImode to work with
19883 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19884 conversions to QI/HImode types did a store and then a load to
19885 truncate the value. For conversions to VSX registers, don't split
19886 the insn, instead emit the code directly. Use the code iterator
19887 any_fix to combine signed and unsigned conversions.
19888 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19889 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19890 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19891 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19892 (fix_<mode>di2_hw): Likewise.
19893 (fixuns_<mode>di2_hw): Likewise.
19894 (fix_<mode>si2_hw): Likewise.
19895 (fixuns_<mode>si2_hw): Likewise.
19896 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19897 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19898 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19899 fix<uns>_trunc<SFDF:mode>si2_p8.
19900 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19901 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19902 (fix<uns>_<mode>_mem): Likewise.
19903 (fctiw<u>z_<mode>_mem): Likewise.
19904 (fix<uns>_<mode>_mem): Likewise.
19905 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19906 the register allocator from doing a direct move to the GPRs to do
19907 a store, and instead use the ISA 3.0 store byte/half-word from
19908 vector register instruction. For IEEE 128-bit floating point,
19909 also optimize stores of 32-bit ints.
19910 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19911
19912 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19913
19914 * genextract.c (push_pathstr_operand): New function to support
19915 [a-zA-Z].
19916 (walk_rtx): Call push_pathstr_operand.
19917 (print_path): Support [a-zA-Z].
19918
19919 2018-02-07 Richard Biener <rguenther@suse.de>
19920
19921 PR tree-optimization/84037
19922 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19923 (cse_and_gimplify_to_preheader): Declare.
19924 (vect_get_place_in_interleaving_chain): Likewise.
19925 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19926 ivexpr_map.
19927 (_loop_vec_info::~_loop_vec_info): Delete it.
19928 (cse_and_gimplify_to_preheader): New function.
19929 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19930 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19931 (vectorizable_load): Likewise. For grouped stores always base
19932 the IV on the first element.
19933 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19934 condition before gimplifying.
19935
19936 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19937
19938 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19939 *DIV_EXPR and *MOD_EXPR.
19940
19941 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19942
19943 PR target/84248
19944 * config/i386/i386.c (ix86_option_override_internal): Mask out
19945 the CF_SET bit when checking -fcf-protection.
19946
19947 2018-02-07 Tom de Vries <tom@codesourcery.com>
19948
19949 PR libgomp/84217
19950 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19951 enough.
19952
19953 2018-02-07 Richard Biener <rguenther@suse.de>
19954
19955 PR tree-optimization/84204
19956 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19957 this place.
19958
19959 PR tree-optimization/84205
19960 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19961 special-case isl_ast_op_zdiv_r.
19962
19963 PR tree-optimization/84223
19964 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19965 Only add conditions from within the region.
19966 (gather_bbs::after_dom_children): Adjust.
19967
19968 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19969
19970 PR target/84209
19971 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19972 * config/avr/avr.md: Only post-reload split REG-REG moves if
19973 either register is GENERAL_REG_P.
19974
19975 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19976
19977 PR tree-optimization/84235
19978 * tree-ssa-scopedtables.c
19979 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19980 if the subtraction is performed in floating point type where NaNs are
19981 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19982 build 1. Formatting fix.
19983
19984 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19985
19986 PR target/84146
19987 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19988 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19989 and skip it regardless of bb boundaries. Use CALL_P macro,
19990 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19991 unnecessarily, formatting fix.
19992
19993 2018-02-06 Michael Collison <michael.collison@arm.com>
19994
19995 * config/arm/thumb2.md:
19996 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19997 (*thumb_mov_notscc): Ditto.
19998
19999 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
20000
20001 PR target/84154
20002 * config/rs6000/rs6000.md (su code attribute): Use "u" for
20003 unsigned_fix, not "s".
20004
20005 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20006
20007 * configure.ac (gcc_fn_eh_frame_ro): New function.
20008 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
20009 correct .eh_frame permissions.
20010 * configure: Regenerate.
20011
20012 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
20013
20014 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
20015 irrelevant options.
20016
20017 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20018
20019 * config/rs6000/rs6000.c (rs6000_option_override_internal):
20020 Display warning message for -mno-speculate-indirect-jumps.
20021
20022 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
20023
20024 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
20025 Undocumented.
20026 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
20027
20028 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
20029
20030 PR tree-optimization/84225
20031 * tree-eh.c (find_trapping_overflow): Only call
20032 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
20033
20034 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20035
20036 PR target/84145
20037 * config/i386/i386.c: Reimplement the check of possible options
20038 -mibt/-mshstk conbination. Change error messages.
20039 * doc/invoke.texi: Fix a typo: remove extra '='.
20040
20041 2018-02-06 Marek Polacek <polacek@redhat.com>
20042
20043 PR tree-optimization/84228
20044 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
20045
20046 2018-02-06 Tamar Christina <tamar.christina@arm.com>
20047
20048 PR target/82641
20049 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
20050 emitted arch directives.
20051 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
20052 __ARM_FEATURE_COPROC before changing architectures.
20053
20054 2018-02-06 Richard Biener <rguenther@suse.de>
20055
20056 * config/i386/i386.c (print_reg): Fix typo.
20057 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
20058
20059 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
20060
20061 * configure: Regenerate.
20062
20063 2018-02-05 Martin Sebor <msebor@redhat.com>
20064
20065 PR tree-optimization/83369
20066 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
20067 inlining context.
20068
20069 2018-02-05 Martin Liska <mliska@suse.cz>
20070
20071 * doc/invoke.texi: Cherry-pick upstream r323995.
20072
20073 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
20074
20075 * ira.c (ira_init_register_move_cost): Adjust comment.
20076
20077 2018-02-05 Martin Liska <mliska@suse.cz>
20078
20079 PR gcov-profile/84137
20080 * doc/gcov.texi: Fix typo in documentation.
20081
20082 2018-02-05 Martin Liska <mliska@suse.cz>
20083
20084 PR gcov-profile/83879
20085 * doc/gcov.texi: Document necessity of --dynamic-list-data when
20086 using dlopen functionality.
20087
20088 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
20089
20090 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
20091 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
20092 _mm_maskz_range_ss, _mm_mask_range_round_ss,
20093 _mm_maskz_range_round_ss): New intrinsics.
20094 (__builtin_ia32_rangesd128_round)
20095 (__builtin_ia32_rangess128_round): Remove.
20096 (__builtin_ia32_rangesd128_mask_round,
20097 __builtin_ia32_rangess128_mask_round): New builtins.
20098 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
20099 __builtin_ia32_rangess128_round): Remove.
20100 (__builtin_ia32_rangesd128_mask_round,
20101 __builtin_ia32_rangess128_mask_round): New builtins.
20102 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
20103 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
20104 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
20105 "<round_saeonly_constraint>")): Changed to ...
20106 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
20107 "<round_saeonly_scalar_constraint>")): ... this.
20108 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20109 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
20110 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
20111 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
20112 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
20113
20114 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
20115
20116 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
20117 options.
20118 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
20119 Remove all values except native, 8540 and 8548.
20120
20121 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
20122
20123 * config/i386/i386.c (ix86_output_function_return): Pass
20124 INVALID_REGNUM, instead of -1, as invalid register number to
20125 indirect_thunk_name and output_indirect_thunk.
20126
20127 2018-02-02 Julia Koval <julia.koval@intel.com>
20128
20129 * config.gcc: Add -march=icelake.
20130 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
20131 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
20132 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
20133 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
20134 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
20135 (processor_target_table): Add icelake.
20136 (ix86_option_override_internal): Handle new PTAs.
20137 (get_builtin_code_for_version): Handle icelake.
20138 (M_INTEL_COREI7_ICELAKE): New.
20139 (fold_builtin_cpu): Handle icelake.
20140 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
20141 * doc/invoke.texi: Add -march=icelake.
20142
20143 2018-02-02 Julia Koval <julia.koval@intel.com>
20144
20145 * config/i386/i386.c (ix86_option_override_internal): Change flags type
20146 to wide_int_bitmask.
20147 * wide-int-bitmask.h: New.
20148
20149 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20150
20151 PR target/84066
20152 * config/i386/i386.md: Replace Pmode with word_mode in
20153 builtin_setjmp_setup and builtin_longjmp to support x32.
20154
20155 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
20156
20157 PR target/56010
20158 PR target/83743
20159 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
20160 #include "opts.h".
20161 (rs6000_supported_cpu_names): New static variable.
20162 (linux_cpu_translation_table): Likewise.
20163 (elf_platform) <cpu>: Define new static variable and use it.
20164 Translate kernel AT_PLATFORM name to canonical name if needed.
20165 Error if platform name is unknown.
20166
20167 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
20168
20169 PR target/84089
20170 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
20171
20172 2018-02-01 Jeff Law <law@redhat.com>
20173
20174 PR target/84128
20175 * config/i386/i386.c (release_scratch_register_on_entry): Add new
20176 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
20177 the scratch if RELEASE_VIA_POP is false.
20178 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
20179 If we have to save a temporary register, decrement SIZE appropriately.
20180 Pass new arguments to release_scratch_register_on_entry.
20181 (ix86_adjust_stack_and_probe): Likewise.
20182 (ix86_emit_probe_stack_range): Pass new arguments to
20183 release_scratch_register_on_entry.
20184
20185 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
20186
20187 PR rtl-optimization/84157
20188 * combine.c (change_zero_ext): Use REG_P predicate in
20189 front of HARD_REGISTER_P predicate.
20190
20191 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
20192
20193 * config/avr/avr.c (avr_option_override): Move disabling of
20194 -fdelete-null-pointer-checks to...
20195 * common/config/avr/avr-common.c (avr_option_optimization_table):
20196 ...here.
20197
20198 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20199
20200 PR tree-optimization/81635
20201 * tree-data-ref.c (split_constant_offset_1): For types that
20202 wrap on overflow, try to use range info to prove that wrapping
20203 cannot occur.
20204
20205 2018-02-01 Renlin Li <renlin.li@arm.com>
20206
20207 PR target/83370
20208 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
20209 TAILCALL_ADDR_REGS.
20210 (aarch64_register_move_cost): Likewise.
20211 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
20212 TAILCALL_ADDR_REGS.
20213 (REG_CLASS_NAMES): Likewise.
20214 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
20215 TAILCALL_ADDR_REGS. Remove IP registers.
20216 * config/aarch64/aarch64.md (Ucs): Update register constraint.
20217
20218 2018-02-01 Richard Biener <rguenther@suse.de>
20219
20220 * domwalk.h (dom_walker::dom_walker): Add additional constructor
20221 for specifying RPO order and allow NULL for that.
20222 * domwalk.c (dom_walker::dom_walker): Likewise.
20223 (dom_walker::walk): Handle NULL RPO order.
20224 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
20225 in RPO order.
20226 (rewrite_update_dom_walker): Likewise.
20227 (mark_def_dom_walker): Likewise.
20228
20229 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20230
20231 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
20232 (aarch64_maybe_expand_sve_subreg_move): Declare.
20233 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
20234 * config/aarch64/predicates.md (aarch64_any_register_operand): New
20235 predicate.
20236 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
20237 that are semantically a reverse operation.
20238 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
20239 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
20240 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
20241 functions.
20242 (aarch64_can_change_mode_class): For big-endian, forbid changes
20243 between two SVE modes if they have different element sizes.
20244
20245 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20246
20247 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
20248 the TImode handling for big-endian targets.
20249
20250 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20251
20252 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
20253 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
20254 not just bytes.
20255 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
20256 Remove BSWAP handing for big-endian targets and use the form of
20257 LD1RQ appropariate for the mode.
20258
20259 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20260
20261 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
20262 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
20263 duplicated element.
20264
20265 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
20266
20267 PR tearget/83845
20268 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
20269 check for operands that need to go through aarch64_sve_reload_be.
20270
20271 2018-02-01 Jakub Jelinek <jakub@redhat.com>
20272
20273 PR tree-optimization/81661
20274 PR tree-optimization/84117
20275 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
20276 * tree-eh.c: Include gimplify.h.
20277 (find_trapping_overflow, replace_trapping_overflow,
20278 rewrite_to_non_trapping_overflow): New functions.
20279 * tree-vect-loop.c: Include tree-eh.h.
20280 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
20281 * tree-data-ref.c: Include tree-eh.h.
20282 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
20283
20284 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
20285
20286 PR rtl-optimization/84123
20287 * combine.c (change_zero_ext): Check if hard register satisfies
20288 can_change_dest_mode before calling gen_lowpart_SUBREG.
20289
20290 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
20291
20292 PR target/82444
20293 * ira.c (ira_init_register_move_cost): Remove assert.
20294
20295 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20296
20297 PR rtl-optimization/84071
20298 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
20299 * doc/tm.texi: Regenerate.
20300
20301 2018-01-31 Richard Biener <rguenther@suse.de>
20302
20303 PR tree-optimization/84132
20304 * tree-data-ref.c (analyze_miv_subscript): Properly
20305 check whether evolution_function_is_affine_multivariate_p
20306 before calling gcd_of_steps_may_divide_p.
20307
20308 2018-01-31 Julia Koval <julia.koval@intel.com>
20309
20310 PR target/83618
20311 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
20312 * config/i386/i386.md (rdpid_rex64) New.
20313 (rdpid): Make 32bit only.
20314
20315 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
20316
20317 PR lto/84105
20318 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
20319 an IDENTIFIER_NODE for FUNCTION_TYPE's.
20320
20321 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20322
20323 Revert
20324 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20325
20326 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20327
20328 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
20329
20330 PR rtl-optimization/84071
20331 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
20332 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
20333
20334 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20335
20336 * config/arc/arc.c (arc_handle_aux_attribute): New function.
20337 (arc_attribute_table): Add 'aux' attribute.
20338 (arc_in_small_data_p): Consider aux like variables.
20339 (arc_is_aux_reg_p): New function.
20340 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20341 (arc_get_aux_arg): New function.
20342 (prepare_move_operands): Handle aux-register access.
20343 (arc_handle_aux_attribute): New function.
20344 * doc/extend.texi (ARC Variable attributes): Add subsection.
20345
20346 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20347
20348 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20349 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20350 (arc_attribute_table): Add 'uncached' attribute.
20351 (arc_print_operand): Print '.di' flag for uncached memory
20352 accesses.
20353 (arc_in_small_data_p): Do not consider for small data the uncached
20354 types.
20355 (arc_is_uncached_mem_p): New function.
20356 * config/arc/predicates.md (compact_store_memory_operand): Check
20357 for uncached memory accesses.
20358 (nonvol_nonimm_operand): Likewise.
20359 * doc/extend.texi (ARC Type Attribute): New subsection.
20360
20361 2018-01-31 Jakub Jelinek <jakub@redhat.com>
20362
20363 PR c/84100
20364 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20365 falign-loops=): Add Optimization flag.
20366
20367 2018-01-30 Jeff Law <law@redhat.com>
20368
20369 PR target/84064
20370 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20371 INT_REGISTERS_SAVED. Check it prior to calling
20372 get_scratch_register_on_entry.
20373 (ix86_adjust_stack_and_probe): Similarly.
20374 (ix86_emit_probe_stack_range): Similarly.
20375 (ix86_expand_prologue): Corresponding changes.
20376
20377 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20378
20379 PR target/40411
20380 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20381 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20382
20383 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
20384
20385 PR target/84112
20386 * lra-constraints.c (curr_insn_transform): Process AND in the
20387 address.
20388
20389 2018-01-30 Jakub Jelinek <jakub@redhat.com>
20390
20391 PR rtl-optimization/83986
20392 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20393 dependence against last_pending_memory_flush in addition to
20394 pending_jump_insns.
20395
20396 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
20397
20398 PR tree-optimization/81611
20399 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20400 copies.
20401
20402 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20403
20404 PR target/83758
20405 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20406 a reg rtx.
20407
20408 2018-01-30 Richard Biener <rguenther@suse.de>
20409 Jakub Jelinek <jakub@redhat.com>
20410
20411 PR tree-optimization/84111
20412 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20413 inner loops added during recursion, as they don't have up-to-date
20414 SSA form.
20415
20416 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20417
20418 PR ipa/81360
20419 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20420 (can_inline_edge_by_limits_p): ... here.
20421 (can_early_inline_edge_p, check_callers,
20422 update_caller_keys, update_callee_keys, recursive_inlining,
20423 add_new_edges_to_heap, speculation_useful_p,
20424 inline_small_functions,
20425 inline_small_functions, flatten_function,
20426 inline_to_all_callers_1): Update.
20427
20428 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20429
20430 * profile-count.c (profile_count::combine_with_ipa_count): Handle
20431 zeros correctly.
20432
20433 2018-01-30 Richard Biener <rguenther@suse.de>
20434
20435 PR tree-optimization/83008
20436 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20437 invariant and constant vector uses in stmts when they need
20438 more than one stmt.
20439
20440 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20441
20442 PR bootstrap/84017
20443 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20444 * configure: Regenerate.
20445
20446 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20447
20448 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20449 pattern.
20450 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20451 Use gen_rtx_REG rather than gen_lowpart.
20452
20453 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20454
20455 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20456 rather than 0 when creating partial subregs.
20457
20458 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20459
20460 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20461 of usage.
20462
20463 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
20464
20465 PR target/81550
20466 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20467 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20468 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20469 flags. This restores the settings used before the 2017-07-24.
20470 Turning off pre increment/decrement/modify allows IVOPTS to
20471 optimize DF/SF loops where the index is an int.
20472
20473 2018-01-29 Richard Biener <rguenther@suse.de>
20474 Kelvin Nilsen <kelvin@gcc.gnu.org>
20475
20476 PR bootstrap/80867
20477 * tree-vect-stmts.c (vectorizable_call): Don't call
20478 targetm.vectorize_builtin_md_vectorized_function if callee is
20479 NULL.
20480
20481 2018-01-22 Carl Love <cel@us.ibm.com>
20482
20483 * doc/extend.tex: Fix typo in second arg in
20484 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20485
20486 2018-01-29 Richard Biener <rguenther@suse.de>
20487
20488 PR tree-optimization/84086
20489 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20490 (flush_ssaname_freelist): When SSA names were released reset
20491 the SCEV hash table.
20492
20493 2018-01-29 Richard Biener <rguenther@suse.de>
20494
20495 PR tree-optimization/84057
20496 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20497 removed paths when removing edges.
20498
20499 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
20500
20501 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20502 -mfunction-return=@var{choice}.
20503
20504 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
20505
20506 PR diagnostic/84034
20507 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20508 Handle CR like TAB.
20509 (layout::print_source_line): Likewise.
20510 (test_get_line_width_without_trailing_whitespace): Add test cases.
20511
20512 2018-01-27 Jakub Jelinek <jakub@redhat.com>
20513
20514 PR middle-end/84040
20515 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20516 debug insns.
20517
20518 2018-01-26 Jim Wilson <jimw@sifive.com>
20519
20520 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20521
20522 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20523 specified.
20524
20525 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20526
20527 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20528 and CMP + SUB-immediate -> SUBS.
20529
20530 2018-01-26 Martin Sebor <msebor@redhat.com>
20531
20532 PR tree-optimization/83896
20533 * tree-ssa-strlen.c (get_string_len): Rename...
20534 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
20535 Avoid assuming length is constant.
20536 (handle_char_store): Use HOST_WIDE_INT for string length.
20537
20538 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
20539
20540 PR target/81763
20541 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20542 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20543
20544 2018-01-26 Richard Biener <rguenther@suse.de>
20545
20546 PR rtl-optimization/84003
20547 * dse.c (record_store): Only record redundant stores when
20548 the earlier store aliases at least all accesses the later one does.
20549
20550 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20551
20552 PR rtl-optimization/83985
20553 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20554 REG_CFA_RESTORE insns.
20555 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20556 REG_CFA_RESTORE insns here.
20557
20558 PR c/83989
20559 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20560 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20561
20562 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20563
20564 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20565 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20566 (arc_init): Likewise.
20567 (arc_override_options): Likewise.
20568 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20569 value.
20570 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20571 support.
20572 * config/arc/arc.h (TARGET_DBNZ): Define.
20573 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20574 properly set the tune attribute.
20575 (dbnz): Use TARGET_DBNZ guard.
20576 * config/arc/arc.opt (mtune): Add core3 option.
20577
20578 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20579
20580 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20581 recognize new pic like addresses.
20582 (arc_delegitimize_address): Clean up.
20583
20584 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20585
20586 * config/arc/arc-arches.def: Option mrf16 valid for all
20587 architectures.
20588 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20589 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20590 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20591 * config/arc/arc-tables.opt: Regenerate.
20592 * config/arc/arc.c (arc_conditional_register_usage): Handle
20593 reduced register file case.
20594 (arc_file_start): Set must have build attributes.
20595 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20596 mrf16 option value.
20597 * config/arc/arc.opt (mrf16): Add new option.
20598 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20599 * config/arc/genmultilib.awk: Handle new mrf16 option.
20600 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20601 * config/arc/t-multilib: Regenerate.
20602 * doc/invoke.texi (ARC Options): Document mrf16 option.
20603
20604 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20605
20606 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20607 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20608 (arc_attribute_table): Add 'secure_call' attribute.
20609 (arc_print_operand): Print secure call operand.
20610 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20611 secure.
20612 (arc_is_secure_call_p): New function. * config/arc/arc.md
20613 (call_i): Add support for sjli instruction.
20614 (call_value_i): Likewise.
20615 * config/arc/constraints.md (Csc): New constraint.
20616
20617 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20618 John Eric Martin <John.Martin@emmicro-us.com>
20619
20620 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20621 * config/arc/arc.c (_arc_jli_section): New struct.
20622 (arc_jli_section): New type.
20623 (rc_jli_sections): New static variable.
20624 (arc_handle_jli_attribute): New function.
20625 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20626 (arc_file_end): New function.
20627 (TARGET_ASM_FILE_END): Define.
20628 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20629 (arc_add_jli_section): New function.
20630 (jli_call_scan): Likewise.
20631 (arc_reorg): Call jli_call_scan.
20632 (arc_output_addsi): Remove 'S' from printing asm operand.
20633 (arc_is_jli_call_p): New function.
20634 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20635 operand.
20636 (movhi_insn): Likewise.
20637 (movsi_insn): Likewise.
20638 (movsi_set_cc_insn): Likewise.
20639 (loadqi_update): Likewise.
20640 (load_zeroextendqisi_update): Likewise.
20641 (load_signextendqisi_update): Likewise.
20642 (loadhi_update): Likewise.
20643 (load_zeroextendhisi_update): Likewise.
20644 (load_signextendhisi_update): Likewise.
20645 (loadsi_update): Likewise.
20646 (loadsf_update): Likewise.
20647 (movsicc_insn): Likewise.
20648 (bset_insn): Likewise.
20649 (bxor_insn): Likewise.
20650 (bclr_insn): Likewise.
20651 (bmsk_insn): Likewise.
20652 (bicsi3_insn): Likewise.
20653 (cmpsi_cc_c_insn): Likewise.
20654 (movsi_ne): Likewise.
20655 (movsi_cond_exec): Likewise.
20656 (clrsbsi2): Likewise.
20657 (norm_f): Likewise.
20658 (normw): Likewise.
20659 (swap): Likewise.
20660 (divaw): Likewise.
20661 (flag): Likewise.
20662 (sr): Likewise.
20663 (kflag): Likewise.
20664 (ffs): Likewise.
20665 (ffs_f): Likewise.
20666 (fls): Likewise.
20667 (call_i): Remove 'S' asm letter, add jli instruction.
20668 (call_value_i): Likewise.
20669 * config/arc/arc.op (mjli-always): New option.
20670 * config/arc/constraints.md (Cji): New constraint.
20671 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20672 operand.
20673 (subsf3_fpx): Likewise.
20674 (mulsf3_fpx): Likewise.
20675 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20676 asm operand.
20677 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20678 function attrbutes.
20679 * doc/invoke.texi (ARC): Document mjli-always option.
20680
20681 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20682
20683 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20684 avoid addition with 0 and use incw and decw where possible.
20685
20686 2018-01-26 Richard Biener <rguenther@suse.de>
20687
20688 PR tree-optimization/81082
20689 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20690 association if it requires casting to unsigned.
20691 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20692 from fold_plusminus_mult_expr to catch important cases late when
20693 range info is available.
20694
20695 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20696
20697 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20698 * configure.ac (hidden_linkonce): New test.
20699 * configure: Regenerate.
20700 * config.in: Regenerate.
20701
20702 2018-01-26 Julia Koval <julia.koval@intel.com>
20703
20704 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20705 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20706 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20707 _mm_mask_bitshuffle_epi64_mask): Fix type.
20708 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20709 USI_FTYPE_V4DI_V4DI_USI): Remove.
20710 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20711 __builtin_ia32_vpshufbitqmb256_mask,
20712 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20713 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20714 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20715
20716 2018-01-26 Alan Modra <amodra@gmail.com>
20717
20718 PR target/84033
20719 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20720 UNSPEC_VBPERMQ. Sort other unspecs.
20721
20722 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20723
20724 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20725
20726 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20727
20728 PR middle-end/83055
20729 * predict.c (drop_profile): Do not push/pop cfun; update also
20730 node->count.
20731 (handle_missing_profiles): Fix logic looking for zero profiles.
20732
20733 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20734
20735 PR middle-end/83977
20736 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20737 on functions with #pragma omp declare simd or functions with simd
20738 attribute.
20739 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20740 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20741 Remove trailing \n from warning_at calls.
20742
20743 2018-01-25 Tom de Vries <tom@codesourcery.com>
20744
20745 PR target/84028
20746 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20747 for neutered workers.
20748
20749 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20750
20751 PR target/68467
20752 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20753 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20754
20755 2018-01-24 Jeff Law <law@redhat.com>
20756
20757 PR target/83994
20758 * i386.c (get_probe_interval): Move to earlier point.
20759 (ix86_compute_frame_layout): If -fstack-clash-protection and
20760 the frame is larger than the probe interval, then use pushes
20761 to save registers rather than reg->mem moves.
20762 (ix86_expand_prologue): Remove conditional for int_registers_saved
20763 assertion.
20764
20765 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20766
20767 PR target/84014
20768 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20769 min/max for never referenced object.
20770
20771 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20772
20773 PR middle-end/83977
20774 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20775 here.
20776 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20777 attributes from DECL_ATTRIBUTES (decl) without affecting
20778 DECL_ATTRIBUTES (current_function_decl).
20779 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20780 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20781
20782 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20783
20784 PR tree-optimization/83979
20785 * fold-const.c (fold_comparison): Use constant_boolean_node
20786 instead of boolean_{true,false}_node.
20787
20788 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20789
20790 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20791 with zero counts.
20792
20793 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20794
20795 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20796 Simplify the clause that sets the length attribute.
20797 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20798 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20799 clause that sets the length attribute.
20800 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20801
20802 2018-01-24 Tom de Vries <tom@codesourcery.com>
20803
20804 PR target/83589
20805 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20806 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20807 Add strict parameter.
20808 (prevent_branch_around_nothing): Insert dummy insn between branch to
20809 label and label with no ptx insn inbetween.
20810 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20811
20812 2018-01-24 Tom de Vries <tom@codesourcery.com>
20813
20814 PR target/81352
20815 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20816 for neutered threads in warp.
20817 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20818
20819 2018-01-24 Richard Biener <rguenther@suse.de>
20820
20821 PR tree-optimization/83176
20822 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20823 operands.
20824
20825 2018-01-24 Richard Biener <rguenther@suse.de>
20826
20827 PR tree-optimization/82819
20828 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20829 code generating pluses that are no-ops in the target precision.
20830
20831 2018-01-24 Richard Biener <rguenther@suse.de>
20832
20833 PR middle-end/84000
20834 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20835
20836 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20837
20838 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20839 to merge probabilities.
20840 * predict.c (probably_never_executed): Also mark as cold functions
20841 with global 0 profile and guessed local profile.
20842 * profile-count.c (profile_probability::combine_with_count): New
20843 member function.
20844 * profile-count.h (profile_probability::operator*,
20845 profile_probability::operator*=, profile_probability::operator/,
20846 profile_probability::operator/=): Reduce precision to adjusted
20847 and set value to guessed on contradictory divisions.
20848 (profile_probability::combine_with_freq): Remove.
20849 (profile_probability::combine_wiht_count): Declare.
20850 (profile_count::force_nonzero):: Set to adjusted.
20851 (profile_count::probability_in):: Set quality to adjusted.
20852 * tree-ssa-tail-merge.c (replace_block_by): Use
20853 combine_with_count.
20854
20855 2018-01-23 Andrew Waterman <andrew@sifive.com>
20856 Jim Wilson <jimw@sifive.com>
20857
20858 * config/riscv/riscv.c (riscv_stack_boundary): New.
20859 (riscv_option_override): Set riscv_stack_boundary. Handle
20860 riscv_preferred_stack_boundary_arg.
20861 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20862 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20863 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20864 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20865 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20866 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20867
20868 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20869
20870 PR target/83905
20871 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20872 of struct ix86_frame.
20873 (ix86_expand_epilogue): Likewise. Add a local variable for
20874 the reg_save_offset field in struct ix86_frame.
20875
20876 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20877
20878 PR tree-optimization/82604
20879 * tree-loop-distribution.c (enum partition_kind): New enum item
20880 PKIND_PARTIAL_MEMSET.
20881 (partition_builtin_p): Support above new enum item.
20882 (generate_code_for_partition): Ditto.
20883 (compute_access_range): Differentiate cases that equality can be
20884 proven at all loops, the innermost loops or no loops.
20885 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20886 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20887 (finalize_partitions, distribute_loop): Don't fuse partition of
20888 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20889 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20890 parloop is enabled.
20891
20892 2018-01-23 Martin Liska <mliska@suse.cz>
20893
20894 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20895 order to ignore the predictor.
20896 (PRED_POLYMORPHIC_CALL): Likewise.
20897 (PRED_RECURSIVE_CALL): Likewise.
20898
20899 2018-01-23 Martin Liska <mliska@suse.cz>
20900
20901 * tree-profile.c (tree_profiling): Print function header to
20902 aware reader which function we are working on.
20903 * value-prof.c (gimple_find_values_to_profile): Do not print
20904 not interesting value histograms.
20905
20906 2018-01-23 Martin Liska <mliska@suse.cz>
20907
20908 * profile-count.h (enum profile_quality): Add
20909 profile_uninitialized as the first value. Do not number values
20910 as they are zero based.
20911 (profile_count::verify): Update sanity check.
20912 (profile_probability::verify): Likewise.
20913
20914 2018-01-23 Nathan Sidwell <nathan@acm.org>
20915
20916 * doc/invoke.texi (ffor-scope): Deprecate.
20917
20918 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20919
20920 PR tree-optimization/83510
20921 * domwalk.c (set_all_edges_as_executable): New function.
20922 (dom_walker::dom_walker): Convert bool param
20923 "skip_unreachable_blocks" to enum reachability. Move setup of
20924 edge flags to set_all_edges_as_executable and only do it when
20925 reachability is REACHABLE_BLOCKS.
20926 * domwalk.h (enum dom_walker::reachability): New enum.
20927 (dom_walker::dom_walker): Convert bool param
20928 "skip_unreachable_blocks" to enum reachability.
20929 (set_all_edges_as_executable): New decl.
20930 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20931 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20932 "reachability".
20933 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20934 but converting true to REACHABLE_BLOCKS.
20935 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20936 * tree-vrp.c
20937 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20938 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20939 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20940 REACHABLE_BLOCKS.
20941 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20942 if check_all_array_refs will be called.
20943
20944 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20945
20946 * tree.c (selftest::test_location_wrappers): Add more test
20947 coverage.
20948
20949 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20950
20951 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20952 (selftest::test_bit_in_range): Likewise.
20953
20954 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20955
20956 PR testsuite/83888
20957 * doc/sourcebuild.texi (vect_float): Say that the selector
20958 only describes the situation when -funsafe-math-optimizations is on.
20959 (vect_float_strict): Document.
20960
20961 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20962
20963 PR tree-optimization/83965
20964 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20965 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20966 instead of checking only for a reduction.
20967 (vect_recog_widen_sum_pattern): Likewise.
20968
20969 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20970
20971 * predict.c (probably_never_executed): Only use precise profile info.
20972 (compute_function_frequency): Skip after inlining hack since we now
20973 have quality checking.
20974
20975 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20976
20977 * profile-count.h (profile_probability::very_unlikely,
20978 profile_probability::unlikely, profile_probability::even): Set
20979 precision to guessed.
20980
20981 2018-01-23 Richard Biener <rguenther@suse.de>
20982
20983 PR tree-optimization/83963
20984 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20985 Properly terminate dominator walk when crossing the exit edge not
20986 when visiting its source block.
20987
20988 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20989
20990 PR c++/83918
20991 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20992 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20993
20994 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20995
20996 PR tree-optimization/83957
20997 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20998 semicolon after for body surrounded by braces.
20999
21000 PR tree-optimization/83081
21001 * profile-count.h (profile_probability::split): New method.
21002 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
21003 Use profile_probability::split.
21004 (do_compare_rtx_and_jump): Fix adjustment of probabilities
21005 when splitting a single conditional jump into 2.
21006
21007 2018-01-22 David Malcolm <dmalcolm@redhat.com>
21008
21009 PR tree-optimization/69452
21010 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
21011 decl.
21012
21013 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21014
21015 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
21016 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
21017 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
21018
21019 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21020
21021 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
21022 declaration.
21023 * config/rl78/rl78.md (movdi): New define_expand.
21024 * config/rl78/rl78.c (rl78_split_movdi): New function.
21025
21026 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
21027
21028 PR target/83862
21029 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
21030 no longer used.
21031 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
21032 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
21033 128-bit to produce an UNSPEC move to get the double word with the
21034 signbit and then a shift directly to do signbit.
21035 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
21036 implementation with a new version that just does either a direct
21037 move or a regular move. Move memory interface to separate insns.
21038 Move insns so they are next to the expander.
21039 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
21040 with signbit move. Split big and little endian case.
21041 (signbit<mode>2_dm_mem_le): Likewise.
21042 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
21043 (signbit<mode>2_dm2): Likewise.
21044
21045 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21046
21047 * config/rl78/rl78.md (anddi3): New define_expand.
21048
21049 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21050
21051 * config/rl78/rl78.md (umindi3): New define_expand.
21052
21053 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21054
21055 * config/rl78/rl78.md (smindi3): New define_expand.
21056
21057 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21058
21059 * config/rl78/rl78.md (smaxdi3): New define_expand.
21060
21061 2018-01-22 Carl Love <cel@us.ibm.com>
21062
21063 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
21064 LVX_V1TI): Add macro expansion.
21065 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
21066 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
21067 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
21068 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
21069 Change check to determine if the instruction is a byte reversing
21070 entry. Fix typo in comment.
21071 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
21072 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
21073 Add def_builtin calls for new builtins.
21074 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
21075 Add define_insn expansion.
21076
21077 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21078
21079 * config/rl78/rl78.md (umaxdi3): New define_expand.
21080
21081 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
21082
21083 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
21084 for non-QImode registers.
21085
21086 2018-01-22 Richard Biener <rguenther@suse.de>
21087
21088 PR tree-optimization/83963
21089 * graphite-scop-detection.c (scop_detection::get_sese): Delay
21090 including the loop exit block.
21091 (scop_detection::merge_sese): Likewise.
21092 (scop_detection::add_scop): Do it here instead.
21093
21094 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21095
21096 * doc/sourcebuild.texi (arm_softfloat): Document.
21097
21098 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
21099
21100 PR gcc/77734
21101 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
21102 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
21103 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
21104
21105 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21106 David Edelsohn <dje.gcc@gmail.com>
21107
21108 PR target/83946
21109 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21110 Change "crset eq" to "crset 2".
21111 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21112 (*call_indirect_aix<mode>_nospec): Likewise.
21113 (*call_value_indirect_aix<mode>_nospec): Likewise.
21114 (*call_indirect_elfv2<mode>_nospec): Likewise.
21115 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
21116 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
21117 change assembly output from . to $.
21118 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21119 (indirect_jump<mode>_nospec): Change assembly output from . to $.
21120 (*tablejump<mode>_internal1_nospec): Likewise.
21121
21122 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
21123
21124 PR target/80870
21125 * config/sh/sh_optimize_sett_clrt.cc:
21126 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
21127
21128 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
21129
21130 PR tree-optimization/83940
21131 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
21132 offset_dt to vect_constant_def rather than vect_unknown_def_type.
21133 (vect_check_load_store_mask): Add a mask_dt_out parameter and
21134 use it to pass back the definition type.
21135 (vect_check_store_rhs): Likewise rhs_dt_out.
21136 (vect_build_gather_load_calls): Add a mask_dt argument and use
21137 it instead of a call to vect_is_simple_use.
21138 (vectorizable_store): Update calls to vect_check_load_store_mask
21139 and vect_check_store_rhs. Use the dt returned by the latter instead
21140 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
21141 instead of calls to vect_is_simple_use. Pass the scalar rather
21142 than the vector operand to vect_is_simple_use when handling
21143 second and subsequent copies of an rhs value.
21144 (vectorizable_load): Update calls to vect_check_load_store_mask
21145 and vect_build_gather_load_calls. Use the cached mask_dt and
21146 gs_info.offset_dt instead of calls to vect_is_simple_use.
21147
21148 2018-01-20 Jakub Jelinek <jakub@redhat.com>
21149
21150 PR middle-end/83945
21151 * tree-emutls.c: Include gimplify.h.
21152 (lower_emutls_2): New function.
21153 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
21154 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
21155 it before further processing.
21156
21157 PR target/83930
21158 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
21159 UINTVAL (trueop1) instead of INTVAL (op1).
21160
21161 2018-01-19 Jakub Jelinek <jakub@redhat.com>
21162
21163 PR debug/81570
21164 PR debug/83728
21165 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
21166 INCOMING_FRAME_SP_OFFSET if not defined.
21167 (scan_trace): Add ENTRY argument. If true and
21168 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
21169 emit a note to adjust the CFA offset.
21170 (create_cfi_notes): Adjust scan_trace callers.
21171 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
21172 INCOMING_FRAME_SP_OFFSET in the CIE.
21173 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
21174 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
21175 Likewise.
21176 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
21177 * doc/tm.texi: Regenerated.
21178
21179 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21180
21181 PR rtl-optimization/83147
21182 * lra-constraints.c (remove_inheritance_pseudos): Use
21183 lra_substitute_pseudo_within_insn.
21184
21185 2018-01-19 Tom de Vries <tom@codesourcery.com>
21186 Cesar Philippidis <cesar@codesourcery.com>
21187
21188 PR target/83920
21189 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
21190
21191 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
21192
21193 PR target/83790
21194 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
21195 spaces for function labels.
21196
21197 2018-01-19 Martin Liska <mliska@suse.cz>
21198
21199 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
21200 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
21201 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
21202 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
21203 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
21204 (PRED_CONST_RETURN): Change from 69 to 65.
21205 (PRED_NULL_RETURN): Change from 91 to 71.
21206 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
21207 (PRED_LOOP_GUARD): Change from 66 to 73.
21208
21209 2018-01-19 Martin Liska <mliska@suse.cz>
21210
21211 * predict.c (predict_insn_def): Add new assert.
21212 (struct branch_predictor): Change type to signed integer.
21213 (test_prediction_value_range): Amend test to cover
21214 PROB_UNINITIALIZED.
21215 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
21216 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
21217 (PRED_LOOP_ITERATIONS_MAX): Likewise.
21218 (PRED_LOOP_IV_COMPARE): Likewise.
21219 * predict.h (PROB_UNINITIALIZED): Define new constant.
21220
21221 2018-01-19 Martin Liska <mliska@suse.cz>
21222
21223 * predict.c (dump_prediction): Add new format for
21224 analyze_brprob.py script which is enabled with -details
21225 suboption.
21226 * profile-count.h (precise_p): New function.
21227
21228 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21229
21230 PR tree-optimization/83922
21231 * tree-vect-loop.c (vect_verify_full_masking): Return false if
21232 there are no statements that need masking.
21233 (vect_active_double_reduction_p): New function.
21234 (vect_analyze_loop_operations): Use it when handling phis that
21235 are not in the loop header.
21236
21237 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
21238
21239 PR tree-optimization/83914
21240 * tree-vect-loop.c (vectorizable_induction): Don't convert
21241 init_expr or apply the peeling adjustment for inductions
21242 that are nested within the vectorized loop.
21243
21244 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21245
21246 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
21247 instead of NEG.
21248
21249 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21250
21251 PR sanitizer/81715
21252 PR testsuite/83882
21253 * function.h (gimplify_parameters): Add gimple_seq * argument.
21254 * function.c: Include gimple.h and options.h.
21255 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
21256 for the added local temporaries if needed.
21257 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
21258 if there are any parameter cleanups, wrap whole body into a
21259 try/finally with the cleanups.
21260
21261 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
21262
21263 PR target/82964
21264 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
21265 Use GET_MODE_CLASS for scalar floating point.
21266
21267 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21268
21269 PR ipa/82256
21270 patch by PaX Team
21271 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
21272 Fix call of call_cgraph_insertion_hooks.
21273
21274 2018-01-18 Martin Sebor <msebor@redhat.com>
21275
21276 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
21277
21278 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
21279
21280 PR ipa/83619
21281 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
21282 frequencies.
21283
21284 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
21285
21286 PR other/70268
21287 * common.opt: (-ffile-prefix-map): New option.
21288 * opts.c (common_handle_option): Defer it.
21289 * opts-global.c (handle_common_deferred_options): Handle it.
21290 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
21291 * file-prefix-map.h: New file.
21292 (remap_debug_filename, add_debug_prefix_map): ...here.
21293 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
21294 * final.c (debug_prefix_map, add_debug_prefix_map
21295 remap_debug_filename): Move to...
21296 * file-prefix-map.c: New file.
21297 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
21298 generalize, get rid of alloca(), use strrchr() instead of strchr().
21299 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
21300 Implement in terms of add_prefix_map().
21301 (remap_macro_filename, remap_debug_filename): Implement in term of
21302 remap_filename().
21303 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
21304 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
21305 * dbxout.c: Include file-prefix-map.h.
21306 * varasm.c: Likewise.
21307 * vmsdbgout.c: Likewise.
21308 * xcoffout.c: Likewise.
21309 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
21310 * doc/cppopts.texi (-fmacro-prefix-map): Document.
21311 * doc/invoke.texi (-ffile-prefix-map): Document.
21312 (-fdebug-prefix-map): Update description.
21313
21314 2018-01-18 Martin Liska <mliska@suse.cz>
21315
21316 * config/i386/i386.c (indirect_thunk_name): Document that also
21317 lfence is emitted.
21318 (output_indirect_thunk): Document why both instructions
21319 (pause and lfence) are generated.
21320
21321 2018-01-18 Richard Biener <rguenther@suse.de>
21322
21323 PR tree-optimization/83887
21324 * graphite-scop-detection.c
21325 (scop_detection::get_nearest_dom_with_single_entry): Remove.
21326 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
21327 (scop_detection::merge_sese): Re-implement with a flood-fill
21328 algorithm that properly finds a SESE region if it exists.
21329
21330 2018-01-18 Jakub Jelinek <jakub@redhat.com>
21331
21332 PR c/61240
21333 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
21334 pointer_diff optimizations use view_convert instead of convert.
21335
21336 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21337
21338 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21339 Generate different code for -mno-speculate-indirect-jumps.
21340 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21341 (*call_indirect_aix<mode>): Disable for
21342 -mno-speculate-indirect-jumps.
21343 (*call_indirect_aix<mode>_nospec): New define_insn.
21344 (*call_value_indirect_aix<mode>): Disable for
21345 -mno-speculate-indirect-jumps.
21346 (*call_value_indirect_aix<mode>_nospec): New define_insn.
21347 (*sibcall_nonlocal_sysv<mode>): Generate different code for
21348 -mno-speculate-indirect-jumps.
21349 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21350
21351 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21352
21353 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21354 long double type, set the flags for noting the default long double
21355 type, even if we don't pass or return a long double type.
21356
21357 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
21358
21359 PR ipa/83051
21360 * ipa-inline.c (flatten_function): Do not overwrite final inlining
21361 failure.
21362
21363 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
21364
21365 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21366 support for merge[hl].
21367 (fold_mergehl_helper): New helper function.
21368 (tree-vector-builder.h): New #include for tree_vector_builder usage.
21369 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21370 (altivec_vmrglw_direct): Add xxmrglw insn.
21371
21372 2018-01-17 Andrew Waterman <andrew@sifive.com>
21373
21374 * config/riscv/riscv.c (riscv_conditional_register_usage): If
21375 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21376
21377 2018-01-17 David Malcolm <dmalcolm@redhat.com>
21378
21379 PR lto/83121
21380 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21381 call the lto_location_cache before reading the
21382 DECL_SOURCE_LOCATION of the types.
21383
21384 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
21385 Richard Sandiford <richard.sandiford@linaro.org>
21386
21387 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21388 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21389 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21390 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21391 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21392 Add declaration.
21393 * config/aarch64/constraints.md (aarch64_movti_operand):
21394 Limit immediates.
21395 * config/aarch64/predicates.md (Uti): Add new constraint.
21396
21397 2018-01-17 Carl Love <cel@us.ibm.com>
21398
21399 * config/rs6000/vsx.md (define_expand xl_len_r,
21400 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21401 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21402 lxvll.
21403 (define_expand, define_insn): Move the shift left from the
21404 define_insn to the define_expand for lxvl and stxvl instructions.
21405 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21406 and XL_LEN_R definitions to PURE.
21407
21408 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
21409
21410 * config/i386/i386.c (indirect_thunk_name): Declare regno
21411 as unsigned int. Compare regno with INVALID_REGNUM.
21412 (output_indirect_thunk): Ditto.
21413 (output_indirect_thunk_function): Ditto.
21414 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
21415 in the call to output_indirect_thunk_function.
21416
21417 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
21418
21419 PR middle-end/83884
21420 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21421 rather than the size of inner_type to determine the stack slot size
21422 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21423
21424 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
21425
21426 PR target/83546
21427 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21428 to PTA_SILVERMONT.
21429
21430 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
21431
21432 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21433 endian Linux systems to optionally enable multilibs for selecting
21434 the long double type if the user configured an explicit type.
21435 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21436 have no long double multilibs if not defined.
21437 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21438 warn if the user used -mabi={ieee,ibm}longdouble and we built
21439 multilibs for long double.
21440 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21441 appropriate multilib option.
21442 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21443 multilib options.
21444 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21445 for building long double multilibs.
21446 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21447
21448 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
21449
21450 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21451 copies.
21452
21453 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21454 64 bits.
21455 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21456 128 bits.
21457
21458 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21459 variables.
21460
21461 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21462 return value.
21463
21464 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21465
21466 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21467 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21468
21469 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
21470
21471 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21472 different rtl trees depending on TARGET_64BIT.
21473 (rs6000_gen_lvx): Likewise.
21474
21475 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21476
21477 * config/visium/visium.md (nop): Tweak comment.
21478 (hazard_nop): Likewise.
21479
21480 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21481
21482 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21483 -mspeculate-indirect-jumps.
21484 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21485 for -mno-speculate-indirect-jumps.
21486 (*call_indirect_elfv2<mode>_nospec): New define_insn.
21487 (*call_value_indirect_elfv2<mode>): Disable for
21488 -mno-speculate-indirect-jumps.
21489 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21490 (indirect_jump): Emit different RTL for
21491 -mno-speculate-indirect-jumps.
21492 (*indirect_jump<mode>): Disable for
21493 -mno-speculate-indirect-jumps.
21494 (*indirect_jump<mode>_nospec): New define_insn.
21495 (tablejump): Emit different RTL for
21496 -mno-speculate-indirect-jumps.
21497 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21498 (tablejumpsi_nospec): New define_expand.
21499 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21500 (tablejumpdi_nospec): New define_expand.
21501 (*tablejump<mode>_internal1): Disable for
21502 -mno-speculate-indirect-jumps.
21503 (*tablejump<mode>_internal1_nospec): New define_insn.
21504 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21505 option.
21506
21507 2018-01-16 Artyom Skrobov tyomitch@gmail.com
21508
21509 * caller-save.c (insert_save): Drop unnecessary parameter. All
21510 callers updated.
21511
21512 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21513 Richard Biener <rguenth@suse.de>
21514
21515 PR libgomp/83590
21516 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21517 return early, inline manually is_gimple_sizepos. Make sure if we
21518 call gimplify_expr we don't end up with a gimple constant.
21519 * tree.c (variably_modified_type_p): Don't return true for
21520 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
21521 * gimplify.h (is_gimple_sizepos): Remove.
21522
21523 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21524
21525 PR tree-optimization/83857
21526 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21527 vectorizable_live_operation for pure SLP statements.
21528 (vectorizable_live_operation): Handle PHIs.
21529
21530 2018-01-16 Richard Biener <rguenther@suse.de>
21531
21532 PR tree-optimization/83867
21533 * tree-vect-stmts.c (vect_transform_stmt): Precompute
21534 nested_in_vect_loop_p since the scalar stmt may get invalidated.
21535
21536 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21537
21538 PR c/83844
21539 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21540 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21541 If off is not INTEGER_CST, issue a may not be aligned warning
21542 rather than isn't aligned. Use isn%'t rather than isn't.
21543 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21544 into MULT_EXPR.
21545 <case MULT_EXPR>: Improve the case when bottom and one of the
21546 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21547 operand, in that case check if the other operand is multiple of
21548 bottom divided by the INTEGER_CST operand.
21549
21550 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21551
21552 PR target/83858
21553 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21554 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21555 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21556 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21557 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21558 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21559 (pa_function_arg_size): New function.
21560
21561 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21562
21563 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21564 in a separate statement.
21565
21566 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21567
21568 PR tree-optimization/83847
21569 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21570 group gathers and scatters.
21571
21572 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21573
21574 PR rtl-optimization/86620
21575 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21576
21577 PR rtl-optimization/83213
21578 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21579 to last if both are JUMP_INSNs.
21580
21581 PR tree-optimization/83843
21582 * gimple-ssa-store-merging.c
21583 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21584 store_immediate_info for bswap/nop orig_stores.
21585
21586 2018-01-15 Andrew Waterman <andrew@sifive.com>
21587
21588 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21589 !TARGET_MUL.
21590 <UDIV>: Increase cost if !TARGET_DIV.
21591
21592 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21593
21594 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21595 (define_attr "cr_logical_3op"): New.
21596 (cceq_ior_compare): Adjust.
21597 (cceq_ior_compare_complement): Adjust.
21598 (*cceq_rev_compare): Adjust.
21599 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21600 (is_cracked_insn): Adjust.
21601 (insn_must_be_first_in_group): Adjust.
21602 * config/rs6000/40x.md: Adjust.
21603 * config/rs6000/440.md: Adjust.
21604 * config/rs6000/476.md: Adjust.
21605 * config/rs6000/601.md: Adjust.
21606 * config/rs6000/603.md: Adjust.
21607 * config/rs6000/6xx.md: Adjust.
21608 * config/rs6000/7450.md: Adjust.
21609 * config/rs6000/7xx.md: Adjust.
21610 * config/rs6000/8540.md: Adjust.
21611 * config/rs6000/cell.md: Adjust.
21612 * config/rs6000/e300c2c3.md: Adjust.
21613 * config/rs6000/e500mc.md: Adjust.
21614 * config/rs6000/e500mc64.md: Adjust.
21615 * config/rs6000/e5500.md: Adjust.
21616 * config/rs6000/e6500.md: Adjust.
21617 * config/rs6000/mpc.md: Adjust.
21618 * config/rs6000/power4.md: Adjust.
21619 * config/rs6000/power5.md: Adjust.
21620 * config/rs6000/power6.md: Adjust.
21621 * config/rs6000/power7.md: Adjust.
21622 * config/rs6000/power8.md: Adjust.
21623 * config/rs6000/power9.md: Adjust.
21624 * config/rs6000/rs64.md: Adjust.
21625 * config/rs6000/titan.md: Adjust.
21626
21627 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21628
21629 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21630 ix86_indirect_branch_register logic.
21631
21632 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21633
21634 * config/i386/constraints.md (Bs): Update
21635 ix86_indirect_branch_register check. Don't check
21636 ix86_indirect_branch_register with GOT_memory_operand.
21637 (Bw): Likewise.
21638 * config/i386/predicates.md (GOT_memory_operand): Don't check
21639 ix86_indirect_branch_register here.
21640 (GOT32_symbol_operand): Likewise.
21641
21642 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21643
21644 * config/i386/predicates.md (constant_call_address_operand):
21645 Rewrite ix86_indirect_branch_register logic.
21646 (sibcall_insn_operand): Likewise.
21647
21648 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21649
21650 * config/i386/constraints.md (Bs): Replace
21651 ix86_indirect_branch_thunk_register with
21652 ix86_indirect_branch_register.
21653 (Bw): Likewise.
21654 * config/i386/i386.md (indirect_jump): Likewise.
21655 (tablejump): Likewise.
21656 (*sibcall_memory): Likewise.
21657 (*sibcall_value_memory): Likewise.
21658 Peepholes of indirect call and jump via memory: Likewise.
21659 * config/i386/i386.opt: Likewise.
21660 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21661 (GOT_memory_operand): Likewise.
21662 (call_insn_operand): Likewise.
21663 (sibcall_insn_operand): Likewise.
21664 (GOT32_symbol_operand): Likewise.
21665
21666 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21667
21668 PR middle-end/83837
21669 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21670 type rather than type addr's type points to.
21671 (expand_omp_atomic_mutex): Likewise.
21672 (expand_omp_atomic): Likewise.
21673
21674 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21675
21676 PR target/83839
21677 * config/i386/i386.c (output_indirect_thunk_function): Use
21678 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21679 for __x86_return_thunk.
21680
21681 2018-01-15 Richard Biener <rguenther@suse.de>
21682
21683 PR middle-end/83850
21684 * expmed.c (extract_bit_field_1): Fix typo.
21685
21686 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21687
21688 PR target/83687
21689 * config/arm/iterators.md (VF): New mode iterator.
21690 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21691 Remove integer-related logic from pattern.
21692 (neon_vabd<mode>_3): Likewise.
21693
21694 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21695
21696 PR middle-end/82694
21697 * common.opt (fstrict-overflow): No longer an alias.
21698 (fwrapv-pointer): New option.
21699 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21700 also for pointer types based on flag_wrapv_pointer.
21701 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21702 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21703 opts->x_flag_wrapv got set.
21704 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21705 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21706 POINTER_TYPE_OVERFLOW_UNDEFINED.
21707 * match.pd: Likewise in address comparison pattern.
21708 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21709
21710 2018-01-15 Richard Biener <rguenther@suse.de>
21711
21712 PR lto/83804
21713 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21714 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21715 Reset type names to their identifier if their TYPE_DECL doesn't
21716 have linkage (and thus is used for ODR and devirt).
21717 (save_debug_info_for_decl): Remove.
21718 (save_debug_info_for_type): Likewise.
21719 (add_tree_to_fld_list): Adjust.
21720 * tree-pretty-print.c (dump_generic_node): Make dumping of
21721 type names more robust.
21722
21723 2018-01-15 Richard Biener <rguenther@suse.de>
21724
21725 * BASE-VER: Bump to 8.0.1.
21726
21727 2018-01-14 Martin Sebor <msebor@redhat.com>
21728
21729 PR other/83508
21730 * builtins.c (check_access): Avoid warning when the no-warning bit
21731 is set.
21732
21733 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21734
21735 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21736 * ira-color (allocno_hard_regs_compare): Likewise.
21737
21738 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21739
21740 PR target/83013
21741 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21742 Use .pushsection/.popsection.
21743
21744 2018-01-14 Martin Sebor <msebor@redhat.com>
21745
21746 PR c++/81327
21747 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21748
21749 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21750
21751 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21752 entry from extra_headers.
21753 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21754 extra_headers, make the list bitwise identical to the i?86-*-* one.
21755
21756 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21757
21758 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21759 -mcmodel=large with -mindirect-branch=thunk,
21760 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21761 -mfunction-return=thunk-extern.
21762 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21763 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21764 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21765
21766 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21767
21768 * config/i386/i386.c (print_reg): Print the name of the full
21769 integer register without '%'.
21770 (ix86_print_operand): Handle 'V'.
21771 * doc/extend.texi: Document 'V' modifier.
21772
21773 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21774
21775 * config/i386/constraints.md (Bs): Disallow memory operand for
21776 -mindirect-branch-register.
21777 (Bw): Likewise.
21778 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21779 (GOT_memory_operand): Likewise.
21780 (call_insn_operand): Likewise.
21781 (sibcall_insn_operand): Likewise.
21782 (GOT32_symbol_operand): Likewise.
21783 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21784 for -mindirect-branch-register.
21785 (tablejump): Likewise.
21786 (*sibcall_memory): Likewise.
21787 (*sibcall_value_memory): Likewise.
21788 Disallow peepholes of indirect call and jump via memory for
21789 -mindirect-branch-register.
21790 (*call_pop): Replace m with Bw.
21791 (*call_value_pop): Likewise.
21792 (*sibcall_pop_memory): Replace m with Bs.
21793 * config/i386/i386.opt (mindirect-branch-register): New option.
21794 * doc/invoke.texi: Document -mindirect-branch-register option.
21795
21796 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21797
21798 * config/i386/i386-protos.h (ix86_output_function_return): New.
21799 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21800 set function_return_type.
21801 (indirect_thunk_name): Add ret_p to indicate thunk for function
21802 return.
21803 (output_indirect_thunk_function): Pass false to
21804 indirect_thunk_name.
21805 (ix86_output_indirect_branch_via_reg): Likewise.
21806 (ix86_output_indirect_branch_via_push): Likewise.
21807 (output_indirect_thunk_function): Create alias for function
21808 return thunk if regno < 0.
21809 (ix86_output_function_return): New function.
21810 (ix86_handle_fndecl_attribute): Handle function_return.
21811 (ix86_attribute_table): Add function_return.
21812 * config/i386/i386.h (machine_function): Add
21813 function_return_type.
21814 * config/i386/i386.md (simple_return_internal): Use
21815 ix86_output_function_return.
21816 (simple_return_internal_long): Likewise.
21817 * config/i386/i386.opt (mfunction-return=): New option.
21818 (indirect_branch): Mention -mfunction-return=.
21819 * doc/extend.texi: Document function_return function attribute.
21820 * doc/invoke.texi: Document -mfunction-return= option.
21821
21822 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21823
21824 * config/i386/i386-opts.h (indirect_branch): New.
21825 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21826 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21827 with local indirect jump when converting indirect call and jump.
21828 (ix86_set_indirect_branch_type): New.
21829 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21830 (indirectlabelno): New.
21831 (indirect_thunk_needed): Likewise.
21832 (indirect_thunk_bnd_needed): Likewise.
21833 (indirect_thunks_used): Likewise.
21834 (indirect_thunks_bnd_used): Likewise.
21835 (INDIRECT_LABEL): Likewise.
21836 (indirect_thunk_name): Likewise.
21837 (output_indirect_thunk): Likewise.
21838 (output_indirect_thunk_function): Likewise.
21839 (ix86_output_indirect_branch_via_reg): Likewise.
21840 (ix86_output_indirect_branch_via_push): Likewise.
21841 (ix86_output_indirect_branch): Likewise.
21842 (ix86_output_indirect_jmp): Likewise.
21843 (ix86_code_end): Call output_indirect_thunk_function if needed.
21844 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21845 needed.
21846 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21847 (ix86_attribute_table): Add indirect_branch.
21848 * config/i386/i386.h (machine_function): Add indirect_branch_type
21849 and has_local_indirect_jump.
21850 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21851 to true.
21852 (tablejump): Likewise.
21853 (*indirect_jump): Use ix86_output_indirect_jmp.
21854 (*tablejump_1): Likewise.
21855 (simple_return_indirect_internal): Likewise.
21856 * config/i386/i386.opt (mindirect-branch=): New option.
21857 (indirect_branch): New.
21858 (keep): Likewise.
21859 (thunk): Likewise.
21860 (thunk-inline): Likewise.
21861 (thunk-extern): Likewise.
21862 * doc/extend.texi: Document indirect_branch function attribute.
21863 * doc/invoke.texi: Document -mindirect-branch= option.
21864
21865 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21866
21867 PR ipa/83051
21868 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21869
21870 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21871
21872 * ipa-inline.c (want_inline_small_function_p): Return false if
21873 inlining has already failed with CIF_FINAL_ERROR.
21874 (update_caller_keys): Call want_inline_small_function_p before
21875 can_inline_edge_p.
21876 (update_callee_keys): Likewise.
21877
21878 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21879
21880 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21881 New function.
21882 (rs6000_quadword_masked_address_p): Likewise.
21883 (quad_aligned_load_p): Likewise.
21884 (quad_aligned_store_p): Likewise.
21885 (const_load_sequence_p): Add comment to describe the outer-most loop.
21886 (mimic_memory_attributes_and_flags): New function.
21887 (rs6000_gen_stvx): Likewise.
21888 (replace_swapped_aligned_store): Likewise.
21889 (rs6000_gen_lvx): Likewise.
21890 (replace_swapped_aligned_load): Likewise.
21891 (replace_swapped_load_constant): Capitalize argument name in
21892 comment describing this function.
21893 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21894 and stores that access quad-word aligned addresses and replace
21895 with stvx or lvx instructions when appropriate.
21896 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21897 New function prototype.
21898 (rs6000_quadword_masked_address_p): Likewise.
21899 (rs6000_gen_lvx): Likewise.
21900 (rs6000_gen_stvx): Likewise.
21901 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21902 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21903 when memory address is aligned.
21904 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21905 this split to select lvx instruction when memory address is aligned.
21906 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21907 instruction when memory address is aligned.
21908 (*vsx_le_perm_load_v16qi): Likewise.
21909 (four unnamed splitters): Modify to select the stvx instruction
21910 when memory is aligned.
21911
21912 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21913
21914 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21915 which appears in the queue multiple times.
21916
21917 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21918 Alan Hayward <alan.hayward@arm.com>
21919 David Sherwood <david.sherwood@arm.com>
21920
21921 * tree-vectorizer.h (vec_lower_bound): New structure.
21922 (_loop_vec_info): Add check_nonzero and lower_bounds.
21923 (LOOP_VINFO_CHECK_NONZERO): New macro.
21924 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21925 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21926 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21927 fields. Make seg_len the distance travelled, not including the
21928 access size.
21929 (dr_direction_indicator): Declare.
21930 (dr_zero_step_indicator): Likewise.
21931 (dr_known_forward_stride_p): Likewise.
21932 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21933 tree-ssanames.h.
21934 (runtime_alias_check_p): Allow runtime alias checks with
21935 variable strides.
21936 (operator ==): Compare access_size and align.
21937 (prune_runtime_alias_test_list): Rework for new distinction between
21938 the access_size and seg_len.
21939 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21940 segment lengths.
21941 (get_segment_min_max): New function.
21942 (create_intersect_range_checks): Use it.
21943 (dr_step_indicator): New function.
21944 (dr_direction_indicator): Likewise.
21945 (dr_zero_step_indicator): Likewise.
21946 (dr_known_forward_stride_p): Likewise.
21947 * tree-loop-distribution.c (data_ref_segment_size): Return
21948 DR_STEP * (niters - 1).
21949 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21950 constructor.
21951 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21952 (vect_preserves_scalar_order_p): New function, split out from...
21953 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21954 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21955 (vect_vfa_access_size): New function.
21956 (vect_vfa_align): Likewise.
21957 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21958 (dump_lower_bound): New function.
21959 (vect_check_lower_bound): Likewise.
21960 (vect_small_gap_p): Likewise.
21961 (vectorizable_with_step_bound_p): Likewise.
21962 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21963 depencies if the vectorization factor is 1. Convert the checks
21964 for nonzero steps into checks on the bounds of DR_STEP. Try using
21965 a bunds check for variable steps if the minimum required step is
21966 relatively small. Update calls to the dr_with_seg_len
21967 constructor and to vect_compile_time_alias.
21968 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21969 function.
21970 (vect_loop_versioning): Call it.
21971 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21972 when retrying.
21973 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21974
21975 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21976 Alan Hayward <alan.hayward@arm.com>
21977 David Sherwood <david.sherwood@arm.com>
21978
21979 * doc/sourcebuild.texi (vect_scatter_store): Document.
21980 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21981 optabs.
21982 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21983 Document.
21984 * genopinit.c (main): Add supports_vec_scatter_store and
21985 supports_vec_scatter_store_cached to target_optabs.
21986 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21987 IFN_MASK_SCATTER_STORE.
21988 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21989 functions.
21990 * internal-fn.h (internal_store_fn_p): Declare.
21991 (internal_fn_stored_value_index): Likewise.
21992 * internal-fn.c (scatter_store_direct): New macro.
21993 (expand_scatter_store_optab_fn): New function.
21994 (direct_scatter_store_optab_supported_p): New macro.
21995 (internal_store_fn_p): New function.
21996 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21997 IFN_MASK_SCATTER_STORE.
21998 (internal_fn_mask_index): Likewise.
21999 (internal_fn_stored_value_index): New function.
22000 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
22001 for scatter stores.
22002 * optabs-query.h (supports_vec_scatter_store_p): Declare.
22003 * optabs-query.c (supports_vec_scatter_store_p): New function.
22004 * tree-vectorizer.h (vect_get_store_rhs): Declare.
22005 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
22006 true for scatter stores.
22007 (vect_gather_scatter_fn_p): Handle scatter stores too.
22008 (vect_check_gather_scatter): Consider using scatter stores if
22009 supports_vec_scatter_store_p.
22010 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
22011 scatter stores too.
22012 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22013 internal_fn_stored_value_index.
22014 (check_load_store_masking): Handle scatter stores too.
22015 (vect_get_store_rhs): Make public.
22016 (vectorizable_call): Use internal_store_fn_p.
22017 (vectorizable_store): Handle scatter store internal functions.
22018 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
22019 when deciding whether the end of the group has been reached.
22020 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
22021 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
22022 (mask_scatter_store<mode>): New insns.
22023
22024 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22025 Alan Hayward <alan.hayward@arm.com>
22026 David Sherwood <david.sherwood@arm.com>
22027
22028 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
22029 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
22030 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
22031 function.
22032 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
22033 Use vect_truncate_gather_scatter_offset if we can't treat the
22034 operation as a normal gather load or scatter store.
22035 (get_group_load_store_type): Take the gather_scatter_info
22036 as argument. Try using a gather load or scatter store for
22037 single-element groups.
22038 (get_load_store_type): Update calls to get_group_load_store_type
22039 and vect_use_strided_gather_scatters_p.
22040
22041 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22042 Alan Hayward <alan.hayward@arm.com>
22043 David Sherwood <david.sherwood@arm.com>
22044
22045 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
22046 optional tree argument.
22047 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
22048 null target hooks.
22049 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
22050 but continue to use the current value as a fallback.
22051 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
22052 to compare the updates.
22053 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
22054 (get_load_store_type): Use it when handling a strided access.
22055 (vect_get_strided_load_store_ops): New function.
22056 (vect_get_data_ptr_increment): Likewise.
22057 (vectorizable_load): Handle strided gather loads. Always pass
22058 a step to vect_create_data_ref_ptr and bump_vector_ptr.
22059
22060 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22061 Alan Hayward <alan.hayward@arm.com>
22062 David Sherwood <david.sherwood@arm.com>
22063
22064 * doc/md.texi (gather_load@var{m}): Document.
22065 (mask_gather_load@var{m}): Likewise.
22066 * genopinit.c (main): Add supports_vec_gather_load and
22067 supports_vec_gather_load_cached to target_optabs.
22068 * optabs-tree.c (init_tree_optimization_optabs): Use
22069 ggc_cleared_alloc to allocate target_optabs.
22070 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
22071 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
22072 functions.
22073 * internal-fn.h (internal_load_fn_p): Declare.
22074 (internal_gather_scatter_fn_p): Likewise.
22075 (internal_fn_mask_index): Likewise.
22076 (internal_gather_scatter_fn_supported_p): Likewise.
22077 * internal-fn.c (gather_load_direct): New macro.
22078 (expand_gather_load_optab_fn): New function.
22079 (direct_gather_load_optab_supported_p): New macro.
22080 (direct_internal_fn_optab): New function.
22081 (internal_load_fn_p): Likewise.
22082 (internal_gather_scatter_fn_p): Likewise.
22083 (internal_fn_mask_index): Likewise.
22084 (internal_gather_scatter_fn_supported_p): Likewise.
22085 * optabs-query.c (supports_at_least_one_mode_p): New function.
22086 (supports_vec_gather_load_p): Likewise.
22087 * optabs-query.h (supports_vec_gather_load_p): Declare.
22088 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
22089 and memory_type field.
22090 (NUM_PATTERNS): Bump to 15.
22091 * tree-vect-data-refs.c: Include internal-fn.h.
22092 (vect_gather_scatter_fn_p): New function.
22093 (vect_describe_gather_scatter_call): Likewise.
22094 (vect_check_gather_scatter): Try using internal functions for
22095 gather loads. Recognize existing calls to a gather load function.
22096 (vect_analyze_data_refs): Consider using gather loads if
22097 supports_vec_gather_load_p.
22098 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
22099 (vect_get_gather_scatter_offset_type): Likewise.
22100 (vect_convert_mask_for_vectype): Likewise.
22101 (vect_add_conversion_to_patterm): Likewise.
22102 (vect_try_gather_scatter_pattern): Likewise.
22103 (vect_recog_gather_scatter_pattern): New pattern recognizer.
22104 (vect_vect_recog_func_ptrs): Add it.
22105 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
22106 internal_fn_mask_index and internal_gather_scatter_fn_p.
22107 (check_load_store_masking): Take the gather_scatter_info as an
22108 argument and handle gather loads.
22109 (vect_get_gather_scatter_ops): New function.
22110 (vectorizable_call): Check internal_load_fn_p.
22111 (vectorizable_load): Likewise. Handle gather load internal
22112 functions.
22113 (vectorizable_store): Update call to check_load_store_masking.
22114 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
22115 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
22116 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
22117 (aarch64_gather_scale_operand_d): New predicates.
22118 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
22119 (mask_gather_load<mode>): New insns.
22120
22121 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22122 Alan Hayward <alan.hayward@arm.com>
22123 David Sherwood <david.sherwood@arm.com>
22124
22125 * optabs.def (fold_left_plus_optab): New optab.
22126 * doc/md.texi (fold_left_plus_@var{m}): Document.
22127 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
22128 * internal-fn.c (fold_left_direct): Define.
22129 (expand_fold_left_optab_fn): Likewise.
22130 (direct_fold_left_optab_supported_p): Likewise.
22131 * fold-const-call.c (fold_const_fold_left): New function.
22132 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
22133 * tree-parloops.c (valid_reduction_p): New function.
22134 (gather_scalar_reductions): Use it.
22135 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
22136 (vect_finish_replace_stmt): Declare.
22137 * tree-vect-loop.c (fold_left_reduction_fn): New function.
22138 (needs_fold_left_reduction_p): New function, split out from...
22139 (vect_is_simple_reduction): ...here. Accept reductions that
22140 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
22141 (vect_force_simple_reduction): Also store the reduction type in
22142 the assignment's STMT_VINFO_REDUC_TYPE.
22143 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
22144 (merge_with_identity): New function.
22145 (vect_expand_fold_left): Likewise.
22146 (vectorize_fold_left_reduction): Likewise.
22147 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
22148 scalar phi in place for it. Check for target support and reject
22149 cases that would reassociate the operation. Defer the transform
22150 phase to vectorize_fold_left_reduction.
22151 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
22152 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
22153 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
22154
22155 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22156
22157 * tree-if-conv.c (predicate_mem_writes): Remove redundant
22158 call to ifc_temp_var.
22159
22160 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22161 Alan Hayward <alan.hayward@arm.com>
22162 David Sherwood <david.sherwood@arm.com>
22163
22164 * target.def (legitimize_address_displacement): Take the original
22165 offset as a poly_int.
22166 * targhooks.h (default_legitimize_address_displacement): Update
22167 accordingly.
22168 * targhooks.c (default_legitimize_address_displacement): Likewise.
22169 * doc/tm.texi: Regenerate.
22170 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
22171 as an argument, moving assert of ad->disp == ad->disp_term to...
22172 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
22173 Try calling targetm.legitimize_address_displacement before expanding
22174 the address rather than afterwards, and adjust for the new interface.
22175 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
22176 Match the new hook interface. Handle SVE addresses.
22177 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
22178 new hook interface.
22179
22180 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22181
22182 * Makefile.in (OBJS): Add early-remat.o.
22183 * target.def (select_early_remat_modes): New hook.
22184 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
22185 * doc/tm.texi: Regenerate.
22186 * targhooks.h (default_select_early_remat_modes): Declare.
22187 * targhooks.c (default_select_early_remat_modes): New function.
22188 * timevar.def (TV_EARLY_REMAT): New timevar.
22189 * passes.def (pass_early_remat): New pass.
22190 * tree-pass.h (make_pass_early_remat): Declare.
22191 * early-remat.c: New file.
22192 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
22193 function.
22194 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
22195
22196 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22197 Alan Hayward <alan.hayward@arm.com>
22198 David Sherwood <david.sherwood@arm.com>
22199
22200 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
22201 vfm1 with a bound_epilog parameter.
22202 (vect_do_peeling): Update calls accordingly, and move the prologue
22203 call earlier in the function. Treat the base bound_epilog as 0 for
22204 fully-masked loops and retain vf - 1 for other loops. Add 1 to
22205 this base when peeling for gaps.
22206 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
22207 with fully-masked loops.
22208 (vect_estimate_min_profitable_iters): Handle the single peeled
22209 iteration in that case.
22210
22211 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22212 Alan Hayward <alan.hayward@arm.com>
22213 David Sherwood <david.sherwood@arm.com>
22214
22215 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
22216 single-element interleaving even if the size is not a power of 2.
22217 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
22218 accesses for single-element interleaving if the group size is
22219 not a power of 2.
22220
22221 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22222 Alan Hayward <alan.hayward@arm.com>
22223 David Sherwood <david.sherwood@arm.com>
22224
22225 * doc/md.texi (fold_extract_last_@var{m}): Document.
22226 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
22227 * optabs.def (fold_extract_last_optab): New optab.
22228 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
22229 * internal-fn.c (fold_extract_direct): New macro.
22230 (expand_fold_extract_optab_fn): Likewise.
22231 (direct_fold_extract_optab_supported_p): Likewise.
22232 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
22233 * tree-vect-loop.c (vect_model_reduction_cost): Handle
22234 EXTRACT_LAST_REDUCTION.
22235 (get_initial_def_for_reduction): Do not create an initial vector
22236 for EXTRACT_LAST_REDUCTION reductions.
22237 (vectorizable_reduction): Leave the scalar phi in place for
22238 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
22239 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
22240 epilogue code for EXTRACT_LAST_REDUCTION and defer the
22241 transform phase to vectorizable_condition.
22242 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
22243 split out from...
22244 (vect_finish_stmt_generation): ...here.
22245 (vect_finish_replace_stmt): New function.
22246 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
22247 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
22248 pattern.
22249 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
22250
22251 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22252 Alan Hayward <alan.hayward@arm.com>
22253 David Sherwood <david.sherwood@arm.com>
22254
22255 * doc/md.texi (extract_last_@var{m}): Document.
22256 * optabs.def (extract_last_optab): New optab.
22257 * internal-fn.def (EXTRACT_LAST): New internal function.
22258 * internal-fn.c (cond_unary_direct): New macro.
22259 (expand_cond_unary_optab_fn): Likewise.
22260 (direct_cond_unary_optab_supported_p): Likewise.
22261 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
22262 loops using EXTRACT_LAST.
22263 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
22264 (extract_last_<mode>): ...this optab.
22265 (vec_extract<mode><Vel>): Update accordingly.
22266
22267 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22268 Alan Hayward <alan.hayward@arm.com>
22269 David Sherwood <david.sherwood@arm.com>
22270
22271 * target.def (empty_mask_is_expensive): New hook.
22272 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
22273 * doc/tm.texi: Regenerate.
22274 * targhooks.h (default_empty_mask_is_expensive): Declare.
22275 * targhooks.c (default_empty_mask_is_expensive): New function.
22276 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
22277 if the target says that empty masks are expensive.
22278 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
22279 New function.
22280 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
22281
22282 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22283 Alan Hayward <alan.hayward@arm.com>
22284 David Sherwood <david.sherwood@arm.com>
22285
22286 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
22287 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
22288 (vect_use_loop_mask_for_alignment_p): New function.
22289 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
22290 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
22291 niters_skip argument. Make sure that the first niters_skip elements
22292 of the first iteration are inactive.
22293 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
22294 Update call to vect_set_loop_masks_directly.
22295 (get_misalign_in_elems): New function, split out from...
22296 (vect_gen_prolog_loop_niters): ...here.
22297 (vect_update_init_of_dr): Take a code argument that specifies whether
22298 the adjustment should be added or subtracted.
22299 (vect_update_init_of_drs): Likewise.
22300 (vect_prepare_for_masked_peels): New function.
22301 (vect_do_peeling): Skip prologue peeling if we're using a mask
22302 instead. Update call to vect_update_inits_of_drs.
22303 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22304 mask_skip_niters.
22305 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
22306 alignment. Do not include the number of peeled iterations in
22307 the minimum threshold in that case.
22308 (vectorizable_induction): Adjust the start value down by
22309 LOOP_VINFO_MASK_SKIP_NITERS iterations.
22310 (vect_transform_loop): Call vect_prepare_for_masked_peels.
22311 Take the number of skipped iterations into account when calculating
22312 the loop bounds.
22313 * tree-vect-stmts.c (vect_gen_while_not): New function.
22314
22315 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22316 Alan Hayward <alan.hayward@arm.com>
22317 David Sherwood <david.sherwood@arm.com>
22318
22319 * doc/sourcebuild.texi (vect_fully_masked): Document.
22320 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
22321 default value to 0.
22322 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
22323 split out from...
22324 (vect_analyze_loop_2): ...here. Don't check the vectorization
22325 factor against the number of loop iterations if the loop is
22326 fully-masked.
22327
22328 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22329 Alan Hayward <alan.hayward@arm.com>
22330 David Sherwood <david.sherwood@arm.com>
22331
22332 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
22333 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
22334 (dump_groups): Update accordingly.
22335 (iv_use::mem_type): New member variable.
22336 (address_p): New function.
22337 (record_use): Add a mem_type argument and initialize the new
22338 mem_type field.
22339 (record_group_use): Add a mem_type argument. Use address_p.
22340 Remove obsolete null checks of base_object. Update call to record_use.
22341 (find_interesting_uses_op): Update call to record_group_use.
22342 (find_interesting_uses_cond): Likewise.
22343 (find_interesting_uses_address): Likewise.
22344 (get_mem_type_for_internal_fn): New function.
22345 (find_address_like_use): Likewise.
22346 (find_interesting_uses_stmt): Try find_address_like_use before
22347 calling find_interesting_uses_op.
22348 (addr_offset_valid_p): Use the iv mem_type field as the type
22349 of the addressed memory.
22350 (add_autoinc_candidates): Likewise.
22351 (get_address_cost): Likewise.
22352 (split_small_address_groups_p): Use address_p.
22353 (split_address_groups): Likewise.
22354 (add_iv_candidate_for_use): Likewise.
22355 (autoinc_possible_for_pair): Likewise.
22356 (rewrite_groups): Likewise.
22357 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22358 (determine_group_iv_cost): Update after split of USE_ADDRESS.
22359 (get_alias_ptr_type_for_ptr_address): New function.
22360 (rewrite_use_address): Rewrite address uses in calls that were
22361 identified by find_address_like_use.
22362
22363 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22364 Alan Hayward <alan.hayward@arm.com>
22365 David Sherwood <david.sherwood@arm.com>
22366
22367 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22368 TARGET_MEM_REFs.
22369 * gimple-expr.h (is_gimple_addressable: Likewise.
22370 * gimple-expr.c (is_gimple_address): Likewise.
22371 * internal-fn.c (expand_call_mem_ref): New function.
22372 (expand_mask_load_optab_fn): Use it.
22373 (expand_mask_store_optab_fn): Likewise.
22374
22375 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22376 Alan Hayward <alan.hayward@arm.com>
22377 David Sherwood <david.sherwood@arm.com>
22378
22379 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22380 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22381 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22382 (cond_umax@var{mode}): Document.
22383 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22384 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22385 (cond_umin_optab, cond_umax_optab): New optabs.
22386 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22387 (COND_IOR, COND_XOR): New internal functions.
22388 * internal-fn.h (get_conditional_internal_fn): Declare.
22389 * internal-fn.c (cond_binary_direct): New macro.
22390 (expand_cond_binary_optab_fn): Likewise.
22391 (direct_cond_binary_optab_supported_p): Likewise.
22392 (get_conditional_internal_fn): New function.
22393 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22394 Cope with reduction statements that are vectorized as calls rather
22395 than assignments.
22396 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22397 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22398 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22399 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22400 (UNSPEC_COND_EOR): New unspecs.
22401 (optab): Add mappings for them.
22402 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22403 (sve_int_op, sve_fp_op): New int attributes.
22404
22405 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22406 Alan Hayward <alan.hayward@arm.com>
22407 David Sherwood <david.sherwood@arm.com>
22408
22409 * optabs.def (while_ult_optab): New optab.
22410 * doc/md.texi (while_ult@var{m}@var{n}): Document.
22411 * internal-fn.def (WHILE_ULT): New internal function.
22412 * internal-fn.h (direct_internal_fn_supported_p): New override
22413 that takes two types as argument.
22414 * internal-fn.c (while_direct): New macro.
22415 (expand_while_optab_fn): New function.
22416 (convert_optab_supported_p): Likewise.
22417 (direct_while_optab_supported_p): New macro.
22418 * wide-int.h (wi::udiv_ceil): New function.
22419 * tree-vectorizer.h (rgroup_masks): New structure.
22420 (vec_loop_masks): New typedef.
22421 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22422 and fully_masked_p.
22423 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22424 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22425 (vect_max_vf): New function.
22426 (slpeel_make_loop_iterate_ntimes): Delete.
22427 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22428 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22429 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22430 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22431 internal-fn.h, stor-layout.h and optabs-query.h.
22432 (vect_set_loop_mask): New function.
22433 (add_preheader_seq): Likewise.
22434 (add_header_seq): Likewise.
22435 (interleave_supported_p): Likewise.
22436 (vect_maybe_permute_loop_masks): Likewise.
22437 (vect_set_loop_masks_directly): Likewise.
22438 (vect_set_loop_condition_masked): Likewise.
22439 (vect_set_loop_condition_unmasked): New function, split out from
22440 slpeel_make_loop_iterate_ntimes.
22441 (slpeel_make_loop_iterate_ntimes): Rename to..
22442 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
22443 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22444 (vect_do_peeling): Update call accordingly.
22445 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22446 loops.
22447 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22448 mask_compare_type, can_fully_mask_p and fully_masked_p.
22449 (release_vec_loop_masks): New function.
22450 (_loop_vec_info): Use it to free the loop masks.
22451 (can_produce_all_loop_masks_p): New function.
22452 (vect_get_max_nscalars_per_iter): Likewise.
22453 (vect_verify_full_masking): Likewise.
22454 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22455 retries, and free the mask rgroups before retrying. Check loop-wide
22456 reasons for disallowing fully-masked loops. Make the final decision
22457 about whether use a fully-masked loop or not.
22458 (vect_estimate_min_profitable_iters): Do not assume that peeling
22459 for the number of iterations will be needed for fully-masked loops.
22460 (vectorizable_reduction): Disable fully-masked loops.
22461 (vectorizable_live_operation): Likewise.
22462 (vect_halve_mask_nunits): New function.
22463 (vect_double_mask_nunits): Likewise.
22464 (vect_record_loop_mask): Likewise.
22465 (vect_get_loop_mask): Likewise.
22466 (vect_transform_loop): Handle the case in which the final loop
22467 iteration might handle a partial vector. Call vect_set_loop_condition
22468 instead of slpeel_make_loop_iterate_ntimes.
22469 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22470 (check_load_store_masking): New function.
22471 (prepare_load_store_mask): Likewise.
22472 (vectorizable_store): Handle fully-masked loops.
22473 (vectorizable_load): Likewise.
22474 (supportable_widening_operation): Use vect_halve_mask_nunits for
22475 booleans.
22476 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22477 (vect_gen_while): New function.
22478 * config/aarch64/aarch64.md (umax<mode>3): New expander.
22479 (aarch64_uqdec<mode>): New insn.
22480
22481 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22482 Alan Hayward <alan.hayward@arm.com>
22483 David Sherwood <david.sherwood@arm.com>
22484
22485 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22486 (reduc_xor_scal_optab): New optabs.
22487 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22488 (reduc_xor_scal_@var{m}): Document.
22489 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22490 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22491 internal functions.
22492 * fold-const-call.c (fold_const_call): Handle them.
22493 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22494 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22495 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22496 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22497 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22498 (UNSPEC_XORV): New unspecs.
22499 (optab): Add entries for them.
22500 (BITWISEV): New int iterator.
22501 (bit_reduc_op): New int attributes.
22502
22503 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22504 Alan Hayward <alan.hayward@arm.com>
22505 David Sherwood <david.sherwood@arm.com>
22506
22507 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22508 * internal-fn.def (VEC_SHL_INSERT): New internal function.
22509 * optabs.def (vec_shl_insert_optab): New optab.
22510 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22511 (duplicate_and_interleave): Likewise.
22512 * tree-vect-loop.c: Include internal-fn.h.
22513 (neutral_op_for_slp_reduction): New function, split out from
22514 get_initial_defs_for_reduction.
22515 (get_initial_def_for_reduction): Handle option 2 for variable-length
22516 vectors by loading the neutral value into a vector and then shifting
22517 the initial value into element 0.
22518 (get_initial_defs_for_reduction): Replace the code argument with
22519 the neutral value calculated by neutral_op_for_slp_reduction.
22520 Use gimple_build_vector for constant-length vectors.
22521 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22522 but the first group_size elements have a neutral value.
22523 Use duplicate_and_interleave otherwise.
22524 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22525 Update call to get_initial_defs_for_reduction. Handle SLP
22526 reductions for variable-length vectors by creating one vector
22527 result for each scalar result, with the elements associated
22528 with other scalar results stubbed out with the neutral value.
22529 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22530 Require IFN_VEC_SHL_INSERT for double reductions on
22531 variable-length vectors, or SLP reductions that have
22532 a neutral value. Require can_duplicate_and_interleave_p
22533 support for variable-length unchained SLP reductions if there
22534 is no neutral value, such as for MIN/MAX reductions. Also require
22535 the number of vector elements to be a multiple of the number of
22536 SLP statements when doing variable-length unchained SLP reductions.
22537 Update call to vect_create_epilog_for_reduction.
22538 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22539 and remove initial values.
22540 (duplicate_and_interleave): Make public.
22541 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22542 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22543
22544 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22545 Alan Hayward <alan.hayward@arm.com>
22546 David Sherwood <david.sherwood@arm.com>
22547
22548 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22549 (can_duplicate_and_interleave_p): New function.
22550 (vect_get_and_check_slp_defs): Take the vector of statements
22551 rather than just the current one. Remove excess parentheses.
22552 Restriction rejectinon of vect_constant_def and vect_external_def
22553 for variable-length vectors to boolean types, or types for which
22554 can_duplicate_and_interleave_p is false.
22555 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22556 (duplicate_and_interleave): New function.
22557 (vect_get_constant_vectors): Use gimple_build_vector for
22558 constant-length vectors and suitable variable-length constant
22559 vectors. Use duplicate_and_interleave for other variable-length
22560 vectors. Don't defer the update when inserting new statements.
22561
22562 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22563 Alan Hayward <alan.hayward@arm.com>
22564 David Sherwood <david.sherwood@arm.com>
22565
22566 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22567 min_profitable_iters doesn't go negative.
22568
22569 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22570 Alan Hayward <alan.hayward@arm.com>
22571 David Sherwood <david.sherwood@arm.com>
22572
22573 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22574 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22575 * optabs.def (vec_mask_load_lanes_optab): New optab.
22576 (vec_mask_store_lanes_optab): Likewise.
22577 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22578 (MASK_STORE_LANES): Likewise.
22579 * internal-fn.c (mask_load_lanes_direct): New macro.
22580 (mask_store_lanes_direct): Likewise.
22581 (expand_mask_load_optab_fn): Handle masked operations.
22582 (expand_mask_load_lanes_optab_fn): New macro.
22583 (expand_mask_store_optab_fn): Handle masked operations.
22584 (expand_mask_store_lanes_optab_fn): New macro.
22585 (direct_mask_load_lanes_optab_supported_p): Likewise.
22586 (direct_mask_store_lanes_optab_supported_p): Likewise.
22587 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22588 parameter.
22589 (vect_load_lanes_supported): Likewise.
22590 * tree-vect-data-refs.c (strip_conversion): New function.
22591 (can_group_stmts_p): Likewise.
22592 (vect_analyze_data_ref_accesses): Use it instead of checking
22593 for a pair of assignments.
22594 (vect_store_lanes_supported): Take a masked_p parameter.
22595 (vect_load_lanes_supported): Likewise.
22596 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22597 vect_store_lanes_supported and vect_load_lanes_supported.
22598 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22599 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22600 parameter. Don't allow gaps for masked accesses.
22601 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22602 and vect_load_lanes_supported.
22603 (get_load_store_type): Take a masked_p parameter and update
22604 call to get_group_load_store_type.
22605 (vectorizable_store): Update call to get_load_store_type.
22606 Handle IFN_MASK_STORE_LANES.
22607 (vectorizable_load): Update call to get_load_store_type.
22608 Handle IFN_MASK_LOAD_LANES.
22609
22610 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22611 Alan Hayward <alan.hayward@arm.com>
22612 David Sherwood <david.sherwood@arm.com>
22613
22614 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22615 modes for SVE.
22616 * config/aarch64/aarch64-protos.h
22617 (aarch64_sve_struct_memory_operand_p): Declare.
22618 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22619 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22620 (VPRED, vpred): Handle SVE structure modes.
22621 * config/aarch64/constraints.md (Utx): New constraint.
22622 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22623 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22624 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22625 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22626 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22627 structure modes. Split into pieces after RA.
22628 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22629 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22630 New patterns.
22631 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22632 SVE structure modes.
22633 (aarch64_classify_address): Likewise.
22634 (sizetochar): Move earlier in file.
22635 (aarch64_print_operand): Handle SVE register lists.
22636 (aarch64_array_mode): New function.
22637 (aarch64_sve_struct_memory_operand_p): Likewise.
22638 (TARGET_ARRAY_MODE): Redefine.
22639
22640 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22641 Alan Hayward <alan.hayward@arm.com>
22642 David Sherwood <david.sherwood@arm.com>
22643
22644 * target.def (array_mode): New target hook.
22645 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22646 * doc/tm.texi: Regenerate.
22647 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22648 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22649 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22650 targetm.array_mode.
22651 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22652 type sizes.
22653
22654 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22655 Alan Hayward <alan.hayward@arm.com>
22656 David Sherwood <david.sherwood@arm.com>
22657
22658 * fold-const.c (fold_binary_loc): Check the argument types
22659 rather than the result type when testing for a vector operation.
22660
22661 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22662
22663 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22664 * doc/tm.texi: Regenerate.
22665
22666 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22667 Alan Hayward <alan.hayward@arm.com>
22668 David Sherwood <david.sherwood@arm.com>
22669
22670 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22671 (sve): Document new AArch64 extension.
22672 * doc/md.texi (w): Extend the description of the AArch64
22673 constraint to include SVE vectors.
22674 (Upl, Upa): Document new AArch64 predicate constraints.
22675 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22676 enum.
22677 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22678 (msve-vector-bits=): New option.
22679 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22680 SVE when these are disabled.
22681 (sve): New extension.
22682 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22683 modes. Adjust their number of units based on aarch64_sve_vg.
22684 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22685 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22686 aarch64_addr_query_type.
22687 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22688 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22689 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22690 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22691 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22692 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22693 (aarch64_simd_imm_zero_p): Delete.
22694 (aarch64_check_zero_based_sve_index_immediate): Declare.
22695 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22696 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22697 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22698 (aarch64_sve_float_mul_immediate_p): Likewise.
22699 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22700 rather than an rtx.
22701 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22702 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22703 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22704 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22705 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22706 (aarch64_regmode_natural_size): Likewise.
22707 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22708 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22709 left one place.
22710 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22711 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22712 for VG and the SVE predicate registers.
22713 (V_ALIASES): Add a "z"-prefixed alias.
22714 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22715 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22716 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22717 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22718 (REG_CLASS_NAMES): Add entries for them.
22719 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22720 and the predicate registers.
22721 (aarch64_sve_vg): Declare.
22722 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22723 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22724 (REGMODE_NATURAL_SIZE): Define.
22725 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22726 SVE macros.
22727 * config/aarch64/aarch64.c: Include cfgrtl.h.
22728 (simd_immediate_info): Add a constructor for series vectors,
22729 and an associated step field.
22730 (aarch64_sve_vg): New variable.
22731 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22732 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22733 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22734 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22735 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22736 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22737 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22738 (aarch64_get_mask_mode): New functions.
22739 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22740 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22741 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22742 predicate modes and predicate registers. Explicitly restrict
22743 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22744 to store a vector mode if it is recognized by
22745 aarch64_classify_vector_mode.
22746 (aarch64_regmode_natural_size): New function.
22747 (aarch64_hard_regno_caller_save_mode): Return the original mode
22748 for predicates.
22749 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22750 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22751 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22752 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22753 functions.
22754 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22755 does not overlap dest if the function is frame-related. Handle
22756 SVE constants.
22757 (aarch64_split_add_offset): New function.
22758 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22759 them aarch64_add_offset.
22760 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22761 and update call to aarch64_sub_sp.
22762 (aarch64_add_cfa_expression): New function.
22763 (aarch64_expand_prologue): Pass extra temporary registers to the
22764 functions above. Handle the case in which we need to emit new
22765 DW_CFA_expressions for registers that were originally saved
22766 relative to the stack pointer, but now have to be expressed
22767 relative to the frame pointer.
22768 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22769 functions above.
22770 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22771 IP0 and IP1 values for SVE frames.
22772 (aarch64_expand_vec_series): New function.
22773 (aarch64_expand_sve_widened_duplicate): Likewise.
22774 (aarch64_expand_sve_const_vector): Likewise.
22775 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22776 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22777 into the register, rather than emitting a SET directly.
22778 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22779 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22780 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22781 (offset_9bit_signed_scaled_p): New functions.
22782 (aarch64_replicate_bitmask_imm): New function.
22783 (aarch64_bitmask_imm): Use it.
22784 (aarch64_cannot_force_const_mem): Reject expressions involving
22785 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22786 (aarch64_classify_index): Handle SVE indices, by requiring
22787 a plain register index with a scale that matches the element size.
22788 (aarch64_classify_address): Handle SVE addresses. Assert that
22789 the mode of the address is VOIDmode or an integer mode.
22790 Update call to aarch64_classify_symbol.
22791 (aarch64_classify_symbolic_expression): Update call to
22792 aarch64_classify_symbol.
22793 (aarch64_const_vec_all_in_range_p): New function.
22794 (aarch64_print_vector_float_operand): Likewise.
22795 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22796 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22797 and the FP immediates 1.0 and 0.5.
22798 (aarch64_print_address_internal): Handle SVE addresses.
22799 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22800 (aarch64_regno_regclass): Handle predicate registers.
22801 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22802 data modes.
22803 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22804 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22805 (aarch64_convert_sve_vector_bits): New function.
22806 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22807 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22808 rather than an rtx.
22809 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22810 Handle SVE vector and predicate modes. Accept VL-based constants
22811 that need only one temporary register, and VL offsets that require
22812 no temporary registers.
22813 (aarch64_conditional_register_usage): Mark the predicate registers
22814 as fixed if SVE isn't available.
22815 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22816 Return true for SVE vector and predicate modes.
22817 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22818 rather than an unsigned int. Handle SVE modes.
22819 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22820 SVE modes.
22821 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22822 if SVE is enabled.
22823 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22824 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22825 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22826 (aarch64_sve_float_mul_immediate_p): New functions.
22827 (aarch64_sve_valid_immediate): New function.
22828 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22829 Explicitly reject structure modes. Check for INDEX constants.
22830 Handle PTRUE and PFALSE constants.
22831 (aarch64_check_zero_based_sve_index_immediate): New function.
22832 (aarch64_simd_imm_zero_p): Delete.
22833 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22834 vector modes. Accept constants in the range of CNT[BHWD].
22835 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22836 ask for an Advanced SIMD mode.
22837 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22838 (aarch64_simd_vector_alignment): Handle SVE predicates.
22839 (aarch64_vectorize_preferred_vector_alignment): New function.
22840 (aarch64_simd_vector_alignment_reachable): Use it instead of
22841 the vector size.
22842 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22843 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22844 functions.
22845 (MAX_VECT_LEN): Delete.
22846 (expand_vec_perm_d): Add a vec_flags field.
22847 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22848 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22849 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22850 for SVE modes.
22851 (aarch64_evpc_rev): Rename to...
22852 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22853 (aarch64_evpc_rev_global): New function.
22854 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22855 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22856 MAX_VECT_LEN.
22857 (aarch64_evpc_sve_tbl): New function.
22858 (aarch64_expand_vec_perm_const_1): Update after rename of
22859 aarch64_evpc_rev. Handle SVE permutes too, trying
22860 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22861 than aarch64_evpc_tbl.
22862 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22863 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22864 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22865 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22866 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22867 (aarch64_expand_sve_vcond): New functions.
22868 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22869 of aarch64_vector_mode_p.
22870 (aarch64_dwarf_poly_indeterminate_value): New function.
22871 (aarch64_compute_pressure_classes): Likewise.
22872 (aarch64_can_change_mode_class): Likewise.
22873 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22874 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22875 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22876 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22877 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22878 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22879 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22880 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22881 constraints.
22882 (Dn, Dl, Dr): Accept const as well as const_vector.
22883 (Dz): Likewise. Compare against CONST0_RTX.
22884 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22885 of "vector" where appropriate.
22886 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22887 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22888 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22889 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22890 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22891 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22892 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22893 (v_int_equiv): Extend to SVE modes.
22894 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22895 mode attributes.
22896 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22897 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22898 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22899 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22900 (SVE_COND_FP_CMP): New int iterators.
22901 (perm_hilo): Handle the new unpack unspecs.
22902 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22903 attributes.
22904 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22905 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22906 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22907 (aarch64_equality_operator, aarch64_constant_vector_operand)
22908 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22909 (aarch64_sve_nonimmediate_operand): Likewise.
22910 (aarch64_sve_general_operand): Likewise.
22911 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22912 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22913 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22914 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22915 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22916 (aarch64_sve_float_arith_immediate): Likewise.
22917 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22918 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22919 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22920 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22921 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22922 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22923 (aarch64_sve_float_arith_operand): Likewise.
22924 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22925 (aarch64_sve_float_mul_operand): Likewise.
22926 (aarch64_sve_vec_perm_operand): Likewise.
22927 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22928 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22929 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22930 as well as const_vector.
22931 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22932 in file. Use CONST0_RTX and CONSTM1_RTX.
22933 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22934 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22935 Use aarch64_simd_imm_zero.
22936 * config/aarch64/aarch64-sve.md: New file.
22937 * config/aarch64/aarch64.md: Include it.
22938 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22939 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22940 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22941 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22942 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22943 (sve): New attribute.
22944 (enabled): Disable instructions with the sve attribute unless
22945 TARGET_SVE.
22946 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22947 aarch64_expand_mov_immediate.
22948 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22949 CNT[BHSD] immediates.
22950 (movti): Split CONST_POLY_INT moves into two halves.
22951 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22952 Split additions that need a temporary here if the destination
22953 is the stack pointer.
22954 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22955 (*add<mode>3_poly_1): New instruction.
22956 (set_clobber_cc): New expander.
22957
22958 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22959
22960 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22961 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22962 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22963 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22964 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22965 Change innermode from fixed_mode_size to machine_mode.
22966 (simplify_subreg): Update call accordingly. Handle a constant-sized
22967 subreg of a variable-length CONST_VECTOR.
22968
22969 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22970 Alan Hayward <alan.hayward@arm.com>
22971 David Sherwood <david.sherwood@arm.com>
22972
22973 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22974 (add_offset_to_base): New function, split out from...
22975 (create_mem_ref): ...here. When handling a scale other than 1,
22976 check first whether the address is valid without the offset.
22977 Add it into the base if so, leaving the index and scale as-is.
22978
22979 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22980
22981 PR c++/83778
22982 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22983 fold_for_warn before checking if arg2 is INTEGER_CST.
22984
22985 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22986
22987 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22988 (store_multiple_operation): Delete.
22989 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22990 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22991 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22992 guarded by TARGET_STRING.
22993 (rs6000_output_load_multiple): Delete.
22994 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22995 OPTION_MASK_STRING / TARGET_STRING handling.
22996 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22997 (const rs6000_opt_masks) <"string">: Change mask to 0.
22998 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22999 (MASK_STRING): Delete.
23000 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
23001 parts. Simplify.
23002 (load_multiple): Delete.
23003 (*ldmsi8): Delete.
23004 (*ldmsi7): Delete.
23005 (*ldmsi6): Delete.
23006 (*ldmsi5): Delete.
23007 (*ldmsi4): Delete.
23008 (*ldmsi3): Delete.
23009 (store_multiple): Delete.
23010 (*stmsi8): Delete.
23011 (*stmsi7): Delete.
23012 (*stmsi6): Delete.
23013 (*stmsi5): Delete.
23014 (*stmsi4): Delete.
23015 (*stmsi3): Delete.
23016 (movmemsi_8reg): Delete.
23017 (corresponding unnamed define_insn): Delete.
23018 (movmemsi_6reg): Delete.
23019 (corresponding unnamed define_insn): Delete.
23020 (movmemsi_4reg): Delete.
23021 (corresponding unnamed define_insn): Delete.
23022 (movmemsi_2reg): Delete.
23023 (corresponding unnamed define_insn): Delete.
23024 (movmemsi_1reg): Delete.
23025 (corresponding unnamed define_insn): Delete.
23026 * config/rs6000/rs6000.opt (mno-string): New.
23027 (mstring): Replace by deprecation warning stub.
23028 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
23029
23030 2018-01-12 Jakub Jelinek <jakub@redhat.com>
23031
23032 * regrename.c (regrename_do_replace): If replacing the same
23033 reg multiple times, try to reuse last created gen_raw_REG.
23034
23035 PR debug/81155
23036 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
23037 main to workaround a bug in GDB.
23038
23039 2018-01-12 Tom de Vries <tom@codesourcery.com>
23040
23041 PR target/83737
23042 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
23043
23044 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
23045
23046 PR rtl-optimization/80481
23047 * ira-color.c (get_cap_member): New function.
23048 (allocnos_conflict_by_live_ranges_p): Use it.
23049 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
23050 (setup_slot_coalesced_allocno_live_ranges): Ditto.
23051
23052 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
23053
23054 PR target/83628
23055 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
23056 (*saddl_se_1): Ditto.
23057 (*ssubsi_1): Ditto.
23058 (*ssubl_se_1): Ditto.
23059
23060 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23061
23062 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
23063 rather than wi::to_widest for DR_INITs.
23064 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
23065 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
23066 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
23067 INTEGER_CSTs.
23068 (vect_analyze_group_access_1): Note that here.
23069
23070 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23071
23072 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
23073 polynomial type sizes.
23074
23075 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
23076
23077 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
23078 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
23079 (gimple_add_tmp_var): Likewise.
23080
23081 2018-01-12 Martin Liska <mliska@suse.cz>
23082
23083 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
23084 (gimple_alloc_sizes): Likewise.
23085 (dump_gimple_statistics): Use PRIu64 in printf format.
23086 * gimple.h: Change uint64_t to int.
23087
23088 2018-01-12 Martin Liska <mliska@suse.cz>
23089
23090 * tree-core.h: Use uint64_t instead of int.
23091 * tree.c (tree_node_counts): Likewise.
23092 (tree_node_sizes): Likewise.
23093 (dump_tree_statistics): Use PRIu64 in printf format.
23094
23095 2018-01-12 Martin Liska <mliska@suse.cz>
23096
23097 * Makefile.in: As qsort_chk is implemented in vec.c, add
23098 vec.o to linkage of gencfn-macros.
23099 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
23100 passing the info to record_node_allocation_statistics.
23101 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
23102 and pass the info.
23103 * ggc-common.c (struct ggc_usage): Add operator== and use
23104 it in operator< and compare function.
23105 * mem-stats.h (struct mem_usage): Likewise.
23106 * vec.c (struct vec_usage): Remove operator< and compare
23107 function. Can be simply inherited.
23108
23109 2018-01-12 Martin Jambor <mjambor@suse.cz>
23110
23111 PR target/81616
23112 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
23113 * tree-ssa-math-opts.c: Include domwalk.h.
23114 (convert_mult_to_fma_1): New function.
23115 (fma_transformation_info): New type.
23116 (fma_deferring_state): Likewise.
23117 (cancel_fma_deferring): New function.
23118 (result_of_phi): Likewise.
23119 (last_fma_candidate_feeds_initial_phi): Likewise.
23120 (convert_mult_to_fma): Added deferring logic, split actual
23121 transformation to convert_mult_to_fma_1.
23122 (math_opts_dom_walker): New type.
23123 (math_opts_dom_walker::after_dom_children): New method, body moved
23124 here from pass_optimize_widening_mul::execute, added deferring logic
23125 bits.
23126 (pass_optimize_widening_mul::execute): Moved most of code to
23127 math_opts_dom_walker::after_dom_children.
23128 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
23129 * config/i386/i386.c (ix86_option_override_internal): Added
23130 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
23131
23132 2018-01-12 Richard Biener <rguenther@suse.de>
23133
23134 PR debug/83157
23135 * dwarf2out.c (gen_variable_die): Do not reset old_die for
23136 inline instance vars.
23137
23138 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
23139
23140 PR target/81819
23141 * config/rx/rx.c (rx_is_restricted_memory_address):
23142 Handle SUBREG case.
23143
23144 2018-01-12 Richard Biener <rguenther@suse.de>
23145
23146 PR tree-optimization/80846
23147 * target.def (split_reduction): New target hook.
23148 * targhooks.c (default_split_reduction): New function.
23149 * targhooks.h (default_split_reduction): Declare.
23150 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
23151 target requests first reduce vectors by combining low and high
23152 parts.
23153 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
23154 (get_vectype_for_scalar_type_and_size): Export.
23155 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
23156 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
23157 * doc/tm.texi: Regenerate.
23158 * config/i386/i386.c (ix86_split_reduction): Implement
23159 TARGET_VECTORIZE_SPLIT_REDUCTION.
23160
23161 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23162
23163 PR target/83368
23164 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
23165 in PIC mode except for TARGET_VXWORKS_RTP.
23166 * config/sparc/sparc.c: Include cfgrtl.h.
23167 (TARGET_INIT_PIC_REG): Define.
23168 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
23169 (sparc_pic_register_p): New predicate.
23170 (sparc_legitimate_address_p): Use it.
23171 (sparc_legitimize_pic_address): Likewise.
23172 (sparc_delegitimize_address): Likewise.
23173 (sparc_mode_dependent_address_p): Likewise.
23174 (gen_load_pcrel_sym): Remove 4th parameter.
23175 (load_got_register): Adjust call to above. Remove obsolete stuff.
23176 (sparc_expand_prologue): Do not call load_got_register here.
23177 (sparc_flat_expand_prologue): Likewise.
23178 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
23179 (sparc_use_pseudo_pic_reg): New function.
23180 (sparc_init_pic_reg): Likewise.
23181 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23182 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
23183
23184 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
23185
23186 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23187 Add item for branch_cost.
23188
23189 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23190
23191 PR rtl-optimization/83565
23192 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
23193 not extend the result to a larger mode for rotate operations.
23194 (num_sign_bit_copies1): Likewise.
23195
23196 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23197
23198 PR target/40411
23199 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
23200 -symbolic.
23201 Use values-Xc.o for -pedantic.
23202 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
23203
23204 2018-01-12 Martin Liska <mliska@suse.cz>
23205
23206 PR ipa/83054
23207 * ipa-devirt.c (final_warning_record::grow_type_warnings):
23208 New function.
23209 (possible_polymorphic_call_targets): Use it.
23210 (ipa_devirt): Likewise.
23211
23212 2018-01-12 Martin Liska <mliska@suse.cz>
23213
23214 * profile-count.h (enum profile_quality): Use 0 as invalid
23215 enum value of profile_quality.
23216
23217 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
23218
23219 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
23220 -mext-string options.
23221
23222 2018-01-12 Richard Biener <rguenther@suse.de>
23223
23224 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
23225 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
23226 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
23227 Likewise.
23228 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
23229
23230 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23231
23232 * configure.ac (--with-long-double-format): Add support for the
23233 configuration option to change the default long double format on
23234 PowerPC systems.
23235 * config.gcc (powerpc*-linux*-*): Likewise.
23236 * configure: Regenerate.
23237 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
23238 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
23239 used without modification.
23240
23241 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23242
23243 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
23244 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
23245 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
23246 MISC_BUILTIN_SPEC_BARRIER.
23247 (rs6000_init_builtins): Likewise.
23248 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
23249 enum value.
23250 (speculation_barrier): New define_insn.
23251 * doc/extend.texi: Document __builtin_speculation_barrier.
23252
23253 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23254
23255 PR target/83203
23256 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
23257 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
23258 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
23259 iterators.
23260 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
23261 integral modes instead of "ss" and "sd".
23262 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
23263 vectors with 32-bit and 64-bit elements.
23264 (vecdupssescalarmodesuffix): New mode attribute.
23265 (vec_dup<mode>): Use it.
23266
23267 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
23268
23269 PR target/83330
23270 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
23271 frame if argument is passed on stack.
23272
23273 2018-01-11 Jakub Jelinek <jakub@redhat.com>
23274
23275 PR target/82682
23276 * ree.c (combine_reaching_defs): Optimize also
23277 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
23278 reg2=any_extend(exp); reg1=reg2;, formatting fix.
23279
23280 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23281
23282 PR middle-end/83189
23283 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
23284
23285 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
23286
23287 PR middle-end/83718
23288 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
23289 after they are computed.
23290
23291 2018-01-11 Bin Cheng <bin.cheng@arm.com>
23292
23293 PR tree-optimization/83695
23294 * gimple-loop-linterchange.cc
23295 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
23296 reset cached scev information after interchange.
23297 (pass_linterchange::execute): Remove call to scev_reset_htab.
23298
23299 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23300
23301 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
23302 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
23303 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
23304 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
23305 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
23306 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
23307 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
23308 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
23309 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
23310 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
23311 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
23312 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
23313 (V_lane_reg): Likewise.
23314 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
23315 New define_expand.
23316 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
23317 (vfmal_lane_low<mode>_intrinsic,
23318 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
23319 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
23320 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
23321 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
23322 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
23323 vfmsl_lane_high<mode>_intrinsic): New define_insns.
23324
23325 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23326
23327 * config/arm/arm-cpus.in (fp16fml): New feature.
23328 (ALL_SIMD): Add fp16fml.
23329 (armv8.2-a): Add fp16fml as an option.
23330 (armv8.3-a): Likewise.
23331 (armv8.4-a): Add fp16fml as part of fp16.
23332 * config/arm/arm.h (TARGET_FP16FML): Define.
23333 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
23334 when appropriate.
23335 * config/arm/arm-modes.def (V2HF): Define.
23336 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
23337 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
23338 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
23339 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
23340 vfmsl_low, vfmsl_high): New set of builtins.
23341 * config/arm/iterators.md (PLUSMINUS): New code iterator.
23342 (vfml_op): New code attribute.
23343 (VFMLHALVES): New int iterator.
23344 (VFML, VFMLSEL): New mode attributes.
23345 (V_reg): Define mapping for V2HF.
23346 (V_hi, V_lo): New mode attributes.
23347 (VF_constraint): Likewise.
23348 (vfml_half, vfml_half_selector): New int attributes.
23349 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23350 define_expand.
23351 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23352 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23353 New define_insn.
23354 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23355 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23356 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23357 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
23358 documentation.
23359 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23360 Document new effective target and option set.
23361
23362 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23363
23364 * config/arm/arm-cpus.in (armv8_4): New feature.
23365 (ARMv8_4a): New fgroup.
23366 (armv8.4-a): New arch.
23367 * config/arm/arm-tables.opt: Regenerate.
23368 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23369 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23370 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23371 Add matching rules for -march=armv8.4-a and extensions.
23372 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23373
23374 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
23375
23376 PR target/81821
23377 * config/rx/rx.md (BW): New mode attribute.
23378 (sync_lock_test_and_setsi): Add mode suffix to insn output.
23379
23380 2018-01-11 Richard Biener <rguenther@suse.de>
23381
23382 PR tree-optimization/83435
23383 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23384 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23385 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
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.c (aarch64_address_info): Add a const_offset
23392 field.
23393 (aarch64_classify_address): Initialize it. Track polynomial offsets.
23394 (aarch64_print_address_internal): Use it to check for a zero offset.
23395
23396 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23397 Alan Hayward <alan.hayward@arm.com>
23398 David Sherwood <david.sherwood@arm.com>
23399
23400 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23401 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23402 Return a poly_int64 rather than a HOST_WIDE_INT.
23403 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23404 rather than a HOST_WIDE_INT.
23405 * config/aarch64/aarch64.h (aarch64_frame): Protect with
23406 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
23407 hard_fp_offset, frame_size, initial_adjust, callee_offset and
23408 final_offset from HOST_WIDE_INT to poly_int64.
23409 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23410 to_constant when getting the number of units in an Advanced SIMD
23411 mode.
23412 (aarch64_builtin_vectorized_function): Check for a constant number
23413 of units.
23414 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23415 GET_MODE_SIZE.
23416 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23417 attribute instead of GET_MODE_NUNITS.
23418 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23419 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23420 GET_MODE_SIZE for fixed-size registers.
23421 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23422 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23423 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23424 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23425 (aarch64_print_operand, aarch64_print_address_internal)
23426 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23427 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23428 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23429 Handle polynomial GET_MODE_SIZE.
23430 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
23431 wider than SImode without modification.
23432 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23433 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23434 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23435 passing and returning SVE modes.
23436 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23437 rather than GEN_INT.
23438 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23439 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23440 (aarch64_allocate_and_probe_stack_space): Likewise.
23441 (aarch64_layout_frame): Cope with polynomial offsets.
23442 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23443 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
23444 polynomial offsets.
23445 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23446 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23447 poly_int64 rather than a HOST_WIDE_INT.
23448 (aarch64_get_separate_components, aarch64_process_components)
23449 (aarch64_expand_prologue, aarch64_expand_epilogue)
23450 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23451 (aarch64_anchor_offset): New function, split out from...
23452 (aarch64_legitimize_address): ...here.
23453 (aarch64_builtin_vectorization_cost): Handle polynomial
23454 TYPE_VECTOR_SUBPARTS.
23455 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23456 GET_MODE_NUNITS.
23457 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23458 number of elements from the PARALLEL rather than the mode.
23459 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23460 rather than GET_MODE_BITSIZE.
23461 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23462 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23463 (aarch64_expand_vec_perm_const_1): Handle polynomial
23464 d->perm.length () and d->perm elements.
23465 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
23466 Apply to_constant to d->perm elements.
23467 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23468 polynomial CONST_VECTOR_NUNITS.
23469 (aarch64_move_pointer): Take amount as a poly_int64 rather
23470 than an int.
23471 (aarch64_progress_pointer): Avoid temporary variable.
23472 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23473 the mode attribute instead of GET_MODE.
23474
23475 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23476 Alan Hayward <alan.hayward@arm.com>
23477 David Sherwood <david.sherwood@arm.com>
23478
23479 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23480 x exists before using it.
23481 (aarch64_add_constant_internal): Rename to...
23482 (aarch64_add_offset_1): ...this. Replace regnum with separate
23483 src and dest rtxes. Handle the case in which they're different,
23484 including when the offset is zero. Replace scratchreg with an rtx.
23485 Use 2 additions if there is no spare register into which we can
23486 move a 16-bit constant.
23487 (aarch64_add_constant): Delete.
23488 (aarch64_add_offset): Replace reg with separate src and dest
23489 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
23490 Use aarch64_add_offset_1.
23491 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23492 an rtx rather than an int. Take the delta as a poly_int64
23493 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
23494 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23495 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23496 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23497 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23498 and aarch64_add_sp.
23499 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23500 aarch64_add_constant.
23501
23502 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23503
23504 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23505 Use scalar_float_mode.
23506
23507 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23508
23509 * config/aarch64/aarch64-simd.md
23510 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23511 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23512 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23513 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23514 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23515 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23516 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23517 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23518 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23519 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23520
23521 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23522
23523 PR target/83514
23524 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23525 targ_options->x_arm_arch_string is non NULL.
23526
23527 2018-01-11 Tamar Christina <tamar.christina@arm.com>
23528
23529 * config/aarch64/aarch64.h
23530 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
23531
23532 2018-01-11 Sudakshina Das <sudi.das@arm.com>
23533
23534 PR target/82096
23535 * expmed.c (emit_store_flag_force): Swap if const op0
23536 and change VOIDmode to mode of op0.
23537
23538 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23539
23540 PR rtl-optimization/83761
23541 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23542 than bytes to mode_for_size.
23543
23544 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23545
23546 PR middle-end/83189
23547 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23548 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23549 profile.
23550
23551 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23552
23553 PR middle-end/83575
23554 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23555 when in layout mode.
23556 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23557 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23558 partition fixup.
23559
23560 2018-01-10 Michael Collison <michael.collison@arm.com>
23561
23562 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23563 * config/aarch64/aarch64-option-extension.def: Add
23564 AARCH64_OPT_EXTENSION of 'fp16fml'.
23565 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23566 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23567 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23568 * config/aarch64/constraints.md (Ui7): New constraint.
23569 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23570 (VFMLA_SEL_W): Ditto.
23571 (f16quad): Ditto.
23572 (f16mac1): Ditto.
23573 (VFMLA16_LOW): New int iterator.
23574 (VFMLA16_HIGH): Ditto.
23575 (UNSPEC_FMLAL): New unspec.
23576 (UNSPEC_FMLSL): Ditto.
23577 (UNSPEC_FMLAL2): Ditto.
23578 (UNSPEC_FMLSL2): Ditto.
23579 (f16mac): New code attribute.
23580 * config/aarch64/aarch64-simd-builtins.def
23581 (aarch64_fmlal_lowv2sf): Ditto.
23582 (aarch64_fmlsl_lowv2sf): Ditto.
23583 (aarch64_fmlalq_lowv4sf): Ditto.
23584 (aarch64_fmlslq_lowv4sf): Ditto.
23585 (aarch64_fmlal_highv2sf): Ditto.
23586 (aarch64_fmlsl_highv2sf): Ditto.
23587 (aarch64_fmlalq_highv4sf): Ditto.
23588 (aarch64_fmlslq_highv4sf): Ditto.
23589 (aarch64_fmlal_lane_lowv2sf): Ditto.
23590 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23591 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23592 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23593 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23594 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23595 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23596 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23597 (aarch64_fmlal_lane_highv2sf): Ditto.
23598 (aarch64_fmlsl_lane_highv2sf): Ditto.
23599 (aarch64_fmlal_laneq_highv2sf): Ditto.
23600 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23601 (aarch64_fmlalq_lane_highv4sf): Ditto.
23602 (aarch64_fmlsl_lane_highv4sf): Ditto.
23603 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23604 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23605 * config/aarch64/aarch64-simd.md:
23606 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23607 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23608 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23609 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23610 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23611 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23612 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23613 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23614 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23615 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23616 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23617 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23618 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23619 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23620 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23621 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23622 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23623 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23624 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23625 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23626 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23627 (vfmlsl_low_u32): Ditto.
23628 (vfmlalq_low_u32): Ditto.
23629 (vfmlslq_low_u32): Ditto.
23630 (vfmlal_high_u32): Ditto.
23631 (vfmlsl_high_u32): Ditto.
23632 (vfmlalq_high_u32): Ditto.
23633 (vfmlslq_high_u32): Ditto.
23634 (vfmlal_lane_low_u32): Ditto.
23635 (vfmlsl_lane_low_u32): Ditto.
23636 (vfmlal_laneq_low_u32): Ditto.
23637 (vfmlsl_laneq_low_u32): Ditto.
23638 (vfmlalq_lane_low_u32): Ditto.
23639 (vfmlslq_lane_low_u32): Ditto.
23640 (vfmlalq_laneq_low_u32): Ditto.
23641 (vfmlslq_laneq_low_u32): Ditto.
23642 (vfmlal_lane_high_u32): Ditto.
23643 (vfmlsl_lane_high_u32): Ditto.
23644 (vfmlal_laneq_high_u32): Ditto.
23645 (vfmlsl_laneq_high_u32): Ditto.
23646 (vfmlalq_lane_high_u32): Ditto.
23647 (vfmlslq_lane_high_u32): Ditto.
23648 (vfmlalq_laneq_high_u32): Ditto.
23649 (vfmlslq_laneq_high_u32): Ditto.
23650 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23651 (AARCH64_FL_FOR_ARCH8_4): New.
23652 (AARCH64_ISA_F16FML): New ISA flag.
23653 (TARGET_F16FML): New feature flag for fp16fml.
23654 (doc/invoke.texi): Document new fp16fml option.
23655
23656 2018-01-10 Michael Collison <michael.collison@arm.com>
23657
23658 * config/aarch64/aarch64-builtins.c:
23659 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23660 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23661 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23662 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23663 (AARCH64_ISA_SHA3): New ISA flag.
23664 (TARGET_SHA3): New feature flag for sha3.
23665 * config/aarch64/iterators.md (sha512_op): New int attribute.
23666 (CRYPTO_SHA512): New int iterator.
23667 (UNSPEC_SHA512H): New unspec.
23668 (UNSPEC_SHA512H2): Ditto.
23669 (UNSPEC_SHA512SU0): Ditto.
23670 (UNSPEC_SHA512SU1): Ditto.
23671 * config/aarch64/aarch64-simd-builtins.def
23672 (aarch64_crypto_sha512hqv2di): New builtin.
23673 (aarch64_crypto_sha512h2qv2di): Ditto.
23674 (aarch64_crypto_sha512su0qv2di): Ditto.
23675 (aarch64_crypto_sha512su1qv2di): Ditto.
23676 (aarch64_eor3qv8hi): Ditto.
23677 (aarch64_rax1qv2di): Ditto.
23678 (aarch64_xarqv2di): Ditto.
23679 (aarch64_bcaxqv8hi): Ditto.
23680 * config/aarch64/aarch64-simd.md:
23681 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23682 (aarch64_crypto_sha512su0qv2di): Ditto.
23683 (aarch64_crypto_sha512su1qv2di): Ditto.
23684 (aarch64_eor3qv8hi): Ditto.
23685 (aarch64_rax1qv2di): Ditto.
23686 (aarch64_xarqv2di): Ditto.
23687 (aarch64_bcaxqv8hi): Ditto.
23688 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23689 (vsha512h2q_u64): Ditto.
23690 (vsha512su0q_u64): Ditto.
23691 (vsha512su1q_u64): Ditto.
23692 (veor3q_u16): Ditto.
23693 (vrax1q_u64): Ditto.
23694 (vxarq_u64): Ditto.
23695 (vbcaxq_u16): Ditto.
23696 * config/arm/types.md (crypto_sha512): New type attribute.
23697 (crypto_sha3): Ditto.
23698 (doc/invoke.texi): Document new sha3 option.
23699
23700 2018-01-10 Michael Collison <michael.collison@arm.com>
23701
23702 * config/aarch64/aarch64-builtins.c:
23703 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23704 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23705 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23706 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23707 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23708 (AARCH64_ISA_SM4): New ISA flag.
23709 (TARGET_SM4): New feature flag for sm4.
23710 * config/aarch64/aarch64-simd-builtins.def
23711 (aarch64_sm3ss1qv4si): Ditto.
23712 (aarch64_sm3tt1aq4si): Ditto.
23713 (aarch64_sm3tt1bq4si): Ditto.
23714 (aarch64_sm3tt2aq4si): Ditto.
23715 (aarch64_sm3tt2bq4si): Ditto.
23716 (aarch64_sm3partw1qv4si): Ditto.
23717 (aarch64_sm3partw2qv4si): Ditto.
23718 (aarch64_sm4eqv4si): Ditto.
23719 (aarch64_sm4ekeyqv4si): Ditto.
23720 * config/aarch64/aarch64-simd.md:
23721 (aarch64_sm3ss1qv4si): Ditto.
23722 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23723 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23724 (aarch64_sm4eqv4si): Ditto.
23725 (aarch64_sm4ekeyqv4si): Ditto.
23726 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23727 (sm3part_op): Ditto.
23728 (CRYPTO_SM3TT): Ditto.
23729 (CRYPTO_SM3PART): Ditto.
23730 (UNSPEC_SM3SS1): New unspec.
23731 (UNSPEC_SM3TT1A): Ditto.
23732 (UNSPEC_SM3TT1B): Ditto.
23733 (UNSPEC_SM3TT2A): Ditto.
23734 (UNSPEC_SM3TT2B): Ditto.
23735 (UNSPEC_SM3PARTW1): Ditto.
23736 (UNSPEC_SM3PARTW2): Ditto.
23737 (UNSPEC_SM4E): Ditto.
23738 (UNSPEC_SM4EKEY): Ditto.
23739 * config/aarch64/constraints.md (Ui2): New constraint.
23740 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23741 * config/arm/types.md (crypto_sm3): New type attribute.
23742 (crypto_sm4): Ditto.
23743 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23744 (vsm3tt1aq_u32): Ditto.
23745 (vsm3tt1bq_u32): Ditto.
23746 (vsm3tt2aq_u32): Ditto.
23747 (vsm3tt2bq_u32): Ditto.
23748 (vsm3partw1q_u32): Ditto.
23749 (vsm3partw2q_u32): Ditto.
23750 (vsm4eq_u32): Ditto.
23751 (vsm4ekeyq_u32): Ditto.
23752 (doc/invoke.texi): Document new sm4 option.
23753
23754 2018-01-10 Michael Collison <michael.collison@arm.com>
23755
23756 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23757 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23758 (AARCH64_FL_FOR_ARCH8_4): New.
23759 (AARCH64_FL_V8_4): New flag.
23760 (doc/invoke.texi): Document new armv8.4-a option.
23761
23762 2018-01-10 Michael Collison <michael.collison@arm.com>
23763
23764 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23765 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23766 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23767 * config/aarch64/aarch64-option-extension.def: Add
23768 AARCH64_OPT_EXTENSION of 'sha2'.
23769 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23770 (crypto): Disable sha2 and aes if crypto disabled.
23771 (crypto): Enable aes and sha2 if enabled.
23772 (simd): Disable sha2 and aes if simd disabled.
23773 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23774 New flags.
23775 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23776 (TARGET_SHA2): New feature flag for sha2.
23777 (TARGET_AES): New feature flag for aes.
23778 * config/aarch64/aarch64-simd.md:
23779 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23780 conditional on TARGET_AES.
23781 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23782 (aarch64_crypto_sha1hsi): Make pattern conditional
23783 on TARGET_SHA2.
23784 (aarch64_crypto_sha1hv4si): Ditto.
23785 (aarch64_be_crypto_sha1hv4si): Ditto.
23786 (aarch64_crypto_sha1su1v4si): Ditto.
23787 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23788 (aarch64_crypto_sha1su0v4si): Ditto.
23789 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23790 (aarch64_crypto_sha256su0v4si): Ditto.
23791 (aarch64_crypto_sha256su1v4si): Ditto.
23792 (doc/invoke.texi): Document new aes and sha2 options.
23793
23794 2018-01-10 Martin Sebor <msebor@redhat.com>
23795
23796 PR tree-optimization/83781
23797 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23798 as string arrays.
23799
23800 2018-01-11 Martin Sebor <msebor@gmail.com>
23801 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23802
23803 PR tree-optimization/83501
23804 PR tree-optimization/81703
23805
23806 * tree-ssa-strlen.c (get_string_cst): Rename...
23807 (get_string_len): ...to this. Handle global constants.
23808 (handle_char_store): Adjust.
23809
23810 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23811 Jim Wilson <jimw@sifive.com>
23812
23813 * config/riscv/riscv-protos.h (riscv_output_return): New.
23814 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23815 (riscv_attribute_table, riscv_output_return),
23816 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23817 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23818 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23819 function.
23820 (riscv_expand_prologue): Add early return for naked function.
23821 (riscv_expand_epilogue): Likewise.
23822 (riscv_function_ok_for_sibcall): Return false for naked function.
23823 (riscv_set_current_function): New.
23824 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23825 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23826 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23827 * doc/extend.texi (RISC-V Function Attributes): New.
23828
23829 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23830
23831 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23832 check for 128-bit long double before checking TCmode.
23833 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23834 128-bit long doubles before checking TFmode or TCmode.
23835 (FLOAT128_IBM_P): Likewise.
23836
23837 2018-01-10 Martin Sebor <msebor@redhat.com>
23838
23839 PR tree-optimization/83671
23840 * builtins.c (c_strlen): Unconditionally return zero for the empty
23841 string.
23842 Use -Warray-bounds for warnings.
23843 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23844 for non-constant array indices with COMPONENT_REF, arrays of
23845 arrays, and pointers to arrays.
23846 (gimple_fold_builtin_strlen): Determine and set length range for
23847 non-constant character arrays.
23848
23849 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23850
23851 PR middle-end/81897
23852 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23853 empty blocks.
23854
23855 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23856
23857 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23858
23859 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23860
23861 PR target/83399
23862 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23863 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23864 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23865 indexed_or_indirect_operand predicate.
23866 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23867 (*vsx_le_perm_load_v8hi): Likewise.
23868 (*vsx_le_perm_load_v16qi): Likewise.
23869 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23870 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23871 (*vsx_le_perm_store_v8hi): Likewise.
23872 (*vsx_le_perm_store_v16qi): Likewise.
23873 (eight unnamed splitters): Likewise.
23874
23875 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23876
23877 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23878 * config/rs6000/emmintrin.h: Likewise.
23879 * config/rs6000/mmintrin.h: Likewise.
23880 * config/rs6000/xmmintrin.h: Likewise.
23881
23882 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23883
23884 PR c++/43486
23885 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23886 "public_flag".
23887 * tree.c (tree_nop_conversion): Return true for location wrapper
23888 nodes.
23889 (maybe_wrap_with_location): New function.
23890 (selftest::check_strip_nops): New function.
23891 (selftest::test_location_wrappers): New function.
23892 (selftest::tree_c_tests): Call it.
23893 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23894 (maybe_wrap_with_location): New decl.
23895 (EXPR_LOCATION_WRAPPER_P): New macro.
23896 (location_wrapper_p): New inline function.
23897 (tree_strip_any_location_wrapper): New inline function.
23898
23899 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23900
23901 PR target/83735
23902 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23903 stack_realign_offset for the largest alignment of stack slot
23904 actually used.
23905 (ix86_find_max_used_stack_alignment): New function.
23906 (ix86_finalize_stack_frame_flags): Use it. Set
23907 max_used_stack_alignment if we don't realign stack.
23908 * config/i386/i386.h (machine_function): Add
23909 max_used_stack_alignment.
23910
23911 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23912
23913 * config/arm/arm.opt (-mbranch-cost): New option.
23914 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23915 account.
23916
23917 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23918
23919 PR target/83629
23920 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23921 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23922
23923 2018-01-10 Richard Biener <rguenther@suse.de>
23924
23925 PR debug/83765
23926 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23927 early out so it also covers the case where we have a non-NULL
23928 origin.
23929
23930 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23931
23932 PR tree-optimization/83753
23933 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23934 for non-strided grouped accesses if the number of elements is 1.
23935
23936 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23937
23938 PR target/81616
23939 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23940 * i386.h (TARGET_USE_GATHER): Define.
23941 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23942
23943 2018-01-10 Martin Liska <mliska@suse.cz>
23944
23945 PR bootstrap/82831
23946 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23947 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23948 partitioning.
23949 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23950 CLEANUP_NO_PARTITIONING is not set.
23951
23952 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23953
23954 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23955 for vectors, as a partial revert of r254296.
23956 * rtl.h (const_vec_p): Delete.
23957 (const_vec_duplicate_p): Don't test for vector CONSTs.
23958 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23959 * expmed.c (make_tree): Likewise.
23960
23961 Revert:
23962 * common.md (E, F): Use CONSTANT_P instead of checking for
23963 CONST_VECTOR.
23964 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23965 checking for CONST_VECTOR.
23966
23967 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23968
23969 PR middle-end/83575
23970 * predict.c (force_edge_cold): Handle in more sane way edges
23971 with no prediction.
23972
23973 2018-01-09 Carl Love <cel@us.ibm.com>
23974
23975 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23976 V4SI, V4SF types.
23977 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23978 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23979 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23980 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23981 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23982 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23983 * config/rs6000/rs6000-protos.h: Add extern defition for
23984 rs6000_generate_float2_double_code.
23985 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23986 function.
23987 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23988 (float2_v2df): Add define_expand.
23989
23990 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23991
23992 PR target/83628
23993 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23994 op_mode in the force_to_mode call.
23995
23996 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23997
23998 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23999 instead of checking each element individually.
24000 (aarch64_evpc_uzp): Likewise.
24001 (aarch64_evpc_zip): Likewise.
24002 (aarch64_evpc_ext): Likewise.
24003 (aarch64_evpc_rev): Likewise.
24004 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
24005 instead of checking each element individually. Return true without
24006 generating rtl if
24007 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
24008 whether all selected elements come from the same input, instead of
24009 checking each element individually. Remove calls to gen_rtx_REG,
24010 start_sequence and end_sequence and instead assert that no rtl is
24011 generated.
24012
24013 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24014
24015 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
24016 order of HIGH and CONST checks.
24017
24018 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
24019
24020 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
24021 if the destination isn't an SSA_NAME.
24022
24023 2018-01-09 Richard Biener <rguenther@suse.de>
24024
24025 PR tree-optimization/83668
24026 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
24027 move prologue...
24028 (canonicalize_loop_form): ... here, renamed from ...
24029 (canonicalize_loop_closed_ssa_form): ... this and amended to
24030 swap successor edges for loop exit blocks to make us use
24031 the RPO order we need for initial schedule generation.
24032
24033 2018-01-09 Joseph Myers <joseph@codesourcery.com>
24034
24035 PR tree-optimization/64811
24036 * match.pd: When optimizing comparisons with Inf, avoid
24037 introducing or losing exceptions from comparisons with NaN.
24038
24039 2018-01-09 Martin Liska <mliska@suse.cz>
24040
24041 PR sanitizer/82517
24042 * asan.c (shadow_mem_size): Add gcc_assert.
24043
24044 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
24045
24046 Don't save registers in main().
24047
24048 PR target/83738
24049 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
24050 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
24051 * config/avr/avr.c (avr_set_current_function): Don't error if
24052 naked, OS_task or OS_main are specified at the same time.
24053 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
24054 OS_main.
24055 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
24056 attribute.
24057 * common/config/avr/avr-common.c (avr_option_optimization_table):
24058 Switch on -mmain-is-OS_task for optimizing compilations.
24059
24060 2018-01-09 Richard Biener <rguenther@suse.de>
24061
24062 PR tree-optimization/83572
24063 * graphite.c: Include cfganal.h.
24064 (graphite_transform_loops): Connect infinite loops to exit
24065 and remove fake edges at the end.
24066
24067 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24068
24069 * ipa-inline.c (edge_badness): Revert accidental checkin.
24070
24071 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
24072
24073 PR ipa/80763
24074 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
24075 symbols; not inline clones.
24076
24077 2018-01-09 Jakub Jelinek <jakub@redhat.com>
24078
24079 PR target/83507
24080 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
24081 hard registers. Formatting fixes.
24082
24083 PR preprocessor/83722
24084 * gcc.c (try_generate_repro): Pass
24085 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
24086 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
24087 do_report_bug.
24088
24089 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
24090 Kito Cheng <kito.cheng@gmail.com>
24091
24092 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
24093 (riscv_leaf_function_p): Delete.
24094 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
24095
24096 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24097
24098 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
24099 function.
24100 (do_ifelse): New function.
24101 (do_isel): New function.
24102 (do_sub3): New function.
24103 (do_add3): New function.
24104 (do_load_mask_compare): New function.
24105 (do_overlap_load_compare): New function.
24106 (expand_compare_loop): New function.
24107 (expand_block_compare): Call expand_compare_loop() when appropriate.
24108 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
24109 option description.
24110 (-mblock-compare-inline-loop-limit): New option.
24111
24112 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24113
24114 PR target/83677
24115 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
24116 Reverse order of second and third operands in first alternative.
24117 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
24118 of first and second elements in UNSPEC_VPERMR vector.
24119 (altivec_expand_vec_perm_le): Likewise.
24120
24121 2018-01-08 Jeff Law <law@redhat.com>
24122
24123 PR rtl-optimizatin/81308
24124 * tree-switch-conversion.c (cfg_altered): New file scoped static.
24125 (process_switch): If group_case_labels makes a change, then set
24126 cfg_altered.
24127 (pass_convert_switch::execute): If a switch is converted, then
24128 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
24129
24130 PR rtl-optimization/81308
24131 * recog.c (split_all_insns): Conditionally cleanup the CFG after
24132 splitting insns.
24133
24134 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
24135
24136 PR target/83663 - Revert r255946
24137 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
24138 generation for cases where splatting a value is not useful.
24139 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
24140 across a vec_duplicate and a paradoxical subreg forming a vector
24141 mode to a vec_concat.
24142
24143 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24144
24145 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
24146 -march=armv8.3-a variants.
24147 * config/arm/t-multilib: Likewise.
24148 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
24149
24150 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24151
24152 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
24153 to generate rtl.
24154 (cceq_ior_compare_complement): Give it a name so I can use it, and
24155 change boolean_or_operator predicate to boolean_operator so it can
24156 be used to generate a crand.
24157 (eqne): New code iterator.
24158 (bd/bd_neg): New code_attrs.
24159 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
24160 a single define_insn.
24161 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
24162 decrement (bdnzt/bdnzf/bdzt/bdzf).
24163 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
24164 with the new names of the branch decrement patterns, and added the
24165 names of the branch decrement conditional patterns.
24166
24167 2018-01-08 Richard Biener <rguenther@suse.de>
24168
24169 PR tree-optimization/83563
24170 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
24171 cache.
24172
24173 2018-01-08 Richard Biener <rguenther@suse.de>
24174
24175 PR middle-end/83713
24176 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
24177
24178 2018-01-08 Richard Biener <rguenther@suse.de>
24179
24180 PR tree-optimization/83685
24181 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
24182 references to abnormals.
24183
24184 2018-01-08 Richard Biener <rguenther@suse.de>
24185
24186 PR lto/83719
24187 * dwarf2out.c (output_indirect_strings): Handle empty
24188 skeleton_debug_str_hash.
24189 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
24190
24191 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24192
24193 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
24194 (emit_store_direct): Likewise.
24195 (arc_trampoline_adjust_address): Likewise.
24196 (arc_asm_trampoline_template): New function.
24197 (arc_initialize_trampoline): Use asm_trampoline_template.
24198 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
24199 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
24200 * config/arc/arc.md (flush_icache): Delete pattern.
24201
24202 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
24203
24204 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
24205 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
24206 munaligned-access.
24207
24208 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24209
24210 PR target/83681
24211 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
24212 by not USED_FOR_TARGET.
24213 (make_pass_resolve_sw_modes): Likewise.
24214
24215 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
24216
24217 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
24218 USED_FOR_TARGET.
24219
24220 2018-01-08 Richard Biener <rguenther@suse.de>
24221
24222 PR middle-end/83580
24223 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
24224
24225 2018-01-08 Richard Biener <rguenther@suse.de>
24226
24227 PR middle-end/83517
24228 * match.pd ((t * 2) / 2) -> t): Add missing :c.
24229
24230 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
24231
24232 PR middle-end/81897
24233 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
24234 basic blocks with a small number of successors.
24235 (convert_control_dep_chain_into_preds): Improve handling of
24236 forwarder blocks.
24237 (dump_predicates): Split apart into...
24238 (dump_pred_chain): ...here...
24239 (dump_pred_info): ...and here.
24240 (can_one_predicate_be_invalidated_p): Add debugging printfs.
24241 (can_chain_union_be_invalidated_p): Improve check for invalidation
24242 of paths.
24243 (uninit_uses_cannot_happen): Avoid unnecessary if
24244 convert_control_dep_chain_into_preds yielded nothing.
24245
24246 2018-01-06 Martin Sebor <msebor@redhat.com>
24247
24248 PR tree-optimization/83640
24249 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
24250 subtracting negative offset from size.
24251 (builtin_access::overlap): Adjust offset bounds of the access to fall
24252 within the size of the object if possible.
24253
24254 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
24255
24256 PR rtl-optimization/83699
24257 * expmed.c (extract_bit_field_1): Restrict the vector usage of
24258 extract_bit_field_as_subreg to cases in which the extracted
24259 value is also a vector.
24260
24261 * lra-constraints.c (process_alt_operands): Test for the equivalence
24262 substitutions when detecting a possible reload cycle.
24263
24264 2018-01-06 Jakub Jelinek <jakub@redhat.com>
24265
24266 PR debug/83480
24267 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
24268 by default if flag_selective_schedling{,2}. Formatting fixes.
24269
24270 PR rtl-optimization/83682
24271 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
24272 if it has non-VECTOR_MODE element mode.
24273 (vec_duplicate_p): Likewise.
24274
24275 PR middle-end/83694
24276 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
24277 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
24278
24279 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24280
24281 PR target/83604
24282 * config/i386/i386-builtin.def
24283 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
24284 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
24285 Require also OPTION_MASK_ISA_AVX512F in addition to
24286 OPTION_MASK_ISA_GFNI.
24287 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
24288 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
24289 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
24290 to OPTION_MASK_ISA_GFNI.
24291 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
24292 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
24293 OPTION_MASK_ISA_AVX512BW.
24294 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
24295 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
24296 addition to OPTION_MASK_ISA_GFNI.
24297 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
24298 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
24299 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
24300 to OPTION_MASK_ISA_GFNI.
24301 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
24302 a requirement for all ISAs rather than any of them with a few
24303 exceptions.
24304 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
24305 processing.
24306 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
24307 bitmasks to be enabled with 3 exceptions, instead of requiring any
24308 enabled ISA with lots of exceptions.
24309 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
24310 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
24311 Change avx512bw in isa attribute to avx512f.
24312 * config/i386/sgxintrin.h: Add license boilerplate.
24313 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
24314 to __AVX512F__ and __AVX512VL to __AVX512VL__.
24315 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
24316 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
24317 defined.
24318 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
24319 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
24320 temporarily sse2 rather than sse if not enabled already.
24321
24322 PR target/83604
24323 * config/i386/sse.md (VI248_VLBW): Rename to ...
24324 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
24325 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
24326 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
24327 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
24328 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
24329 mode iterator instead of VI248_VLBW.
24330
24331 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
24332
24333 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
24334 (record_modified): Skip clobbers; add debug output.
24335 (param_change_prob): Use sreal frequencies.
24336
24337 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24338
24339 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24340 punt for user-aligned variables.
24341
24342 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24343
24344 * tree-chrec.c (chrec_contains_symbols): Return true for
24345 POLY_INT_CST.
24346
24347 2018-01-05 Sudakshina Das <sudi.das@arm.com>
24348
24349 PR target/82439
24350 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24351 of (x|y) == x for BICS pattern.
24352
24353 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24354
24355 PR tree-optimization/83605
24356 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24357 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24358 can throw.
24359
24360 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
24361
24362 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24363 * config/epiphany/rtems.h: New file.
24364
24365 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24366 Uros Bizjak <ubizjak@gmail.com>
24367
24368 PR target/83554
24369 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24370 QIreg_operand instead of register_operand predicate.
24371 * config/i386/i386.c (ix86_rop_should_change_byte_p,
24372 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24373 comments instead of -fmitigate[-_]rop.
24374
24375 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24376
24377 PR bootstrap/81926
24378 * cgraphunit.c (symbol_table::compile): Switch to text_section
24379 before calling assembly_start debug hook.
24380 * run-rtl-passes.c (run_rtl_passes): Likewise.
24381 Include output.h.
24382
24383 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24384
24385 * tree-vrp.c (extract_range_from_binary_expr_1): Check
24386 range_int_cst_p rather than !symbolic_range_p before calling
24387 extract_range_from_multiplicative_op_1.
24388
24389 2018-01-04 Jeff Law <law@redhat.com>
24390
24391 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24392 redundant test in assertion.
24393
24394 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24395
24396 * doc/rtl.texi: Document machine_mode wrapper classes.
24397
24398 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24399
24400 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24401 using tree_to_uhwi.
24402
24403 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24404
24405 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24406 the VEC_PERM_EXPR fold to fail.
24407
24408 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24409
24410 PR debug/83585
24411 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24412 to switched_sections.
24413
24414 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24415
24416 PR target/83680
24417 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24418 test for d.testing.
24419
24420 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
24421
24422 PR target/83387
24423 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24424 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24425
24426 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24427
24428 PR debug/83666
24429 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24430 is BLKmode and bitpos not zero or mode change is needed.
24431
24432 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24433
24434 PR target/83675
24435 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24436 TARGET_VIS2.
24437
24438 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
24439
24440 PR target/83628
24441 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24442 instead of MULT rtx. Update all corresponding splitters.
24443 (*saddl_se): Ditto.
24444 (*ssub<modesuffix>): Ditto.
24445 (*ssubl_se): Ditto.
24446 (*cmp_sadd_di): Update split patterns.
24447 (*cmp_sadd_si): Ditto.
24448 (*cmp_sadd_sidi): Ditto.
24449 (*cmp_ssub_di): Ditto.
24450 (*cmp_ssub_si): Ditto.
24451 (*cmp_ssub_sidi): Ditto.
24452 * config/alpha/predicates.md (const23_operand): New predicate.
24453 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24454 Look for ASHIFT, not MULT inner operand.
24455 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24456
24457 2018-01-04 Martin Liska <mliska@suse.cz>
24458
24459 PR gcov-profile/83669
24460 * gcov.c (output_intermediate_file): Add version to intermediate
24461 gcov file.
24462 * doc/gcov.texi: Document new field 'version' in intermediate
24463 file format. Fix location of '-k' option of gcov command.
24464
24465 2018-01-04 Martin Liska <mliska@suse.cz>
24466
24467 PR ipa/82352
24468 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24469
24470 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24471
24472 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24473
24474 2018-01-03 Martin Sebor <msebor@redhat.com>
24475
24476 PR tree-optimization/83655
24477 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24478 checking calls with invalid arguments.
24479
24480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24481
24482 * tree-vect-stmts.c (vect_get_store_rhs): New function.
24483 (vectorizable_mask_load_store): Delete.
24484 (vectorizable_call): Return false for masked loads and stores.
24485 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
24486 instead of gimple_assign_rhs1.
24487 (vectorizable_load): Handle IFN_MASK_LOAD.
24488 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24489
24490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24491
24492 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24493 split out from..,
24494 (vectorizable_mask_load_store): ...here.
24495 (vectorizable_load): ...and here.
24496
24497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24498
24499 * tree-vect-stmts.c (vect_build_all_ones_mask)
24500 (vect_build_zero_merge_argument): New functions, split out from...
24501 (vectorizable_load): ...here.
24502
24503 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24504
24505 * tree-vect-stmts.c (vect_check_store_rhs): New function,
24506 split out from...
24507 (vectorizable_mask_load_store): ...here.
24508 (vectorizable_store): ...and here.
24509
24510 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24511
24512 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24513 split out from...
24514 (vectorizable_mask_load_store): ...here.
24515
24516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24517
24518 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24519 (vect_model_store_cost): Take a vec_load_store_type instead of a
24520 vect_def_type.
24521 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24522 (vect_model_store_cost): Take a vec_load_store_type instead of a
24523 vect_def_type.
24524 (vectorizable_mask_load_store): Update accordingly.
24525 (vectorizable_store): Likewise.
24526 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24527
24528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24529
24530 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24531 IFN_MASK_LOAD calls here rather than...
24532 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24533
24534 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24535 Alan Hayward <alan.hayward@arm.com>
24536 David Sherwood <david.sherwood@arm.com>
24537
24538 * expmed.c (extract_bit_field_1): For vector extracts,
24539 fall back to extract_bit_field_as_subreg if vec_extract
24540 isn't available.
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 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24547 they are variable or constant sized.
24548 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24549 slots for constant-sized data.
24550
24551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24552 Alan Hayward <alan.hayward@arm.com>
24553 David Sherwood <david.sherwood@arm.com>
24554
24555 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24556 handling COND_EXPRs with boolean comparisons, try to find a better
24557 basis for the mask type than the boolean itself.
24558
24559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24560
24561 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24562 is calculated and how it can be overridden.
24563 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24564 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24565 if defined.
24566 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24567 if nonzero.
24568
24569 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24570 Alan Hayward <alan.hayward@arm.com>
24571 David Sherwood <david.sherwood@arm.com>
24572
24573 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24574 Remove the mode argument.
24575 (aarch64_simd_valid_immediate): Remove the mode and inverse
24576 arguments.
24577 * config/aarch64/iterators.md (bitsize): New iterator.
24578 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24579 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24580 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24581 aarch64_simd_valid_immediate.
24582 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24583 (aarch64_reg_or_bic_imm): Likewise.
24584 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24585 with an insn_type enum and msl with a modifier_type enum.
24586 Replace element_width with a scalar_mode. Change the shift
24587 to unsigned int. Add constructors for scalar_float_mode and
24588 scalar_int_mode elements.
24589 (aarch64_vect_float_const_representable_p): Delete.
24590 (aarch64_can_const_movi_rtx_p)
24591 (aarch64_simd_scalar_immediate_valid_for_move)
24592 (aarch64_simd_make_constant): Update call to
24593 aarch64_simd_valid_immediate.
24594 (aarch64_advsimd_valid_immediate_hs): New function.
24595 (aarch64_advsimd_valid_immediate): Likewise.
24596 (aarch64_simd_valid_immediate): Remove mode and inverse
24597 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24598 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24599 and aarch64_float_const_representable_p on the result.
24600 (aarch64_output_simd_mov_immediate): Remove mode argument.
24601 Update call to aarch64_simd_valid_immediate and use of
24602 simd_immediate_info.
24603 (aarch64_output_scalar_simd_mov_immediate): Update call
24604 accordingly.
24605
24606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24607 Alan Hayward <alan.hayward@arm.com>
24608 David Sherwood <david.sherwood@arm.com>
24609
24610 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24611 (mode_nunits): Likewise CONST_MODE_NUNITS.
24612 * machmode.def (ADJUST_NUNITS): Document.
24613 * genmodes.c (mode_data::need_nunits_adj): New field.
24614 (blank_mode): Update accordingly.
24615 (adj_nunits): New variable.
24616 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24617 parameter.
24618 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24619 listed in adj_nunits.
24620 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24621 listed in adj_nunits. Don't emit case statements for such modes.
24622 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24623 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24624 nothing if adj_nunits is nonnull.
24625 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24626 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24627 (emit_mode_fbit): Update use of print_maybe_const_decl.
24628 (emit_move_size): Likewise. Treat the array as non-const
24629 if adj_nunits.
24630 (emit_mode_adjustments): Handle adj_nunits.
24631
24632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24633
24634 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24635 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24636 (VECTOR_MODES): Use it.
24637 (make_vector_modes): Take the prefix as an argument.
24638
24639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24640 Alan Hayward <alan.hayward@arm.com>
24641 David Sherwood <david.sherwood@arm.com>
24642
24643 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24644 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24645 for MODE_VECTOR_BOOL.
24646 * machmode.def (VECTOR_BOOL_MODE): Document.
24647 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24648 (make_vector_bool_mode): New function.
24649 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24650 MODE_VECTOR_BOOL.
24651 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24652 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24653 Likewise.
24654 * stor-layout.c (int_mode_for_mode): Likewise.
24655 * tree.c (build_vector_type_for_mode): Likewise.
24656 * varasm.c (output_constant_pool_2): Likewise.
24657 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24658 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24659 for MODE_VECTOR_BOOL.
24660 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24661 of mode class checks.
24662 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24663 instead of a list of mode class checks.
24664 (expand_vector_scalar_condition): Likewise.
24665 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24666
24667 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24668 Alan Hayward <alan.hayward@arm.com>
24669 David Sherwood <david.sherwood@arm.com>
24670
24671 * machmode.h (mode_size): Change from unsigned short to
24672 poly_uint16_pod.
24673 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24674 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24675 or if measurement_type is not polynomial.
24676 (fixed_size_mode::includes_p): Check for constant-sized modes.
24677 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24678 return a poly_uint16 rather than an unsigned short.
24679 (emit_mode_size): Change the type of mode_size from unsigned short
24680 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24681 (emit_mode_adjustments): Cope with polynomial vector sizes.
24682 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24683 for GET_MODE_SIZE.
24684 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24685 for GET_MODE_SIZE.
24686 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24687 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24688 * caller-save.c (setup_save_areas): Likewise.
24689 (replace_reg_with_saved_mem): Likewise.
24690 * calls.c (emit_library_call_value_1): Likewise.
24691 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24692 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24693 (gen_lowpart_for_combine): Likewise.
24694 * convert.c (convert_to_integer_1): Likewise.
24695 * cse.c (equiv_constant, cse_insn): Likewise.
24696 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24697 (cselib_subst_to_values): Likewise.
24698 * dce.c (word_dce_process_block): Likewise.
24699 * df-problems.c (df_word_lr_mark_ref): Likewise.
24700 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24701 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24702 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24703 (rtl_for_decl_location): Likewise.
24704 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24705 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24706 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24707 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24708 (expand_expr_real_1): Likewise.
24709 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24710 (pad_below): Likewise.
24711 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24712 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24713 * ira.c (get_subreg_tracking_sizes): Likewise.
24714 * ira-build.c (ira_create_allocno_objects): Likewise.
24715 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24716 (ira_sort_regnos_for_alter_reg): Likewise.
24717 * ira-costs.c (record_operand_costs): Likewise.
24718 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24719 (resolve_simple_move): Likewise.
24720 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24721 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24722 (lra_constraints): Likewise.
24723 (CONST_POOL_OK_P): Reject variable-sized modes.
24724 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24725 (add_pseudo_to_slot, lra_spill): Likewise.
24726 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24727 * optabs-query.c (get_best_extraction_insn): Likewise.
24728 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24729 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24730 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24731 * recog.c (offsettable_address_addr_space_p): Likewise.
24732 * regcprop.c (maybe_mode_change): Likewise.
24733 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24734 * regrename.c (build_def_use): Likewise.
24735 * regstat.c (dump_reg_info): Likewise.
24736 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24737 (find_reloads, find_reloads_subreg_address): Likewise.
24738 * reload1.c (eliminate_regs_1): Likewise.
24739 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24740 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24741 (simplify_binary_operation_1, simplify_subreg): Likewise.
24742 * targhooks.c (default_function_arg_padding): Likewise.
24743 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24744 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24745 (verify_gimple_assign_ternary): Likewise.
24746 * tree-inline.c (estimate_move_cost): Likewise.
24747 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24748 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24749 (get_address_cost_ainc): Likewise.
24750 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24751 (vect_supportable_dr_alignment): Likewise.
24752 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24753 (vectorizable_reduction): Likewise.
24754 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24755 (vectorizable_operation, vectorizable_load): Likewise.
24756 * tree.c (build_same_sized_truth_vector_type): Likewise.
24757 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24758 * var-tracking.c (emit_note_insn_var_location): Likewise.
24759 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24760 (ADDR_VEC_ALIGN): Likewise.
24761
24762 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24763 Alan Hayward <alan.hayward@arm.com>
24764 David Sherwood <david.sherwood@arm.com>
24765
24766 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24767 unsigned short.
24768 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24769 or if measurement_type is polynomial.
24770 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24771 * combine.c (make_extraction): Likewise.
24772 * dse.c (find_shift_sequence): Likewise.
24773 * dwarf2out.c (mem_loc_descriptor): Likewise.
24774 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24775 (extract_bit_field, extract_low_bits): Likewise.
24776 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24777 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24778 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24779 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24780 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24781 * reload.c (find_reloads): Likewise.
24782 * reload1.c (alter_reg): Likewise.
24783 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24784 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24785 * tree-if-conv.c (predicate_mem_writes): Likewise.
24786 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24787 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24788 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24789 * valtrack.c (dead_debug_insert_temp): Likewise.
24790 * varasm.c (mergeable_constant_section): Likewise.
24791 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24792
24793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24794 Alan Hayward <alan.hayward@arm.com>
24795 David Sherwood <david.sherwood@arm.com>
24796
24797 * expr.c (expand_assignment): Cope with polynomial mode sizes
24798 when assigning to a CONCAT.
24799
24800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24801 Alan Hayward <alan.hayward@arm.com>
24802 David Sherwood <david.sherwood@arm.com>
24803
24804 * machmode.h (mode_precision): Change from unsigned short to
24805 poly_uint16_pod.
24806 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24807 short.
24808 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24809 or if measurement_type is not polynomial.
24810 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24811 in which the mode is already known to be a scalar_int_mode.
24812 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24813 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24814 initializer.
24815 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24816 for GET_MODE_PRECISION.
24817 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24818 for GET_MODE_PRECISION.
24819 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24820 as polynomial.
24821 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24822 (expand_field_assignment, make_extraction): Likewise.
24823 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24824 (get_last_value): Likewise.
24825 * convert.c (convert_to_integer_1): Likewise.
24826 * cse.c (cse_insn): Likewise.
24827 * expr.c (expand_expr_real_1): Likewise.
24828 * lra-constraints.c (simplify_operand_subreg): Likewise.
24829 * optabs-query.c (can_atomic_load_p): Likewise.
24830 * optabs.c (expand_atomic_load): Likewise.
24831 (expand_atomic_store): Likewise.
24832 * ree.c (combine_reaching_defs): Likewise.
24833 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24834 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24835 * tree.h (type_has_mode_precision_p): Likewise.
24836 * ubsan.c (instrument_si_overflow): Likewise.
24837
24838 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24839 Alan Hayward <alan.hayward@arm.com>
24840 David Sherwood <david.sherwood@arm.com>
24841
24842 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24843 polynomial numbers of units.
24844 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24845 (valid_vector_subparts_p): New function.
24846 (build_vector_type): Remove temporary shim and take the number
24847 of units as a poly_uint64 rather than an int.
24848 (build_opaque_vector_type): Take the number of units as a
24849 poly_uint64 rather than an int.
24850 * tree.c (build_vector_from_ctor): Handle polynomial
24851 TYPE_VECTOR_SUBPARTS.
24852 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24853 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24854 (build_vector_from_val): If the number of units is variable,
24855 use build_vec_duplicate_cst for constant operands and
24856 VEC_DUPLICATE_EXPR otherwise.
24857 (make_vector_type): Remove temporary is_constant ().
24858 (build_vector_type, build_opaque_vector_type): Take the number of
24859 units as a poly_uint64 rather than an int.
24860 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24861 VECTOR_CST_NELTS.
24862 * cfgexpand.c (expand_debug_expr): Likewise.
24863 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24864 (store_constructor, expand_expr_real_1): Likewise.
24865 (const_scalar_mask_from_tree): Likewise.
24866 * fold-const-call.c (fold_const_reduction): Likewise.
24867 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24868 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24869 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24870 (fold_relational_const): Likewise.
24871 (native_interpret_vector): Likewise. Change the size from an
24872 int to an unsigned int.
24873 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24874 TYPE_VECTOR_SUBPARTS.
24875 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24876 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24877 duplicating a non-constant operand into a variable-length vector.
24878 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24879 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24880 * ipa-icf.c (sem_variable::equals): Likewise.
24881 * match.pd: Likewise.
24882 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24883 * print-tree.c (print_node): Likewise.
24884 * stor-layout.c (layout_type): Likewise.
24885 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24886 * tree-cfg.c (verify_gimple_comparison): Likewise.
24887 (verify_gimple_assign_binary): Likewise.
24888 (verify_gimple_assign_ternary): Likewise.
24889 (verify_gimple_assign_single): Likewise.
24890 * tree-pretty-print.c (dump_generic_node): Likewise.
24891 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24892 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24893 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24894 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24895 (vect_shift_permute_load_chain): Likewise.
24896 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24897 (expand_vector_condition, optimize_vector_constructor): Likewise.
24898 (lower_vec_perm, get_compute_type): Likewise.
24899 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24900 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24901 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24902 (vect_recog_mask_conversion_pattern): Likewise.
24903 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24904 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24905 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24906 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24907 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24908 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24909 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24910 (supportable_widening_operation): Likewise.
24911 (supportable_narrowing_operation): Likewise.
24912 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24913 Likewise.
24914 * varasm.c (output_constant): Likewise.
24915
24916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24917 Alan Hayward <alan.hayward@arm.com>
24918 David Sherwood <david.sherwood@arm.com>
24919
24920 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24921 so that both the length == 3 and length != 3 cases set up their
24922 own permute vectors. Add comments explaining why we know the
24923 number of elements is constant.
24924 (vect_permute_load_chain): Likewise.
24925
24926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24927 Alan Hayward <alan.hayward@arm.com>
24928 David Sherwood <david.sherwood@arm.com>
24929
24930 * machmode.h (mode_nunits): Change from unsigned char to
24931 poly_uint16_pod.
24932 (ONLY_FIXED_SIZE_MODES): New macro.
24933 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24934 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24935 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24936 New typedefs.
24937 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24938 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24939 or if measurement_type is not polynomial.
24940 * genmodes.c (ZERO_COEFFS): New macro.
24941 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24942 poly_uint16.
24943 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24944 Use ZERO_COEFFS when emitting initializers.
24945 * data-streamer.h (bp_pack_poly_value): New function.
24946 (bp_unpack_poly_value): Likewise.
24947 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24948 for GET_MODE_NUNITS.
24949 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24950 for GET_MODE_NUNITS.
24951 * tree.c (make_vector_type): Remove temporary shim and make
24952 the real function take the number of units as a poly_uint64
24953 rather than an int.
24954 (build_vector_type_for_mode): Handle polynomial nunits.
24955 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24956 * emit-rtl.c (const_vec_series_p_1): Likewise.
24957 (gen_rtx_CONST_VECTOR): Likewise.
24958 * fold-const.c (test_vec_duplicate_folding): Likewise.
24959 * genrecog.c (validate_pattern): Likewise.
24960 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24961 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24962 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24963 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24964 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24965 * rtlanal.c (subreg_get_info): Likewise.
24966 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24967 (vect_grouped_load_supported): Likewise.
24968 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24969 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24970 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24971 (simplify_const_unary_operation, simplify_binary_operation_1)
24972 (simplify_const_binary_operation, simplify_ternary_operation)
24973 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24974 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24975 instead of CONST_VECTOR_NUNITS.
24976 * varasm.c (output_constant_pool_2): Likewise.
24977 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24978 explicit-encoded elements in the XVEC for variable-length vectors.
24979
24980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24981
24982 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24983
24984 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24985 Alan Hayward <alan.hayward@arm.com>
24986 David Sherwood <david.sherwood@arm.com>
24987
24988 * coretypes.h (fixed_size_mode): Declare.
24989 (fixed_size_mode_pod): New typedef.
24990 * builtins.h (target_builtins::x_apply_args_mode)
24991 (target_builtins::x_apply_result_mode): Change type to
24992 fixed_size_mode_pod.
24993 * builtins.c (apply_args_size, apply_result_size, result_vector)
24994 (expand_builtin_apply_args_1, expand_builtin_apply)
24995 (expand_builtin_return): Update accordingly.
24996
24997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24998
24999 * cse.c (hash_rtx_cb): Hash only the encoded elements.
25000 * cselib.c (cselib_hash_rtx): Likewise.
25001 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
25002 CONST_VECTOR encoding.
25003
25004 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25005 Jeff Law <law@redhat.com>
25006
25007 PR target/83641
25008 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
25009 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
25010 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
25011 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
25012
25013 PR target/83641
25014 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
25015 explicitly probe *sp in a noreturn function if there were any callee
25016 register saves or frame pointer is needed.
25017
25018 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25019
25020 PR debug/83621
25021 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
25022 BLKmode for ternary, binary or unary expressions.
25023
25024 PR debug/83645
25025 * var-tracking.c (delete_vta_debug_insn): New inline function.
25026 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
25027 insns from get_insns () to NULL instead of each bb separately.
25028 Use delete_vta_debug_insn. No longer static.
25029 (vt_debug_insns_local, variable_tracking_main_1): Adjust
25030 delete_vta_debug_insns callers.
25031 * rtl.h (delete_vta_debug_insns): Declare.
25032 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
25033 instead of variable_tracking_main.
25034
25035 2018-01-03 Martin Sebor <msebor@redhat.com>
25036
25037 PR tree-optimization/83603
25038 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
25039 arguments past the endof the argument list in functions declared
25040 without a prototype.
25041 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
25042 Avoid checking when arguments are null.
25043
25044 2018-01-03 Martin Sebor <msebor@redhat.com>
25045
25046 PR c/83559
25047 * doc/extend.texi (attribute const): Fix a typo.
25048 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
25049 issuing -Wsuggest-attribute for void functions.
25050
25051 2018-01-03 Martin Sebor <msebor@redhat.com>
25052
25053 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
25054 offset_int::from instead of wide_int::to_shwi.
25055 (maybe_diag_overlap): Remove assertion.
25056 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
25057 * gimple-ssa-sprintf.c (format_directive): Same.
25058 (parse_directive): Same.
25059 (sprintf_dom_walker::compute_format_length): Same.
25060 (try_substitute_return_value): Same.
25061
25062 2018-01-03 Jeff Law <law@redhat.com>
25063
25064 PR middle-end/83654
25065 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
25066 non-constant residual for zero at runtime and avoid probing in
25067 that case. Reorganize code for trailing problem to mirror handling
25068 of the residual.
25069
25070 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25071
25072 PR tree-optimization/83501
25073 * tree-ssa-strlen.c (get_string_cst): New.
25074 (handle_char_store): Call get_string_cst.
25075
25076 2018-01-03 Martin Liska <mliska@suse.cz>
25077
25078 PR tree-optimization/83593
25079 * tree-ssa-strlen.c: Include tree-cfg.h.
25080 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
25081 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
25082 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
25083 to false.
25084 (strlen_dom_walker::before_dom_children): Call
25085 gimple_purge_dead_eh_edges. Dump tranformation with details
25086 dump flags.
25087 (strlen_dom_walker::before_dom_children): Update call by adding
25088 new argument cleanup_eh.
25089 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
25090
25091 2018-01-03 Martin Liska <mliska@suse.cz>
25092
25093 PR ipa/83549
25094 * cif-code.def (VARIADIC_THUNK): New enum value.
25095 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
25096 thunks.
25097
25098 2018-01-03 Jan Beulich <jbeulich@suse.com>
25099
25100 * sse.md (mov<mode>_internal): Tighten condition for when to use
25101 vmovdqu<ssescalarsize> for TI and OI modes.
25102
25103 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25104
25105 Update copyright years.
25106
25107 2018-01-03 Martin Liska <mliska@suse.cz>
25108
25109 PR ipa/83594
25110 * ipa-visibility.c (function_and_variable_visibility): Skip
25111 functions with noipa attribure.
25112
25113 2018-01-03 Jakub Jelinek <jakub@redhat.com>
25114
25115 * gcc.c (process_command): Update copyright notice dates.
25116 * gcov-dump.c (print_version): Ditto.
25117 * gcov.c (print_version): Ditto.
25118 * gcov-tool.c (print_version): Ditto.
25119 * gengtype.c (create_file): Ditto.
25120 * doc/cpp.texi: Bump @copying's copyright year.
25121 * doc/cppinternals.texi: Ditto.
25122 * doc/gcc.texi: Ditto.
25123 * doc/gccint.texi: Ditto.
25124 * doc/gcov.texi: Ditto.
25125 * doc/install.texi: Ditto.
25126 * doc/invoke.texi: Ditto.
25127
25128 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25129
25130 * vector-builder.h (vector_builder::m_full_nelts): Change from
25131 unsigned int to poly_uint64.
25132 (vector_builder::full_nelts): Update prototype accordingly.
25133 (vector_builder::new_vector): Likewise.
25134 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
25135 (vector_builder::operator ==): Likewise.
25136 (vector_builder::finalize): Likewise.
25137 * int-vector-builder.h (int_vector_builder::int_vector_builder):
25138 Take the number of elements as a poly_uint64 rather than an
25139 unsigned int.
25140 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
25141 from unsigned int to poly_uint64.
25142 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
25143 (vec_perm_indices::new_vector): Likewise.
25144 (vec_perm_indices::length): Likewise.
25145 (vec_perm_indices::nelts_per_input): Likewise.
25146 (vec_perm_indices::input_nelts): Likewise.
25147 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
25148 number of elements per input as a poly_uint64 rather than an
25149 unsigned int. Use the original encoding for variable-length
25150 vectors, rather than clamping each individual element.
25151 For the second and subsequent elements in each pattern,
25152 clamp the step and base before clamping their sum.
25153 (vec_perm_indices::series_p): Handle polynomial element counts.
25154 (vec_perm_indices::all_in_range_p): Likewise.
25155 (vec_perm_indices_to_tree): Likewise.
25156 (vec_perm_indices_to_rtx): Likewise.
25157 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
25158 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
25159 (tree_vector_builder::new_binary_operation): Handle polynomial
25160 element counts. Return false if we need to know the number
25161 of elements at compile time.
25162 * fold-const.c (fold_vec_perm): Punt if the number of elements
25163 isn't known at compile time.
25164
25165 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25166
25167 * vec-perm-indices.h (vec_perm_builder): Change element type
25168 from HOST_WIDE_INT to poly_int64.
25169 (vec_perm_indices::element_type): Update accordingly.
25170 (vec_perm_indices::clamp): Handle polynomial element_types.
25171 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25172 (vec_perm_indices::all_in_range_p): Likewise.
25173 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
25174 than shwi trees.
25175 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
25176 polynomial vec_perm_indices element types.
25177 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
25178 * fold-const.c (fold_vec_perm): Likewise.
25179 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
25180 * tree-vect-generic.c (lower_vec_perm): Likewise.
25181 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25182 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
25183 element type to 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 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
25190 rather than an int. Use plus_constant.
25191 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
25192 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
25193
25194 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25195 Alan Hayward <alan.hayward@arm.com>
25196 David Sherwood <david.sherwood@arm.com>
25197
25198 * calls.c (emit_call_1, expand_call): Change struct_value_size from
25199 a HOST_WIDE_INT to a poly_int64.
25200
25201 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25202 Alan Hayward <alan.hayward@arm.com>
25203 David Sherwood <david.sherwood@arm.com>
25204
25205 * calls.c (load_register_parameters): Cope with polynomial
25206 mode sizes. Require a constant size for BLKmode parameters
25207 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
25208 forces a parameter to be padded at the lsb end in order to
25209 fill a complete number of words, require the parameter size
25210 to be ordered wrt UNITS_PER_WORD.
25211
25212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25213 Alan Hayward <alan.hayward@arm.com>
25214 David Sherwood <david.sherwood@arm.com>
25215
25216 * reload1.c (spill_stack_slot_width): Change element type
25217 from unsigned int to poly_uint64_pod.
25218 (alter_reg): Treat mode sizes as polynomial.
25219
25220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25221 Alan Hayward <alan.hayward@arm.com>
25222 David Sherwood <david.sherwood@arm.com>
25223
25224 * reload.c (complex_word_subreg_p): New function.
25225 (reload_inner_reg_of_subreg, push_reload): Use it.
25226
25227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25228 Alan Hayward <alan.hayward@arm.com>
25229 David Sherwood <david.sherwood@arm.com>
25230
25231 * lra-constraints.c (process_alt_operands): Reject matched
25232 operands whose sizes aren't ordered.
25233 (match_reload): Refer to this check here.
25234
25235 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25236 Alan Hayward <alan.hayward@arm.com>
25237 David Sherwood <david.sherwood@arm.com>
25238
25239 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
25240 that the mode size is in the set {1, 2, 4, 8, 16}.
25241
25242 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25243 Alan Hayward <alan.hayward@arm.com>
25244 David Sherwood <david.sherwood@arm.com>
25245
25246 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
25247 Use plus_constant instead of gen_rtx_PLUS.
25248
25249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25250 Alan Hayward <alan.hayward@arm.com>
25251 David Sherwood <david.sherwood@arm.com>
25252
25253 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
25254 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
25255 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
25256 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
25257 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
25258 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
25259 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
25260 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
25261 * config/i386/i386.c (ix86_push_rounding): ...this new function.
25262 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
25263 a poly_int64.
25264 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
25265 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
25266 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
25267 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
25268 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
25269 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
25270 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
25271 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
25272 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
25273 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
25274 function.
25275 * expr.c (emit_move_resolve_push): Treat the input and result
25276 of PUSH_ROUNDING as a poly_int64.
25277 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
25278 (emit_push_insn): Likewise.
25279 * lra-eliminations.c (mark_not_eliminable): Likewise.
25280 * recog.c (push_operand): Likewise.
25281 * reload1.c (elimination_effects): Likewise.
25282 * rtlanal.c (nonzero_bits1): Likewise.
25283 * calls.c (store_one_arg): Likewise. Require the padding to be
25284 known at compile time.
25285
25286 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25287 Alan Hayward <alan.hayward@arm.com>
25288 David Sherwood <david.sherwood@arm.com>
25289
25290 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
25291 Use plus_constant instead of gen_rtx_PLUS.
25292
25293 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25294 Alan Hayward <alan.hayward@arm.com>
25295 David Sherwood <david.sherwood@arm.com>
25296
25297 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
25298 rather than an int.
25299
25300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25301 Alan Hayward <alan.hayward@arm.com>
25302 David Sherwood <david.sherwood@arm.com>
25303
25304 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
25305 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
25306 via stack temporaries. Treat the mode size as polynomial 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 * expr.c (expand_expr_real_2): When handling conversions involving
25313 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
25314 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
25315 as a poly_uint64 too.
25316
25317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25318 Alan Hayward <alan.hayward@arm.com>
25319 David Sherwood <david.sherwood@arm.com>
25320
25321 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
25322
25323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25324 Alan Hayward <alan.hayward@arm.com>
25325 David Sherwood <david.sherwood@arm.com>
25326
25327 * combine.c (can_change_dest_mode): Handle polynomial
25328 REGMODE_NATURAL_SIZE.
25329 * expmed.c (store_bit_field_1): Likewise.
25330 * expr.c (store_constructor): Likewise.
25331 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
25332 and polynomial REGMODE_NATURAL_SIZE.
25333 (gen_lowpart_common): Likewise.
25334 * reginfo.c (record_subregs_of_mode): Likewise.
25335 * rtlanal.c (read_modify_subreg_p): Likewise.
25336
25337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25338 Alan Hayward <alan.hayward@arm.com>
25339 David Sherwood <david.sherwood@arm.com>
25340
25341 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25342 numbers of elements.
25343
25344 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25345 Alan Hayward <alan.hayward@arm.com>
25346 David Sherwood <david.sherwood@arm.com>
25347
25348 * match.pd: Cope with polynomial numbers of vector elements.
25349
25350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25351 Alan Hayward <alan.hayward@arm.com>
25352 David Sherwood <david.sherwood@arm.com>
25353
25354 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25355 in a POINTER_PLUS_EXPR.
25356
25357 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25358 Alan Hayward <alan.hayward@arm.com>
25359 David Sherwood <david.sherwood@arm.com>
25360
25361 * omp-simd-clone.c (simd_clone_subparts): New function.
25362 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25363 (ipa_simd_modify_function_body): Likewise.
25364
25365 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25366 Alan Hayward <alan.hayward@arm.com>
25367 David Sherwood <david.sherwood@arm.com>
25368
25369 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25370 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25371 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25372 (expand_vector_condition, vector_element): Likewise.
25373 (subparts_gt): New function.
25374 (get_compute_type): Use subparts_gt.
25375 (count_type_subparts): Delete.
25376 (expand_vector_operations_1): Use subparts_gt instead of
25377 count_type_subparts.
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-data-refs.c (vect_no_alias_p): Replace with...
25384 (vect_compile_time_alias): ...this new function. Do the calculation
25385 on poly_ints rather than trees.
25386 (vect_prune_runtime_alias_test_list): Update call accordingly.
25387
25388 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25389 Alan Hayward <alan.hayward@arm.com>
25390 David Sherwood <david.sherwood@arm.com>
25391
25392 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25393 numbers of units.
25394 (vect_schedule_slp_instance): Likewise.
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-slp.c (vect_get_and_check_slp_defs): Reject
25401 constant and extern definitions for variable-length vectors.
25402 (vect_get_constant_vectors): Note that the number of units
25403 is known to be constant.
25404
25405 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25406 Alan Hayward <alan.hayward@arm.com>
25407 David Sherwood <david.sherwood@arm.com>
25408
25409 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25410 of units as polynomial. Choose between WIDE and NARROW based
25411 on multiple_p.
25412
25413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25414 Alan Hayward <alan.hayward@arm.com>
25415 David Sherwood <david.sherwood@arm.com>
25416
25417 * tree-vect-stmts.c (simd_clone_subparts): New function.
25418 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25419
25420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25421 Alan Hayward <alan.hayward@arm.com>
25422 David Sherwood <david.sherwood@arm.com>
25423
25424 * tree-vect-stmts.c (vectorizable_call): Treat the number of
25425 vectors as polynomial. Use build_index_vector for
25426 IFN_GOMP_SIMD_LANE.
25427
25428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25429 Alan Hayward <alan.hayward@arm.com>
25430 David Sherwood <david.sherwood@arm.com>
25431
25432 * tree-vect-stmts.c (get_load_store_type): Treat the number of
25433 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25434 for variable-length vectors.
25435 (vectorizable_mask_load_store): Treat the number of units as
25436 polynomial, asserting that it is constant if the condition has
25437 already been enforced.
25438 (vectorizable_store, vectorizable_load): Likewise.
25439
25440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25441 Alan Hayward <alan.hayward@arm.com>
25442 David Sherwood <david.sherwood@arm.com>
25443
25444 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25445 of units as polynomial. Punt if we can't tell at compile time
25446 which vector contains the final result.
25447
25448 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25449 Alan Hayward <alan.hayward@arm.com>
25450 David Sherwood <david.sherwood@arm.com>
25451
25452 * tree-vect-loop.c (vectorizable_induction): Treat the number
25453 of units as polynomial. Punt on SLP inductions. Use an integer
25454 VEC_SERIES_EXPR for variable-length integer reductions. Use a
25455 cast of such a series for variable-length floating-point
25456 reductions.
25457
25458 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25459 Alan Hayward <alan.hayward@arm.com>
25460 David Sherwood <david.sherwood@arm.com>
25461
25462 * tree.h (build_index_vector): Declare.
25463 * tree.c (build_index_vector): New function.
25464 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25465 of units as polynomial, forcibly converting it to a constant if
25466 vectorizable_reduction has already enforced the condition.
25467 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
25468 to create a {1,2,3,...} vector.
25469 (vectorizable_reduction): Treat the number of units as polynomial.
25470 Choose vectype_in based on the largest scalar element size rather
25471 than the smallest number of units. Enforce the restrictions
25472 relied on above.
25473
25474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25475 Alan Hayward <alan.hayward@arm.com>
25476 David Sherwood <david.sherwood@arm.com>
25477
25478 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25479 number of units as polynomial.
25480
25481 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25482 Alan Hayward <alan.hayward@arm.com>
25483 David Sherwood <david.sherwood@arm.com>
25484
25485 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25486 * target.def (autovectorize_vector_sizes): Return the vector sizes
25487 by pointer, using vector_sizes rather than a bitmask.
25488 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25489 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25490 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25491 Likewise.
25492 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25493 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25494 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25495 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25496 * omp-general.c (omp_max_vf): Likewise.
25497 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25498 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25499 * tree-vect-loop.c (vect_analyze_loop): Likewise.
25500 * tree-vect-slp.c (vect_slp_bb): Likewise.
25501 * doc/tm.texi: Regenerate.
25502 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25503 to a poly_uint64.
25504 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25505 the vector size as a poly_uint64 rather than an unsigned int.
25506 (current_vector_size): Change from an unsigned int to a poly_uint64.
25507 (get_vectype_for_scalar_type): Update accordingly.
25508 * tree.h (build_truth_vector_type): Take the size and number of
25509 units as a poly_uint64 rather than an unsigned int.
25510 (build_vector_type): Add a temporary overload that takes
25511 the number of units as a poly_uint64 rather than an unsigned int.
25512 * tree.c (make_vector_type): Likewise.
25513 (build_truth_vector_type): Take the number of units as a poly_uint64
25514 rather than an unsigned int.
25515
25516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25517 Alan Hayward <alan.hayward@arm.com>
25518 David Sherwood <david.sherwood@arm.com>
25519
25520 * target.def (get_mask_mode): Take the number of units and length
25521 as poly_uint64s rather than unsigned ints.
25522 * targhooks.h (default_get_mask_mode): Update accordingly.
25523 * targhooks.c (default_get_mask_mode): Likewise.
25524 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25525 * doc/tm.texi: Regenerate.
25526
25527 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25528 Alan Hayward <alan.hayward@arm.com>
25529 David Sherwood <david.sherwood@arm.com>
25530
25531 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25532 * omp-general.c (omp_max_vf): Likewise.
25533 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25534 (expand_omp_simd): Handle polynomial safelen.
25535 * omp-low.c (omplow_simd_context): Add a default constructor.
25536 (omplow_simd_context::max_vf): Change from int to poly_uint64.
25537 (lower_rec_simd_input_clauses): Update accordingly.
25538 (lower_rec_input_clauses): Likewise.
25539
25540 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25541 Alan Hayward <alan.hayward@arm.com>
25542 David Sherwood <david.sherwood@arm.com>
25543
25544 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25545 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25546 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25547 (vect_analyze_slp_cost): Likewise.
25548 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25549 (vect_model_load_cost): Likewise.
25550
25551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25552 Alan Hayward <alan.hayward@arm.com>
25553 David Sherwood <david.sherwood@arm.com>
25554
25555 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25556 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25557 from an unsigned int * to a poly_uint64_pod *.
25558 (calculate_unrolling_factor): New function.
25559 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
25560
25561 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25562 Alan Hayward <alan.hayward@arm.com>
25563 David Sherwood <david.sherwood@arm.com>
25564
25565 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25566 from an unsigned int to a poly_uint64.
25567 (_loop_vec_info::slp_unrolling_factor): Likewise.
25568 (_loop_vec_info::vectorization_factor): Change from an int
25569 to a poly_uint64.
25570 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25571 (vect_get_num_vectors): New function.
25572 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25573 (vect_get_num_copies): Use vect_get_num_vectors.
25574 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25575 to an unsigned int *.
25576 (vect_analyze_data_refs): Change min_vf from an int * to a
25577 poly_uint64 *.
25578 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25579 than an unsigned HOST_WIDE_INT.
25580 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25581 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25582 to an unsigned int *.
25583 (vect_analyze_data_ref_dependences): Likewise.
25584 (vect_compute_data_ref_alignment): Handle polynomial vf.
25585 (vect_enhance_data_refs_alignment): Likewise.
25586 (vect_prune_runtime_alias_test_list): Likewise.
25587 (vect_shift_permute_load_chain): Likewise.
25588 (vect_supportable_dr_alignment): Likewise.
25589 (dependence_distance_ge_vf): Take the vectorization factor as a
25590 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25591 (vect_analyze_data_refs): Change min_vf from an int * to a
25592 poly_uint64 *.
25593 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25594 vfm1 as a poly_uint64 rather than an int. Make the same change
25595 for the returned bound_scalar.
25596 (vect_gen_vector_loop_niters): Handle polynomial vf.
25597 (vect_do_peeling): Likewise. Update call to
25598 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25599 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25600 be constant.
25601 * tree-vect-loop.c (vect_determine_vectorization_factor)
25602 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25603 (vect_get_known_peeling_cost): Likewise.
25604 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25605 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25606 (vect_transform_loop): Likewise. Use the lowest possible VF when
25607 updating the upper bounds of the loop.
25608 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25609 rather than an int.
25610 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25611 polynomial unroll factors.
25612 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25613 (vect_make_slp_decision): Likewise.
25614 (vect_supported_load_permutation_p): Likewise, and polynomial
25615 vf too.
25616 (vect_analyze_slp_cost): Handle polynomial vf.
25617 (vect_slp_analyze_node_operations): Likewise.
25618 (vect_slp_analyze_bb_1): Likewise.
25619 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25620 than an unsigned HOST_WIDE_INT.
25621 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25622 (vectorizable_load): Handle polynomial vf.
25623 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25624 a poly_uint64.
25625 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25626
25627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25628 Alan Hayward <alan.hayward@arm.com>
25629 David Sherwood <david.sherwood@arm.com>
25630
25631 * match.pd: Handle bit operations involving three constants
25632 and try to fold one pair.
25633
25634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25635
25636 * tree-vect-loop-manip.c: Include gimple-fold.h.
25637 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25638 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25639 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25640 Add a path that uses a step of VF instead of 1, but disable it
25641 for now.
25642 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25643 and niters_no_overflow parameters. Update calls to
25644 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25645 Create a new SSA name if the latter choses to use a ste other
25646 than zero, and return it via niters_vector_mult_vf_var.
25647 * tree-vect-loop.c (vect_transform_loop): Update calls to
25648 vect_do_peeling, vect_gen_vector_loop_niters and
25649 slpeel_make_loop_iterate_ntimes.
25650 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25651 (vect_gen_vector_loop_niters): Update declarations after above changes.
25652
25653 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25654
25655 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25656 128-bit round to integer instructions.
25657 (ceil<mode>2): Likewise.
25658 (btrunc<mode>2): Likewise.
25659 (round<mode>2): Likewise.
25660
25661 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25662
25663 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25664 unaligned VSX load/store on P8/P9.
25665 (expand_block_clear): Allow the use of unaligned VSX
25666 load/store on P8/P9.
25667
25668 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25669
25670 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25671 New function.
25672 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25673 swap associated with both a load and a store.
25674
25675 2018-01-02 Andrew Waterman <andrew@sifive.com>
25676
25677 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25678 * config/riscv/riscv.md (clear_cache): Use it.
25679
25680 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25681
25682 * web.c: Remove out-of-date comment.
25683
25684 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25685
25686 * expr.c (fixup_args_size_notes): Check that any existing
25687 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25688 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25689 (emit_single_push_insn): ...here.
25690
25691 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25692
25693 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25694 (const_vector_encoded_nelts): New function.
25695 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25696 (const_vector_int_elt, const_vector_elt): Declare.
25697 * emit-rtl.c (const_vector_int_elt_1): New function.
25698 (const_vector_elt): Likewise.
25699 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25700 of CONST_VECTOR_ELT.
25701
25702 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25703
25704 * expr.c: Include rtx-vector-builder.h.
25705 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25706 directly on the tree encoding.
25707 (const_vector_from_tree): Likewise.
25708 * optabs.c: Include rtx-vector-builder.h.
25709 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25710 sequence of "u" values.
25711 * vec-perm-indices.c: Include rtx-vector-builder.h.
25712 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25713 directly on the vec_perm_indices encoding.
25714
25715 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25716
25717 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25718 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25719 * rtx-vector-builder.h: New file.
25720 * rtx-vector-builder.c: Likewise.
25721 * rtl.h (rtx_def::u2): Add a const_vector field.
25722 (CONST_VECTOR_NPATTERNS): New macro.
25723 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25724 (CONST_VECTOR_DUPLICATE_P): Likewise.
25725 (CONST_VECTOR_STEPPED_P): Likewise.
25726 (CONST_VECTOR_ENCODED_ELT): Likewise.
25727 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25728 (unwrap_const_vec_duplicate): Likewise.
25729 (const_vec_series_p): Check for a non-duplicated vector encoding.
25730 Say that the function only returns true for integer vectors.
25731 * emit-rtl.c: Include rtx-vector-builder.h.
25732 (gen_const_vec_duplicate_1): Delete.
25733 (gen_const_vector): Call gen_const_vec_duplicate instead of
25734 gen_const_vec_duplicate_1.
25735 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25736 (gen_const_vec_duplicate): Use rtx_vector_builder.
25737 (gen_const_vec_series): Likewise.
25738 (gen_rtx_CONST_VECTOR): Likewise.
25739 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25740 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25741 Build a new vector rather than modifying a CONST_VECTOR in-place.
25742 (handle_special_swappables): Update call accordingly.
25743 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25744 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25745 Build a new vector rather than modifying a CONST_VECTOR in-place.
25746 (handle_special_swappables): Update call accordingly.
25747
25748 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25749
25750 * simplify-rtx.c (simplify_const_binary_operation): Use
25751 CONST_VECTOR_ELT instead of XVECEXP.
25752
25753 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25754
25755 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25756 the selector elements to be different from the data elements
25757 if the selector is a VECTOR_CST.
25758 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25759 ssizetype for the selector.
25760
25761 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25762
25763 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25764 before testing each element individually.
25765 * tree-vect-generic.c (lower_vec_perm): Likewise.
25766
25767 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25768
25769 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25770 * selftest-run-tests.c (selftest::run_tests): Call it.
25771 * vector-builder.h (vector_builder::operator ==): New function.
25772 (vector_builder::operator !=): Likewise.
25773 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25774 (vec_perm_indices::all_from_input_p): New function.
25775 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25776 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25777 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25778 instead of reading the VECTOR_CST directly. Detect whether both
25779 vector inputs are the same before constructing the vec_perm_indices,
25780 and update the number of inputs argument accordingly. Use the
25781 utility functions added above. Only construct sel2 if we need to.
25782
25783 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25784
25785 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25786 the broadcast of the low byte.
25787 (expand_mult_highpart): Use an explicit encoding for the permutes.
25788 * optabs-query.c (can_mult_highpart_p): Likewise.
25789 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25790 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25791 (vectorizable_bswap): Likewise.
25792 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25793 explicit encoding for the power-of-2 permutes.
25794 (vect_permute_store_chain): Likewise.
25795 (vect_grouped_load_supported): Likewise.
25796 (vect_permute_load_chain): Likewise.
25797
25798 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25799
25800 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25801 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25802 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25803 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25804 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25805 (vect_gen_perm_mask_any): Likewise.
25806
25807 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25808
25809 * int-vector-builder.h: New file.
25810 * vec-perm-indices.h: Include int-vector-builder.h.
25811 (vec_perm_indices): Redefine as an int_vector_builder.
25812 (auto_vec_perm_indices): Delete.
25813 (vec_perm_builder): Redefine as a stand-alone class.
25814 (vec_perm_indices::vec_perm_indices): New function.
25815 (vec_perm_indices::clamp): Likewise.
25816 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25817 (vec_perm_indices::new_vector): New function.
25818 (vec_perm_indices::new_expanded_vector): Update for new
25819 vec_perm_indices class.
25820 (vec_perm_indices::rotate_inputs): New function.
25821 (vec_perm_indices::all_in_range_p): Operate directly on the
25822 encoded form, without computing elided elements.
25823 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25824 encoding. Update for new vec_perm_indices class.
25825 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25826 the given vec_perm_builder.
25827 (expand_vec_perm_var): Update vec_perm_builder constructor.
25828 (expand_mult_highpart): Use vec_perm_builder instead of
25829 auto_vec_perm_indices.
25830 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25831 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25832 or double series encoding as appropriate.
25833 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25834 vec_perm_indices instead of auto_vec_perm_indices.
25835 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25836 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25837 (vect_permute_store_chain): Likewise.
25838 (vect_grouped_load_supported): Likewise.
25839 (vect_permute_load_chain): Likewise.
25840 (vect_shift_permute_load_chain): Likewise.
25841 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25842 (vect_transform_slp_perm_load): Likewise.
25843 (vect_schedule_slp_instance): Likewise.
25844 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25845 (vectorizable_mask_load_store): Likewise.
25846 (vectorizable_bswap): Likewise.
25847 (vectorizable_store): Likewise.
25848 (vectorizable_load): Likewise.
25849 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25850 vec_perm_indices instead of auto_vec_perm_indices. Use
25851 tree_to_vec_perm_builder to read the vector from a tree.
25852 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25853 vec_perm_builder instead of a vec_perm_indices.
25854 (have_whole_vector_shift): Use vec_perm_builder and
25855 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25856 truncation to calc_vec_perm_mask_for_shift.
25857 (vect_create_epilog_for_reduction): Likewise.
25858 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25859 from auto_vec_perm_indices to vec_perm_indices.
25860 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25861 instead of changing individual elements.
25862 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25863 the vector in d.perm.
25864 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25865 from auto_vec_perm_indices to vec_perm_indices.
25866 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25867 instead of changing individual elements.
25868 (arm_vectorize_vec_perm_const): Use new_vector to install
25869 the vector in d.perm.
25870 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25871 Update vec_perm_builder constructor.
25872 (rs6000_expand_interleave): Likewise.
25873 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25874 (rs6000_expand_interleave): Likewise.
25875
25876 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25877
25878 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25879 to qimode could truncate the indices.
25880 * optabs.c (expand_vec_perm_var): Likewise.
25881
25882 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25883
25884 * Makefile.in (OBJS): Add vec-perm-indices.o.
25885 * vec-perm-indices.h: New file.
25886 * vec-perm-indices.c: Likewise.
25887 * target.h (vec_perm_indices): Replace with a forward class
25888 declaration.
25889 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25890 * optabs.h: Include vec-perm-indices.h.
25891 (expand_vec_perm): Delete.
25892 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25893 (expand_vec_perm_const): Declare.
25894 * target.def (vec_perm_const_ok): Replace with...
25895 (vec_perm_const): ...this new hook.
25896 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25897 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25898 * doc/tm.texi: Regenerate.
25899 * optabs.def (vec_perm_const): Delete.
25900 * doc/md.texi (vec_perm_const): Likewise.
25901 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25902 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25903 expand_vec_perm for constant permutation vectors. Assert that
25904 the mode of variable permutation vectors is the integer equivalent
25905 of the mode that is being permuted.
25906 * optabs-query.h (selector_fits_mode_p): Declare.
25907 * optabs-query.c: Include vec-perm-indices.h.
25908 (selector_fits_mode_p): New function.
25909 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25910 is defined, instead of checking whether the vec_perm_const_optab
25911 exists. Use targetm.vectorize.vec_perm_const instead of
25912 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25913 fit in the vector mode before using a variable permute.
25914 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25915 vec_perm_indices instead of an rtx.
25916 (expand_vec_perm): Replace with...
25917 (expand_vec_perm_const): ...this new function. Take the selector
25918 as a vec_perm_indices rather than an rtx. Also take the mode of
25919 the selector. Update call to shift_amt_for_vec_perm_mask.
25920 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25921 Use vec_perm_indices::new_expanded_vector to expand the original
25922 selector into bytes. Check whether the indices fit in the vector
25923 mode before using a variable permute.
25924 (expand_vec_perm_var): Make global.
25925 (expand_mult_highpart): Use expand_vec_perm_const.
25926 * fold-const.c: Includes vec-perm-indices.h.
25927 * tree-ssa-forwprop.c: Likewise.
25928 * tree-vect-data-refs.c: Likewise.
25929 * tree-vect-generic.c: Likewise.
25930 * tree-vect-loop.c: Likewise.
25931 * tree-vect-slp.c: Likewise.
25932 * tree-vect-stmts.c: Likewise.
25933 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25934 Delete.
25935 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25936 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25937 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25938 (aarch64_vectorize_vec_perm_const): ...this new function.
25939 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25940 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25941 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25942 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25943 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25944 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25945 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25946 into...
25947 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25948 check for NEON modes.
25949 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25950 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25951 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25952 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25953 into...
25954 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25955 the old VEC_PERM_CONST conditions.
25956 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25957 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25958 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25959 (ia64_vectorize_vec_perm_const_ok): Merge into...
25960 (ia64_vectorize_vec_perm_const): ...this new function.
25961 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25962 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25963 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25964 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25965 * config/mips/mips.c (mips_expand_vec_perm_const)
25966 (mips_vectorize_vec_perm_const_ok): Merge into...
25967 (mips_vectorize_vec_perm_const): ...this new function.
25968 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25969 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25970 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25971 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25972 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25973 (rs6000_expand_vec_perm_const): Delete.
25974 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25975 Delete.
25976 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25977 (altivec_expand_vec_perm_const_le): Take each operand individually.
25978 Operate on constant selectors rather than rtxes.
25979 (altivec_expand_vec_perm_const): Likewise. Update call to
25980 altivec_expand_vec_perm_const_le.
25981 (rs6000_expand_vec_perm_const): Delete.
25982 (rs6000_vectorize_vec_perm_const_ok): Delete.
25983 (rs6000_vectorize_vec_perm_const): New function.
25984 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25985 an element count and rtx array.
25986 (rs6000_expand_extract_even): Update call accordingly.
25987 (rs6000_expand_interleave): Likewise.
25988 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25989 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25990 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25991 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25992 (rs6000_expand_vec_perm_const): Delete.
25993 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25994 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25995 (altivec_expand_vec_perm_const_le): Take each operand individually.
25996 Operate on constant selectors rather than rtxes.
25997 (altivec_expand_vec_perm_const): Likewise. Update call to
25998 altivec_expand_vec_perm_const_le.
25999 (rs6000_expand_vec_perm_const): Delete.
26000 (rs6000_vectorize_vec_perm_const_ok): Delete.
26001 (rs6000_vectorize_vec_perm_const): New function. Remove stray
26002 reference to the SPE evmerge intructions.
26003 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
26004 an element count and rtx array.
26005 (rs6000_expand_extract_even): Update call accordingly.
26006 (rs6000_expand_interleave): Likewise.
26007 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
26008 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
26009 new function.
26010 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
26011
26012 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26013
26014 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
26015 vector mode and that that mode matches the mode of the data
26016 being permuted.
26017 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
26018 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
26019 directly using expand_vec_perm_1 when forcing selectors into
26020 registers.
26021 (expand_vec_perm_var): New function, split out from expand_vec_perm.
26022
26023 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26024
26025 * optabs-query.h (can_vec_perm_p): Delete.
26026 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
26027 * optabs-query.c (can_vec_perm_p): Split into...
26028 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
26029 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
26030 particular selector is valid.
26031 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26032 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26033 (vect_grouped_load_supported): Likewise.
26034 (vect_shift_permute_load_chain): Likewise.
26035 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26036 (vect_transform_slp_perm_load): Likewise.
26037 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26038 (vectorizable_bswap): Likewise.
26039 (vect_gen_perm_mask_checked): Likewise.
26040 * fold-const.c (fold_ternary_loc): Likewise. Don't take
26041 implementations of variable permutation vectors into account
26042 when deciding which selector to use.
26043 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
26044 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
26045 with a false third argument.
26046 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
26047 to test whether the constant selector is valid and can_vec_perm_var_p
26048 to test whether a variable selector is valid.
26049
26050 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26051
26052 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
26053 * optabs-query.c (can_vec_perm_p): Likewise.
26054 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
26055 instead of vec_perm_indices.
26056 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
26057 (vect_gen_perm_mask_checked): Likewise,
26058 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
26059 (vect_gen_perm_mask_checked): Likewise,
26060
26061 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
26062
26063 * optabs-query.h (qimode_for_vec_perm): Declare.
26064 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
26065 (qimode_for_vec_perm): ...this new function.
26066 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
26067
26068 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26069
26070 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
26071 does not have a conditional at the top.
26072
26073 2018-01-02 Richard Biener <rguenther@suse.de>
26074
26075 * ipa-inline.c (big_speedup_p): Fix expression.
26076
26077 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26078
26079 PR target/81616
26080 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
26081 for generic 4->6.
26082
26083 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
26084
26085 PR target/81616
26086 Generic tuning.
26087 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
26088 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
26089 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
26090 cond_taken_branch_cost 3->4.
26091
26092 2018-01-01 Jakub Jelinek <jakub@redhat.com>
26093
26094 PR tree-optimization/83581
26095 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
26096 TODO_cleanup_cfg if any changes have been made.
26097
26098 PR middle-end/83608
26099 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
26100 convert_modes if target mode has the right side, but different mode
26101 class.
26102
26103 PR middle-end/83609
26104 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
26105 last argument when extracting from CONCAT. If either from_real or
26106 from_imag is NULL, use expansion through memory. If result is not
26107 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
26108 the parts directly to inner mode, if even that fails, use expansion
26109 through memory.
26110
26111 PR middle-end/83623
26112 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
26113 check for bswap in mode rather than HImode and use that in expand_unop
26114 too.
26115 \f
26116 Copyright (C) 2018 Free Software Foundation, Inc.
26117
26118 Copying and distribution of this file, with or without modification,
26119 are permitted in any medium without royalty provided the copyright
26120 notice and this notice are preserved.