]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
c3314b44a30b91ead3cb08399c20f274d8767ada
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
2
3 * config/s390/s390.h (enum processor_flags): Do not use
4 default tune parameter when -march was specified.
5
6 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7
8 PR target/86314
9 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11 operands.
12
13 2018-06-26 Richard Biener <rguenther@suse.de>
14
15 PR tree-optimization/86287
16 PR bootstrap/86316
17 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
18 (vect_analyze_loop): Initialize n_stmts.
19
20 2018-06-26 Richard Biener <rguenther@suse.de>
21
22 PR middle-end/86271
23 * fold-const.c (fold_convertible_p): Pointer extension
24 isn't valid.
25
26 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
27
28 PR debug/86064
29 * dwarf2out.c (loc_list_has_views): Adjust comments.
30 (dw_loc_list): Split single cross-partition range with
31 nonzero locview.
32
33 2018-06-25 Jeff Law <law@redhat.com>
34
35 * config/v850/predicates.md (const_float_1_operand): Fix match_code
36 test.
37 (const_float_0_operand): Remove unused predicate.
38 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
39 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
40 (recipsf2): New expander. Original pattern now called
41 (recipsf2_insn).
42 (recipdf2, recipdf2_insn): Similarly.
43 (rsqrtsf2, rsqrtsf2_insn): Similarly
44 (rsqrtdf2, rsqrtdf2_insn): Similarly
45
46 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
47
48 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
49 Simplify logic for FreeBSD (twice).
50
51 2018-06-25 Martin Sebor <msebor@redhat.com>
52
53 PR tree-optimization/86204
54 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
55 a strnlen result if it's less than the length of the string.
56
57 2018-06-25 Martin Sebor <msebor@redhat.com>
58
59 PR tree-optimization/85700
60 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
61 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
62 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
63
64 2018-06-25 Martin Sebor <msebor@redhat.com>
65
66 * doc/extend.texi (Zero-length arrays): Update and clarify.
67
68 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
69
70 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
71 added IEEE/IBM long double multilib support on PowerPC little
72 endian Linux systems.
73 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
74 (MULTILIB_DEFAULTS): Likewise.
75 * config/rs6000/rs6000.c (rs6000_option_override_internal):
76 Likewise.
77 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
78 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
79 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
80
81 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
82
83 PR middle-end/86311
84 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
85 (REORDER_45): Likewise.
86
87 2018-06-25 Jeff Law <law@redhat.com>
88
89 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
90 dividend to 32 bits. Adjust length.
91 (udivmodhi4): Cleanup output template. Fix length.
92
93 2018-06-25 Carl Love <cel@us.ibm.com>
94
95 * config/rs6000/vsx.md: Change word selector to prefered location.
96
97 2018-06-25 Richard Biener <rguenther@suse.de>
98
99 PR tree-optimization/86304
100 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
101 epilogue-if-converted loops as well.
102
103 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
104
105 * lto-section-out.c (lto_begin_section): Do not print section
106 name for noaddr and unnumbered dumps.
107
108 2018-06-25 Richard Biener <rguenther@suse.de>
109
110 * tree-vectorizer.h (struct vec_info_shared): New structure
111 with parts split out from struct vec_info and loop_nest from
112 struct _loop_vec_info.
113 (struct vec_info): Adjust accordingly.
114 (struct _loop_vec_info): Likewise.
115 (LOOP_VINFO_LOOP_NEST): Adjust.
116 (LOOP_VINFO_DATAREFS): Likewise.
117 (LOOP_VINFO_DDRS): Likewise.
118 (struct _bb_vec_info): Likewise.
119 (BB_VINFO_DATAREFS): Likewise.
120 (BB_VINFO_DDRS): Likewise.
121 (struct _stmt_vec_info): Add dr_aux member.
122 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
123 (DR_MISALIGNMENT_UNINITIALIZED): New.
124 (set_dr_misalignment): Adjust.
125 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
126 (vect_analyze_loop): Adjust prototype.
127 (vect_analyze_loop_form): Likewise.
128 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
129 Compute dependences lazily.
130 (vect_record_base_alignments): Use shared datarefs/ddrs.
131 (vect_verify_datarefs_alignment): Likewise.
132 (vect_analyze_data_refs_alignment): Likewise.
133 (vect_analyze_data_ref_accesses): Likewise.
134 (vect_analyze_data_refs): Likewise.
135 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
136 constructor parameter for shared part.
137 (vect_analyze_loop_form): Pass in shared part and adjust.
138 (vect_analyze_loop_2): Pass in storage for the number of
139 stmts. Move loop nest finding to the caller. Compute
140 datarefs lazily.
141 (vect_analyze_loop): Pass in shared part.
142 (vect_transform_loop): Verify shared datarefs are unchanged.
143 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
144 constructor parameter for shared part.
145 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
146 (vect_slp_bb): Verify shared datarefs are unchanged before
147 transform.
148 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
149 change.
150 (new_stmt_vec_info): Initialize DR_AUX misalignment to
151 DR_MISALIGNMENT_UNINITIALIZED.
152 * tree-vectorizer.c (vec_info::vec_info): Add constructor
153 parameter for shared part.
154 (vec_info::~vec_info): Adjust.
155 (vec_info_shared::vec_info_shared): New.
156 (vec_info_shared::~vec_info_shared): Likewise.
157 (vec_info_shared::save_datarefs): Likewise.
158 (vec_info_shared::check_datarefs): Likewise.
159 (try_vectorize_loop_1): Construct shared part live for analyses
160 of a single loop for multiple vector sizes.
161 * tree-parloops.c (gather_scalar_reductions): Adjust.
162
163 2018-06-25 Richard Biener <rguenther@suse.de>
164
165 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
166 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
167 (vect_analyze_data_refs): Remove similar code from here and
168 simplify accordingly.
169
170 2018-06-25 Richard Biener <rguenther@suse.de>
171
172 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
173 for reverse storage order accesses rather than asserting
174 they cannot happen here.
175
176 2018-06-25 Tom de Vries <tdevries@suse.de>
177
178 PR debug/86257
179 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
180 Use data16 instead of .byte for insn prefix.
181
182 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
183
184 PR C++/86082
185 * parser.c (make_char_string_pack): Pass this literal chars
186 through cpp_interpret_string.
187 (cp_parser_userdef_numeric_literal): Check the result of
188 make_char_string_pack.
189
190 2018-06-24 Maya Rashish <coypu@sdf.org>
191
192 * ginclude/stddef.h: Simplify conditions around avoiding
193 re-definition of __size_t.
194
195 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
196
197 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
198 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
199
200 2018-06-22 Maya Rashish <coypu@sdf.org>
201
202 * doc/invoke.texi (mno-fancy-math-387): Update for changes
203 made to OpenBSD and NetBSD through the years.
204
205 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
206
207 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
208 behavior of vec_pack (vector double, vector double) to match
209 behavior of vec_float2 (vector double, vector double).
210
211 2018-06-22 Olivier Hainque <hainque@adacore.com>
212
213 * gimplify.c (gimplify_function_tree): Prevent creation
214 of a trampoline for the address of the current function
215 passed to entry/exit instrumentation hooks.
216
217 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
218
219 PR target/86222
220 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
221 correctly.
222
223 2018-06-22 Martin Liska <mliska@suse.cz>
224
225 PR tree-optimization/86263
226 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
227 Bail out if is_enabled is false.
228 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
229 New declaration.
230 (jump_table_cluster::is_enabled): New function.
231
232 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
233
234 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
235 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
236 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
237 (lto_input_ts_binfo_tree_pointers): Likewise.
238 * tree-streamer-out.c (streamer_write_tree_bitfields,
239 write_ts_binfo_tree_pointers): Likewise.
240 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
241
242 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
243
244 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
245
246 2018-06-22 Martin Liska <mliska@suse.cz>
247
248 * symbol-summary.h (get): Make it pure and inline move
249 functionality from ::get function.
250 (get): Remove and inline into ::get and ::get_create.
251 (get_create): Move code from ::get function.
252
253 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
254
255 PR target/85994
256 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
257 -x assembler-with-cpp.
258
259 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
260
261 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
262 _FILE_OFFSET_BITS=64 for C++.
263
264 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
265
266 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
267 conversion insn that shows up when pr85657-3.c is compiled using
268 IEEE 128-bit long double.
269 (neg<mode>2_internal): Use the correct mode to check whether the
270 mode is IBM extended.
271 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
272 multiply and divide external functions from being created more
273 than once.
274
275 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
276
277 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
278 functions.
279 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
280 the edge can be forwarded.
281 (cfg_layout_merge_blocks): Likewise.
282
283 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
284
285 * except.c (finish_eh_generation): Commit edge insertions only after
286 the EH edges have been redirected from post-landing to landing pads.
287
288 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
289
290 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
291 create_tmp_var_for to create the FRAME decl.
292 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
293
294 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
295
296 * tree-inline.c (copy_edges_for_bb): Minor tweak.
297 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
298 debug statement when resetting its value.
299 (expand_call_inline): Copy the locus of the call onto the assignment
300 of the return value, if any. Use local variable in more cases.
301
302 2018-06-21 Martin Liska <mliska@suse.cz>
303
304 * ipa-pure-const.c (propagate_nothrow): Use
305 funct_state_summaries->get.
306 (dump_malloc_lattice): Likewise.
307 (propagate_malloc): Likewise.
308
309 2018-06-21 Richard Biener <rguenther@suse.de>
310
311 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
312 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
313 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
314 comment.
315 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
316 BLOCK_ABSTRACT_ORIGIN unconditionally.
317
318 2018-06-21 David Malcolm <dmalcolm@redhat.com>
319
320 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
321 deleting it.
322 * ipa-reference.c (ipa_reference_c_finalize): Delete
323 ipa_ref_opt_sum_summaries and set it to NULL.
324
325 2018-06-21 Tom de Vries <tdevries@suse.de>
326
327 PR tree-optimization/85859
328 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
329 test with comment from bb_no_side_effects_p.
330
331 2018-06-21 Richard Biener <rguenther@suse.de>
332
333 PR tree-optimization/86232
334 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
335 max for constant niter.
336
337 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
338
339 * config/aarch64/aarch64-simd.md
340 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
341
342 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
343
344 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
345 Make opernads of the unspec commutative.
346
347 2018-06-21 Richard Biener <rguenther@suse.de>
348
349 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
350 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
351 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
352 (vect_analyze_data_ref_dependence): Re-order checks to deal with
353 NULL DR_STEP.
354 (vect_record_base_alignments): Do not record base alignment
355 for gathers or scatters.
356 (vect_compute_data_ref_alignment): Drop return value that is always
357 true. Bail out early for gathers or scatters.
358 (vect_enhance_data_refs_alignment): Bail out early for gathers
359 or scatters.
360 (vect_find_same_alignment_drs): Likewise.
361 (vect_analyze_data_refs_alignment): Remove dead code.
362 (vect_slp_analyze_and_verify_node_alignment): Likewise.
363 (vect_analyze_data_refs): For possible gathers or scatters do
364 not create an alternate DR, just check their possible validity
365 and mark them. Adjust DECL_NONALIASED handling to not rely
366 on DR_BASE_ADDRESS.
367 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
368 update inits of gathers or scatters.
369 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
370 Also copy gather/scatter flag to pattern vinfo.
371
372 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
373
374 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
375 behavior of vec_packsu (vector unsigned long long, vector unsigned
376 long long) to match behavior of vec_packs with same signature.
377
378 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
379 Thomas Schwinge <thomas@codesourcery.com>
380 Cesar Philippidis <cesar@codesourcery.com>
381
382 * gimplify.c (gimplify_scan_omp_clauses): Add support for
383 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
384 (gimplify_adjust_omp_clauses): Likewise.
385 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
386 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
387 (gimplify_omp_target_update): Update handling of acc update and
388 enter/exit data.
389 * omp-low.c (install_var_field): Remove unused parameter
390 base_pointers_restrict.
391 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
392 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
393 FINALIZE}
394 (omp_target_base_pointers_restrict_p): Delete.
395 (scan_omp_target): Update call to scan_sharing_clauses.
396 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
397 FINALIZE}.
398 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
399 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
400 (convert_local_omp_clauses): Likewise.
401 * tree-pretty-print.c (dump_omp_clause): Likewise.
402 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
403 FINALIZE}.
404 (omp_clause_code_name): Likewise.
405
406 2018-06-20 Jakub Jelinek <jakub@redhat.com>
407
408 PR debug/86194
409 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
410 be narrowed.
411
412 PR tree-optimization/86231
413 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
414 anti-range don't overwrite *vr0min before using it to compute *vr0max.
415
416 2018-06-20 Tom de Vries <tdevries@suse.de>
417
418 PR tree-optimization/86097
419 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
420 iv type if signedness of iv type is not the same as that of *nit.
421
422 2018-06-20 Jakub Jelinek <jakub@redhat.com>
423
424 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
425 EDGE_EH edges, verify they are all EDGE_EH.
426
427 2018-06-20 Maya Rashish <coypu@sdf.org>
428
429 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
430
431 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
432
433 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
434 * config/aarch64/aarch64.c (xgene1_tunings): Add
435 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
436 (aarch64_mode_valid_for_sched_fusion_p):
437 Allow 16-byte modes.
438 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
439 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
440 128-bit modes.
441 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
442 New pattern.
443 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
444 * config/aarch64/iterators.md (VQ2): New mode iterator.
445
446 2018-06-20 Martin Liska <mliska@suse.cz>
447
448 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
449 Change default ratio from 10 to 8.
450
451 2018-06-20 Martin Liska <mliska@suse.cz>
452
453 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
454 New.
455 (bit_test_cluster::find_bit_tests): Likewise.
456 (switch_decision_tree::analyze_switch_statement): Find clusters.
457 * tree-switch-conversion.h (struct jump_table_cluster): Document
458 hierarchy.
459
460 2018-06-20 Martin Liska <mliska@suse.cz>
461
462 * tree-switch-conversion.c (switch_conversion::collect):
463 Record m_uniq property.
464 (switch_conversion::expand): Bail out for special conditions.
465 (group_cluster::~group_cluster): New.
466 (group_cluster::group_cluster): Likewise.
467 (group_cluster::dump): Likewise.
468 (jump_table_cluster::emit): New.
469 (switch_decision_tree::fix_phi_operands_for_edges): New.
470 (struct case_node): Remove struct.
471 (jump_table_cluster::can_be_handled): New.
472 (case_values_threshold): Moved to header.
473 (reset_out_edges_aux): Likewise.
474 (jump_table_cluster::is_beneficial): New.
475 (bit_test_cluster::can_be_handled): Likewise.
476 (add_case_node): Remove.
477 (bit_test_cluster::is_beneficial): New.
478 (case_bit_test::cmp): New.
479 (bit_test_cluster::emit): New.
480 (expand_switch_as_decision_tree_p): Remove.
481 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
482 (fix_phi_operands_for_edge): Likewise.
483 (switch_decision_tree::analyze_switch_statement): New.
484 (compute_cases_per_edge): Move ...
485 (switch_decision_tree::compute_cases_per_edge): ... here.
486 (try_switch_expansion): Likewise.
487 (switch_decision_tree::try_switch_expansion): Likewise.
488 (record_phi_operand_mapping): Likewise.
489 (switch_decision_tree::record_phi_operand_mapping): Likewise.
490 (emit_case_decision_tree): Likewise.
491 (switch_decision_tree::emit): Likewise.
492 (balance_case_nodes): Likewise.
493 (switch_decision_tree::balance_case_nodes): Likewise.
494 (dump_case_nodes): Likewise.
495 (switch_decision_tree::dump_case_nodes): Likewise.
496 (emit_jump): Likewise.
497 (switch_decision_tree::emit_jump): Likewise.
498 (emit_cmp_and_jump_insns): Likewise.
499 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
500 (emit_case_nodes): Likewise.
501 (switch_decision_tree::emit_case_nodes): Likewise.
502 (conditional_probability): Remove.
503 * tree-switch-conversion.h (enum cluster_type): New.
504 (PRINT_CASE): New.
505 (struct cluster): Likewise.
506 (cluster::cluster): Likewise.
507 (struct simple_cluster): Likewise.
508 (simple_cluster::simple_cluster): Likewise.
509 (struct group_cluster): Likewise.
510 (struct jump_table_cluster): Likewise.
511 (struct bit_test_cluster): Likewise.
512 (struct min_cluster_item): Likewise.
513 (struct case_tree_node): Likewise.
514 (case_tree_node::case_tree_node): Likewise.
515 (jump_table_cluster::case_values_threshold): Likewise.
516 (struct case_bit_test): Likewise.
517 (struct switch_decision_tree): Likewise.
518 (struct switch_conversion): Likewise.
519 (switch_decision_tree::reset_out_edges_aux): Likewise.
520
521 2018-06-20 Martin Liska <mliska@suse.cz>
522
523 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
524 (hoist_edge_and_branch_if_true): Likewise.
525 (expand_switch_using_bit_tests_p): Likewise.
526 (struct case_bit_test): Likewise.
527 (case_bit_test_cmp): Likewise.
528 (emit_case_bit_tests): Likewise.
529 (switch_conversion::switch_conversion): New class.
530 (struct switch_conv_info): Remove old struct.
531 (collect_switch_conv_info): More to ...
532 (switch_conversion::collect): ... this.
533 (check_range): Likewise.
534 (switch_conversion::check_range): Likewise.
535 (check_all_empty_except_final): Likewise.
536 (switch_conversion::check_all_empty_except_final): Likewise.
537 (check_final_bb): Likewise.
538 (switch_conversion::check_final_bb): Likewise.
539 (create_temp_arrays): Likewise.
540 (switch_conversion::create_temp_arrays): Likewise.
541 (free_temp_arrays): Likewise.
542 (gather_default_values): Likewise.
543 (switch_conversion::gather_default_values): Likewise.
544 (build_constructors): Likewise.
545 (switch_conversion::build_constructors): Likewise.
546 (constructor_contains_same_values_p): Likewise.
547 (switch_conversion::contains_same_values_p): Likewise.
548 (array_value_type): Likewise.
549 (switch_conversion::array_value_type): Likewise.
550 (build_one_array): Likewise.
551 (switch_conversion::build_one_array): Likewise.
552 (build_arrays): Likewise.
553 (switch_conversion::build_arrays): Likewise.
554 (gen_def_assigns): Likewise.
555 (switch_conversion::gen_def_assigns): Likewise.
556 (prune_bbs): Likewise.
557 (switch_conversion::prune_bbs): Likewise.
558 (fix_phi_nodes): Likewise.
559 (switch_conversion::fix_phi_nodes): Likewise.
560 (gen_inbound_check): Likewise.
561 (switch_conversion::gen_inbound_check): Likewise.
562 (process_switch): Use the newly created class.
563 (switch_conversion::expand): New.
564 (switch_conversion::~switch_conversion): New.
565 * tree-switch-conversion.h: New file.
566
567 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
568
569 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
570 tree-vect-patterns.c.
571 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
572 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
573 (vect_recog_sad_pattern): Likewise.
574 (vect_recog_widen_sum_pattern): Likewise.
575 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
576 (vect_recog_widen_shift_pattern): Remove the type_in argument.
577 (vect_recog_rotate_pattern): Likewise.
578 (vect_recog_mult_pattern): Likewise.
579 (vect_recog_vector_vector_shift_pattern): Likewise.
580 (vect_recog_divmod_pattern): Likewise.
581 (vect_recog_mixed_size_cond_pattern): Likewise.
582 (vect_recog_bool_pattern): Likewise.
583 (vect_recog_mask_conversion_pattern): Likewise.
584 (vect_try_gather_scatter_pattern): Likewise.
585 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
586 (vect_recog_over_widening_pattern): Likewise.
587 (vect_recog_gather_scatter_pattern): Likewise.
588 (vect_recog_func_ptr): Move from tree-vectorizer.h
589 (vect_vect_recog_func_ptrs): Move further down the file.
590 (vect_recog_func): Likewise. Remove the third argument.
591 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
592 (vect_pattern_recog_1): Expect the pattern function to do any
593 necessary target tests. Also expect it to provide a vector type.
594 Remove the type_in handling.
595
596 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
597
598 * tree-vect-patterns.c (vect_pattern_detected): New function.
599 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
600 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
601 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
602 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
603 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
604 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
605 (vect_recog_mask_conversion_pattern)
606 (vect_try_gather_scatter_pattern): Likewise.
607
608 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
609
610 * tree-vect-patterns.c (vect_get_internal_def): New function.
611 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
612 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
613 (search_type_for_mask_1): Use it.
614
615 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
616
617 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
618 redundant WIDEN_SUM_EXPR handling.
619 (vect_recog_sad_pattern): Likewise.
620
621 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
622
623 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
624 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
625 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
626 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
627 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
628
629 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
630
631 * tree-vect-stmts.c (vectorizable_call): Make sure that we
632 use the stmt_vec_info of the original bb statement for the
633 new zero assignment, even if the call is part of a pattern.
634
635 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
636
637 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
638 that the sequence is attached to the original statement rather
639 than the pattern statement.
640 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
641 PATTERN_DEF_SEQ from the original statement rather than
642 the main pattern statement.
643 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
644 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
645 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
646
647 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
648
649 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
650 definition statements before the early exit for statements that aren't
651 live or relevant.
652 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
653 split out from...
654 (vect_transform_loop): ...here. Process pattern definition
655 statements without first checking whether the main pattern
656 statement is live or relevant.
657
658 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
659
660 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
661 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
662
663 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
664
665 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
666 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
667 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
668 (expand_block_compare): Change select_block_compare_mode call.
669 (expand_strncmp_align_check): Use new functions, fix comment.
670 (emit_final_str_compare_gpr): New function.
671 (expand_strn_compare): Refactor and clean up code.
672 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
673
674 2018-06-19 Tony Reix <tony.reix@atos.com>
675 Damien Bergamini <damien.bergamini@atos.com>
676 David Edelsohn <dje.gcc@gmail.com>
677
678 * collect2.c (static_obj): New variable.
679 (static_libs): New variable.
680 (is_in_list): Uncomment declaration.
681 (main): Track AIX libraries linked statically.
682 (is_in_list): Uncomment definition.
683 (scan_prog_file): Don't add AIX shared libraries initializer
684 to constructor list if linking statically.
685
686 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
687
688 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
689 constant.
690 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
691
692 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
693
694 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
695 blocks.
696
697 2018-06-19 Martin Liska <mliska@suse.cz>
698
699 * config/i386/i386.c (ix86_can_inline_p): Do not use
700 ipa_fn_summaries::get_create.
701 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
702 get.
703 (devirtualization_time_bonus): Likewise.
704 (ipcp_propagate_stage): Likewise.
705 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
706 (edge_set_predicate): Likewise.
707 (evaluate_conditions_for_known_args): Likewise.
708 (evaluate_properties_for_edge): Likewise.
709 (ipa_call_summary::reset): Tranform to ...
710 (ipa_call_summary::~ipa_call_summary): ... this.
711 (ipa_fn_summary::reset): Transform to ...
712 (ipa_fn_summary::~ipa_fn_summary): ... this.
713 (ipa_fn_summary_t::remove): Rename to ...
714 (ipa_fn_summary_t::remove_callees): ... this.
715 (ipa_fn_summary_t::duplicate): Use placement new
716 instead of memory copy.
717 (ipa_call_summary_t::duplicate): Likewise.
718 (ipa_call_summary_t::remove): Remove.
719 (dump_ipa_call_summary): Change get_create to get.
720 (ipa_dump_fn_summary): Dump only when summary exists.
721 (analyze_function_body): Use symbol_summary::get instead
722 of get_create.
723 (compute_fn_summary): Likewise.
724 (estimate_edge_devirt_benefit): Likewise.
725 (estimate_edge_size_and_time): Likewise.
726 (inline_update_callee_summaries): Likewise.
727 (remap_edge_change_prob): Likewise.
728 (remap_edge_summaries): Likewise.
729 (ipa_merge_fn_summary_after_inlining): Likewise.
730 (write_ipa_call_summary): Likewise.
731 (ipa_fn_summary_write): Likewise.
732 (ipa_free_fn_summary): Likewise.
733 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
734 (struct ipa_call_summary): Likewise.
735 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
736 of get_create.
737 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
738 (estimate_size_after_inlining): Likewise.
739 (estimate_growth): Likewise.
740 (growth_likely_positive): Likewise.
741 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
742 (inline_call): Likewise.
743 * ipa-inline.c (caller_growth_limits): Likewise.
744 (can_inline_edge_p): Likewise.
745 (can_inline_edge_by_limits_p): Likewise.
746 (compute_uninlined_call_time): Likewise.
747 (compute_inlined_call_time): Likewise.
748 (want_inline_small_function_p): Likewise.
749 (edge_badness): Likewise.
750 (update_caller_keys): Likewise.
751 (update_callee_keys): Likewise.
752 (inline_small_functions): Likewise.
753 (inline_to_all_callers_1): Likewise.
754 (dump_overall_stats): Likewise.
755 (early_inline_small_functions): Likewise.
756 (early_inliner): Likewise.
757 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
758 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
759 * ipa-pure-const.c (malloc_candidate_p): Likewise.
760 * ipa-split.c (execute_split_functions): Likewise.
761 * symbol-summary.h: Likewise.
762 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
763
764 2018-06-19 Richard Biener <rguenther@suse.de>
765
766 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
767 (vectorize_loops): ... here. Fix dbgcnt handling.
768 (try_vectorize_loop): Wrap try_vectorize_loop_1.
769
770 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
771
772 PR target/86197
773 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
774 ieee128 argument takes up only one (vector) register, not two (floating
775 point) registers.
776
777 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
778
779 * gimplify.c (gimplify_init_constructor): Really never clear for an
780 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
781
782 2018-06-19 Richard Biener <rguenther@suse.de>
783
784 PR tree-optimization/86179
785 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
786 after failed recognition.
787
788 2018-06-18 Martin Sebor <msebor@redhat.com>
789
790 PR middle-end/85602
791 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
792 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
793 Handle integer subtraction.
794 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
795 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
796
797 2018-06-18 David Malcolm <dmalcolm@redhat.com>
798
799 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
800 param from rtx to rtx_insn *.
801 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
802 param.
803 (frv_ifcvt_modify_insn): Likwise.
804 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
805 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
806 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
807 as_a <rtx_insn *> cast to local "unprotected_region" once
808 it's been established that it's not NULL or pc_rtx.
809 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
810 param "sethi" from rtx to rtx_insn *.
811 (nds32_group_float_insns): Likewise for param "insn".
812 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
813 param.
814 (vax_output_int_subtract): Likewise.
815 * config/vax/vax.c (vax_output_int_add): Likewise for param
816 "insn".
817 (vax_output_int_subtract): Likewise.
818 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
819 (emit_pattern_after): Likewise for param "after".
820 (emit_insn_after): Likewise.
821 (emit_jump_insn_after): Likewise.
822 (emit_call_insn_after): Likewise.
823 (emit_debug_insn_after): Likewise.
824 (emit_pattern_before): Likewise for param "before".
825 (emit_insn_before): Likewise.
826 (emit_jump_insn_before): Likewise.
827 * final.c (get_insn_template): Likewise for param "insn", removing
828 a cast.
829 * output.h (get_insn_template): Likewise for 2nd param.
830 * rtl.h (emit_insn_before): Likewise.
831 (emit_jump_insn_before): Likewise.
832 (emit_debug_insn_before_noloc): Likewise.
833 (emit_insn_after): Likewise.
834 (emit_jump_insn_after): Likewise.
835 (emit_call_insn_after): Likewise.
836 (emit_debug_insn_after): Likewise.
837 (set_insn_deleted): Likewise for param.
838
839 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
840
841 PR target/85358
842 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
843 floating point modes, so that IFmode is numerically greater than
844 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
845 to declare the ordering. This prevents IFmode from being
846 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
847 machine. Include rs6000-modes.h to share the fractional values
848 between genmodes* and the rest of the compiler.
849 (IFmode): Likewise.
850 (KFmode): Likewise.
851 (TFmode): Likewise.
852 * config/rs6000/rs6000-modes.h: New file.
853 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
854 meaning of rs6000_long_double_size so that 126..128 selects an
855 appropriate 128-bit floating point type.
856 (rs6000_option_override_internal): Likewise.
857 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
858 (TARGET_LONG_DOUBLE_128): Change the meaning of
859 rs6000_long_double_size so that 126..128 selects an appropriate
860 128-bit floating point type.
861 (LONG_DOUBLE_TYPE_SIZE): Update comment.
862 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
863 source and destination to match the standard usage.
864 (truncifkf2): Likewise.
865 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
866 ISA 2.07 to use an explicit clobber, instead of passing in a
867 temporary.
868 (copysign<mode>3_soft): Likewise.
869
870 2018-06-18 David Malcolm <dmalcolm@redhat.com>
871
872 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
873 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
874 (vect_slp_analyze_instance_dependence): Likewise.
875 (vect_enhance_data_refs_alignment): Likewise.
876 (vect_analyze_data_refs_alignment): Likewise.
877 (vect_slp_analyze_and_verify_instance_alignment
878 (vect_analyze_data_ref_accesses): Likewise.
879 (vect_prune_runtime_alias_test_list): Likewise.
880 (vect_analyze_data_refs): Likewise.
881 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
882 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
883 (vect_analyze_scalar_cycles_1): Likewise.
884 (vect_get_loop_niters): Likewise.
885 (vect_analyze_loop_form_1): Likewise.
886 (vect_update_vf_for_slp): Likewise.
887 (vect_analyze_loop_operations): Likewise.
888 (vect_analyze_loop): Likewise.
889 (vectorizable_induction): Likewise.
890 (vect_transform_loop): Likewise.
891 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
892 * tree-vect-slp.c (vect_analyze_slp): Likewise.
893 (vect_make_slp_decision): Likewise.
894 (vect_detect_hybrid_slp): Likewise.
895 (vect_slp_analyze_operations): Likewise.
896 (vect_slp_bb): Likewise.
897 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
898 (vectorizable_bswap): Likewise.
899 (vectorizable_call): Likewise.
900 (vectorizable_simd_clone_call): Likewise.
901 (vectorizable_conversion): Likewise.
902 (vectorizable_assignment): Likewise.
903 (vectorizable_shift): Likewise.
904 (vectorizable_operation): Likewise.
905 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
906
907 2018-06-18 Martin Sebor <msebor@redhat.com>
908
909 PR tree-optimization/81384
910 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
911 * builtins.c (expand_builtin_strnlen): New function.
912 (expand_builtin): Call it.
913 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
914 * builtins.def (BUILT_IN_STRNLEN): New.
915 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
916 Warn for bounds in excess of maximum object size.
917 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
918 single-value ranges. Handle strnlen.
919 (handle_builtin_strlen): Handle strnlen.
920 (strlen_check_and_optimize_stmt): Same.
921 * doc/extend.texi (Other Builtins): Document strnlen.
922
923 2018-06-18 Maya Rashish <coypu@sdf.org>
924
925 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
926 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
927 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
928
929 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
930 here to ...
931 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
932
933 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
934
935 * tree.c (escaped_string::escape): Replace cast to char * by
936 const_cast<char *> (unescaped).
937
938 2018-06-18 Nick Clifton <nickc@redhat.com>
939
940 PR 84195
941 * tree.c (escaped_string): New class. Converts an unescaped
942 string into its escaped equivalent.
943 (warn_deprecated_use): Use the new class to convert the
944 deprecation message, if present.
945 (test_escaped_strings): New self test.
946 (test_c_tests): Add test_escaped_strings.
947 * doc/extend.texi (deprecated): Add a note that the
948 deprecation message is affected by the -fmessage-length
949 option, and that control characters will be escaped.
950 (#pragma GCC error): Document this pragma.
951 (#pragma GCC warning): Likewise.
952 * doc/invoke.texi (-fmessage-length): Document this option's
953 effect on the #warning and #error preprocessor directives and
954 the deprecated attribute.
955
956 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
957
958 * tree.c (decl_value_expr_lookup): Revert latest change.
959 (decl_value_expr_insert): Likewise.
960
961 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
962
963 * gimplify.c (nonlocal_vlas): Delete.
964 (nonlocal_vla_vars): Likewise.
965 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
966 referenced VLAs.
967 (gimplify_body): Do not create and destroy nonlocal_vlas.
968 * tree-nested.c: Include diagnostic.h.
969 (use_pointer_in_frame): Tweak.
970 (lookup_field_for_decl): Add assertion and declare the transformation.
971 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
972 internal error when the reference is in a wrong context. Do not
973 create a debug decl by default.
974 (note_nonlocal_block_vlas): Delete.
975 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
976 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
977 create a debug decl by default.
978 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
979 call is in a wrong context.
980 (fixup_vla_decls): New function.
981 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
982 debug variables were created.
983 * tree.c (decl_value_expr_lookup): Add checking assertion.
984 (decl_value_expr_insert): Likewise.
985
986 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
987
988 PR middle-end/82479
989 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
990 * tree-scalar-evolution.c (interpret_expr): Likewise.
991 (expression_expensive_p): Likewise.
992 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
993 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
994 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
995 (ssa_defined_by_minus_one_stmt_p): New.
996
997 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
998
999 PR middle-end/64946
1000 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
1001 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
1002 * dojump.c (do_jump): Likewise.
1003 * expr.c (expand_expr_real_2): Check operand type's sign.
1004 * fold-const.c (const_unop): Handle ABSU_EXPR.
1005 (fold_abs_const): Likewise.
1006 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
1007 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
1008 (strip_sign_op_1): Likesise.
1009 * match.pd: Add new pattern to generate ABSU_EXPR.
1010 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
1011 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1012 * tree-eh.c (operation_could_trap_helper_p): Likewise.
1013 * tree-inline.c (estimate_operator_cost): Likewise.
1014 * tree-pretty-print.c (dump_generic_node): Likewise.
1015 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
1016 * tree.def (ABSU_EXPR): New.
1017
1018 2018-06-16 Jakub Jelinek <jakub@redhat.com>
1019
1020 PR middle-end/86095
1021 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
1022 documented as preserved for backward compatibility only.
1023 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
1024
1025 PR rtl-optimization/86108
1026 * bb-reorder.c (create_forwarder_block): Renamed to ...
1027 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
1028 jump from new landing pad to the second part.
1029 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
1030 Adjust callers.
1031
1032 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1033
1034 PR middle-end/85878
1035 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
1036 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
1037 Only call store_expr for halves if the mode is the same.
1038
1039 PR middle-end/86123
1040 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
1041 Fix up comment formatting.
1042
1043 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1044
1045 * typed-splay-tree.h (typed_splay_tree::remove): New function.
1046 (typed_splay_tree::closure,
1047 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
1048 (typed_splay_tree::typed_splay_tree,
1049 typed_splay_tree::operator =): Declared private.
1050 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
1051 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
1052 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
1053 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
1054 typed_splay_tree::splay_tree_splay,
1055 typed_splay_tree::splay_tree_foreach_helper,
1056 typed_splay_tree::splay_tree_insert,
1057 typed_splay_tree::splay_tree_remove,
1058 typed_splay_tree::splay_tree_lookup,
1059 typed_splay_tree::splay_tree_predecessor,
1060 typed_splay_tree::splay_tree_successor,
1061 typed_splay_tree::splay_tree_min,
1062 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
1063 (typed_splay_tree::root, typed_splay_tree::comp,
1064 typed_splay_tree::delete_key,
1065 typed_splay_tree::delete_value): New data members.
1066 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
1067 typed_splay_tree::remove.
1068
1069 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
1070
1071 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
1072 -mginv and -mno-ginv to the assembler.
1073 * config/mips/mips.opt (-mcrc): New option.
1074 (-mginv): Likewise.
1075 * doc/invoke.text (-mcrc): Document.
1076 (-mginv): Likewise.
1077
1078 2018-06-15 Nick Clifton <nickc@redhat.com>
1079
1080 PR 84195
1081 * tree.c (escaped_string): New class. Converts an unescaped
1082 string into its escaped equivalent.
1083 (warn_deprecated_use): Use the new class to convert the
1084 deprecation message, if present.
1085 (test_escaped_strings): New self test.
1086 (test_c_tests): Add test_escaped_strings.
1087 * doc/extend.texi (deprecated): Add a note that the
1088 deprecation message is affected by the -fmessage-length
1089 option, and that control characters will be escaped.
1090 (#pragma GCC error): Document this pragma.
1091 (#pragma GCC warning): Likewise.
1092 * doc/invoke.texi (-fmessage-length): Document this option's
1093 effect on the #warning and #error preprocessor directives and
1094 the deprecated attribute.
1095
1096 2018-06-15 Richard Biener <rguenther@suse.de>
1097
1098 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
1099 here, also noting vector size used.
1100 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
1101 size used in MSG_OPTIMIZED_LOCATIONS dump.
1102 (pass_slp_vectorize::execute): Adjust.
1103
1104 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
1105
1106 PR target/85968
1107 * config/arc/arc.c (arc_return_address_register): Fix
1108 if-condition.
1109
1110 2018-06-15 Richard Biener <rguenther@suse.de>
1111
1112 PR middle-end/86159
1113 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
1114 leave useless conversion stripping to force_gimple_operand_gsi.
1115 (gimplify_build2): Likewise.
1116 (gimplify_build1): Likewise.
1117
1118 2018-06-15 Richard Biener <rguenther@suse.de>
1119
1120 PR middle-end/86076
1121 * tree-cfg.c (move_stmt_op): unshare invariant addresses
1122 before adjusting their block.
1123
1124 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
1125
1126 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
1127 multilibs for *-*-rtems*.
1128 * config/riscv/t-rtems: New file.
1129
1130 2018-06-14 Jakub Jelinek <jakub@redhat.com>
1131
1132 PR middle-end/86122
1133 * match.pd ((A +- CST1) +- CST2): Punt if last resort
1134 unsigned_type_for returns NULL.
1135
1136 PR target/85945
1137 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
1138 subregs of multi-word pseudos unless the float mode has word size.
1139
1140 2018-06-14 Richard Biener <rguenther@suse.de>
1141
1142 PR middle-end/86139
1143 * tree-vect-generic.c (build_word_mode_vector_type): Remove
1144 duplicate and harmful type_hash_canon.
1145 * tree.c (type_hash_canon): Assert we didn't find ourselves.
1146
1147 2018-06-14 Richard Biener <rguenther@suse.de>
1148
1149 PR ipa/86124
1150 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
1151 NULL cgraph_node.
1152
1153 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1154
1155 * config/rtems.h (STDINT_LONG32): Define.
1156
1157 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
1158 Prachi Godbole <prachi.godbole@imgtec.com>
1159
1160 * config/mips/mips-cpus.def: Define P6600.
1161 * config/mips/mips-tables.opt: Regenerate.
1162 * config/mips/mips.c (mips_ucbranch_type): New enum.
1163 (mips_rtx_cost_data): Add support for P6600.
1164 (mips_issue_rate): Likewise.
1165 (mips_multipass_dfa_lookahead): Likewise.
1166 (mips_avoid_hazard): Likewise.
1167 (mips_reorg_process_insns): Likewise.
1168 (mips_classify_branch_p6600): New function.
1169 * config/mips/mips.h (TUNE_P6600): New define.
1170 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
1171 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
1172 * config/mips/mips.md: Include p6600.md.
1173 (processor): Add p6600.
1174 * config/mips/p6600.md: New file.
1175 * doc/invoke.texi: Add p6600 to supported architectures.
1176
1177 2018-06-13 Martin Sebor <msebor@redhat.com>
1178
1179 PR tree-optimization/86114
1180 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
1181 of integer types.
1182 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
1183
1184 2018-06-13 Richard Biener <rguenther@suse.de>
1185
1186 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
1187 Properly set vector type of the intermediate stmt.
1188 * tree-vect-stmts.c (vectorizable_operation): The destination
1189 var always has vectype_out type.
1190
1191 2018-06-13 Jeff Law <law@redhat.com>
1192
1193 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
1194 integer 0 for argument to print_rtl_with_bb.
1195 (rl78_reorg): Likewise.
1196
1197 2018-06-13 David Malcolm <dmalcolm@redhat.com>
1198
1199 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
1200 from rtx to rtx_insn *.
1201 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
1202 "label".
1203 (add_sched_insns_for_speculation): Likewise for local "target",
1204 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1205 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
1206 from rtx_insn ** to rtx_code_label **.
1207 (reorg_emit_nops): Likewise.
1208 (c6x_reorg): Likewise for local "call_labels".
1209 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
1210 rtx to rtx_insn *.
1211 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
1212 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
1213 the loops over LABEL_REFS.
1214 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
1215 braf_label.
1216 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1217 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
1218 (split_branches): Strengthen local "olabel" from rtx to
1219 rtx_insn *, adding a safe_as_a cast.
1220 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
1221 to "rtx_insn *".
1222 (add_insn_after): Likewise for first two params.
1223 (add_insn_before): Likewise.
1224 (remove_insn): Likewise for param.
1225 (emit_pattern_before_noloc): Likewise for second and third params.
1226 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
1227 (emit_call_insn_before_noloc): Likewise.
1228 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
1229 to "rtx_insn *".
1230 (emit_barrier_before): Likewise.
1231 (emit_label_before): Strengthen "label" param from "rtx" to
1232 "rtx_code_label *". Strengthen "before" param from "rtx" to
1233 "rtx_insn *".
1234 (emit_insn_after_1): Strengthen "after" param from "rtx" to
1235 "rtx_insn *".
1236 (emit_pattern_after_noloc): Likewise.
1237 (emit_insn_after_noloc): Likewise.
1238 (emit_jump_insn_after_noloc): Likewise.
1239 (emit_call_insn_after_noloc): Likewise.
1240 (emit_debug_insn_after_noloc): Likewise.
1241 (emit_barrier_after): Likewise.
1242 (emit_label_after): Likewise for both params.
1243 (emit_pattern_after_setloc): Likewise for "after" param. Convert
1244 "loc" param from "int" to "location_t".
1245 (emit_insn_after_setloc): Likewise.
1246 (emit_jump_insn_after_setloc): Likewise.
1247 (emit_call_insn_after_setloc): Likewise.
1248 (emit_debug_insn_after_setloc): Likewise.
1249 (emit_pattern_before_setloc): Likewise for "before" param. Convert
1250 "loc" param from "int" to "location_t".
1251 (emit_pattern_before): Convert NULL_RTX to NULL.
1252 (emit_insn_before_setloc): Convert "loc" param from "int" to
1253 "location_t".
1254 (emit_jump_insn_before_setloc): Likewise.
1255 (emit_call_insn_before_setloc): Likewise.
1256 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
1257 rtx_insn *. Convert "loc" param from "int" to "location_t".
1258 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
1259 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
1260 Convert 3rd param from "int" to "location_t".
1261 (emit_barrier_before, emit_barrier_after, next_real_insn):
1262 Strengthen param from rtx to rtx_insn *.
1263 (emit_label_before): Strengthen 1st param from "rtx" to
1264 "rtx_code_label *". Strengthen 2nd param from "rtx" to
1265 "rtx_insn *".
1266 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
1267 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
1268 Strengthen 2nd param from "rtx" to "rtx_insn *".
1269 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
1270 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
1271 Likewise. Convert 3rd param from "int" to "location_t".
1272 (emit_label_after): Strengthen 1st param from "rtx" to
1273 "rtx_code_label *".
1274 (next_real_insn, remove_insn): Strengthen param from "rtx" to
1275 "rtx_insn *".
1276 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
1277 from "rtx" to "rtx_insn *".
1278
1279 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
1280
1281 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
1282 bodies streamed in with -Q.
1283 * dumpfile.c (dump_files): Add lto-stream-out dump file.
1284 * dumpfile.h (tree_dump_index): Add lto_stream_out.
1285 * gimple-streamer-out.c: Include gimple-pretty-print.h
1286 (output_bb): Dump stmts streamed.
1287 * lto-section-out.c: Include print-tree.h
1288 (lto_begin_section): Dump sections created.
1289 (lto_output_decl_index): Dump decl encoded.
1290 * lto-streamer-out.c: Include print-tree.h
1291 (create_output_block): Dump output block created.
1292 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
1293 (output_function): Dump function output.
1294 (output_constructor): Dump constructor streamed.
1295 (write_global_stream): Output indexes encoded.
1296 (produce_asm_for_decls): Dump streams encoded.
1297 * lto-streamer.c (streamer_dump_file): New global var.
1298 * lto-streamer.h (streamer_dump_file): Declare.
1299 * passes.c (ipa_write_summaries): Initialize streamer dump.
1300 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
1301 in.
1302
1303 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
1304
1305 PR target/86048
1306 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
1307 offsets for register save directives. Emit a second batch of save
1308 directives, if need be, when the function accesses prior frames.
1309
1310 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1311
1312 * config/arc/fpu.md (fmasf4): Force operand to register.
1313 (fnmasf4): Likewise.
1314
1315 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1316
1317 * config/arc/arc-protos.h (arc_pad_return): Remove.
1318 * config/arc/arc.c (machine_function): Remove force_short_suffix
1319 and size_reason.
1320 (arc_print_operand): Adjust printing of '&'.
1321 (arc_verify_short): Remove conditional printing of short suffix.
1322 (arc_final_prescan_insn): Remove reference to size_reason.
1323 (pad_return): New function.
1324 (arc_reorg): Call pad_return.
1325 (arc_pad_return): Remove.
1326 (arc_init_machine_status): Remove reference to force_short_suffix.
1327 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
1328 (attr length): When attribute iscompact is true force to 2
1329 regardless; in the case of maybe check if we want to force the
1330 instruction to have 4 bytes length.
1331 (nopv): Change it to generate 4 byte long nop as well.
1332 (blockage): New pattern.
1333 (simple_return): Remove call to arc_pad_return.
1334 (p_return_i): Likewise.
1335
1336 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1337
1338 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1339
1340 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1341
1342 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
1343 ARC cores.
1344
1345 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1346
1347 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
1348 for ARC700 and ARCv2.
1349
1350 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
1351
1352 PR target/86076
1353 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
1354 operands[2] instead of operands[1].
1355
1356
1357 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
1358
1359 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
1360 case, check whether the outer register overlaps an unallocatable
1361 register, not just whether it fits the required class.
1362
1363 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
1364
1365 * poly-int.h (can_div_trunc_p): Add new overload in which all values
1366 are poly_ints.
1367 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
1368 (memrefs_conflict_p): Likewise.
1369 (init_alias_analysis): Likewise.
1370 * cfgexpand.c (expand_debug_expr): Likewise.
1371 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
1372 * cse.c (fold_rtx): Likewise.
1373 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
1374 * expr.c (emit_block_move_hints): Likewise.
1375 (clear_storage_hints, push_block, emit_push_insn): Likewise.
1376 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
1377 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
1378 (emit_group_store): Likewise.
1379 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
1380 to read the PRE/POST_MODIFY increment.
1381 * calls.c (store_one_arg): Use strip_offset.
1382 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
1383 poly_int_rtx_p.
1384 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
1385 by a VEC_SELECT.
1386 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
1387 (simplify_binary_operation_1): Extend CONST_INT handling to
1388 poly_int_rtx_p.
1389 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
1390 than a HOST_WIDE_INT.
1391 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
1392 poly_int64.
1393 (adjust_mems, add_stores): Update accodingly.
1394 (vt_canonicalize_addr): Track polynomial offsets.
1395 (emit_note_insn_var_location): Likewise.
1396 (vt_add_function_parameter): Likewise.
1397 (vt_initialize): Likewise.
1398
1399 2018-06-12 Jeff Law <law@redhat.com>
1400
1401 * config.gcc (alpha*-*-freebsd*): Remove.
1402 * config/alpha/freebsd.h: Remove.
1403
1404 2018-06-12 David Malcolm <dmalcolm@redhat.com>
1405
1406 PR other/69968
1407 * spellcheck-tree.c (levenshtein_distance): Rename to...
1408 (get_edit_distance): ...this, and update for underlying renaming.
1409 * spellcheck-tree.h (levenshtein_distance): Rename to...
1410 (get_edit_distance): ...this.
1411 * spellcheck.c (levenshtein_distance): Rename to...
1412 (get_edit_distance): ...this. Convert from Levenshtein distance
1413 to Damerau-Levenshtein distance by supporting transpositions of
1414 adjacent characters. Rename "v1" to "v_next" and "v0" to
1415 "v_one_ago".
1416 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
1417 (selftest::test_edit_distance_unit_test_oneway): ...this, and
1418 update for underlying renaming.
1419 (selftest::levenshtein_distance_unit_test): Rename to...
1420 (selftest::test_get_edit_distance_unit): ...this, and update for
1421 underlying renaming.
1422 (selftest::test_find_closest_string): Add example from PR 69968
1423 where transposition helps
1424 (selftest::test_metric_conditions): Update for renaming.
1425 (selftest::test_metric_conditions): Likewise.
1426 (selftest::spellcheck_c_tests): Likewise.
1427 * spellcheck.h (levenshtein_distance): Rename both overloads to...
1428 (get_edit_distance): ...this.
1429 (best_match::consider): Update for renaming.
1430
1431 2018-06-12 Martin Sebor <msebor@redhat.com>
1432
1433 PR tree-optimization/85259
1434 * builtins.c (compute_objsize): Handle constant offsets.
1435 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
1436 true iff a warning has been issued.
1437 * gimple.h (gimple_nonartificial_location): New function.
1438 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
1439 gimple_nonartificial_location and handle -Wno-system-headers.
1440 (handle_builtin_stxncpy): Same.
1441
1442 2018-06-12 Martin Sebor <msebor@redhat.com>
1443
1444 PR c/85931
1445 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
1446
1447 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
1448
1449 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
1450 BUILTIN_VEC_XST entries for pointer to double and long long.
1451
1452 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
1453
1454 PR target/85990
1455 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1456 Update comments.
1457 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1458 Likewise.
1459
1460 2018-06-12 Martin Liska <mliska@suse.cz>
1461
1462 * doc/options.texi: Document IntegerRange.
1463
1464 2018-06-12 Martin Liska <mliska@suse.cz>
1465
1466 * config/i386/i386.opt: Make MPX-related options as Deprecated.
1467 * opt-functions.awk: Handle Deprecated flag.
1468 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
1469 and report error.
1470 (read_cmdline_option): Report warning for a deprecated option.
1471 * opts.h (struct cl_option): Add new field cl_deprecated.
1472 (CL_ERR_DEPRECATED): New.
1473
1474 2018-06-12 Martin Liska <mliska@suse.cz>
1475
1476 * doc/options.texi: Document Deprecated option flag.
1477
1478 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1479
1480 * config/arc/arc-arch.h (arc_extras): New enum.
1481 (arc_cpu_t):Add field extra.
1482 (arc_cpu_types): Consider the extras.
1483 * config/arc/arc-cpus.def: Add extras info.
1484 * config/arc/arc-opts.h (processor_type): Consider extra field.
1485 * config/arc/arc.c (arc_override_options): Handle extra field.
1486
1487 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1488
1489 * config/arc/arc-arch.h: Update ARC_OPTX macro.
1490 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
1491 field.
1492 * config/arc/arc.c (arc_init): Update pic warning.
1493 (irq_range): Update irq range parsing warnings.
1494 (arc_override_options): Update various warning messages.
1495 (arc_handle_aux_attribute): Likewise.
1496
1497 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
1498
1499 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
1500
1501 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1502
1503 * doc/sourcebuild.texi: Document usage of line number 0 in verify
1504 compiler messages directives.
1505
1506 2018-06-12 Matthew Fortune <mfortune@gmail.com>
1507
1508 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
1509 * config/mips/mips-tables.opt: Regenerate.
1510 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
1511 mips64r6.
1512 * doc/invoke.texi: Document -march=i6500.
1513
1514 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
1515
1516 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
1517 (i6400_gpmul): Add cpu_unit.
1518 (i6400_gpdiv): Likewise.
1519 (i6400_msa_add_d): Update reservations.
1520 (i6400_msa_int_add) Likewise.
1521 (i6400_msa_short_logic3) Likewise.
1522 (i6400_msa_short_logic2) Likewise.
1523 (i6400_msa_short_logic) Likewise.
1524 (i6400_msa_move) Likewise.
1525 (i6400_msa_cmp) Likewise.
1526 (i6400_msa_short_float2) Likewise.
1527 (i6400_msa_div_d) Likewise.
1528 (i6400_msa_long_logic1) Likewise.
1529 (i6400_msa_long_logic2) Likewise.
1530 (i6400_msa_mult) Likewise.
1531 (i6400_msa_long_float2) Likewise.
1532 (i6400_msa_long_float4) Likewise.
1533 (i6400_msa_long_float5) Likewise.
1534 (i6400_msa_long_float8) Likewise.
1535 (i6400_fpu_fadd): Include frint type.
1536 (i6400_fpu_store): New define_insn_reservation.
1537 (i6400_fpu_load): Likewise.
1538 (i6400_fpu_move): Likewise.
1539 (i6400_fpu_fcmp): Likewise.
1540 (i6400_fpu_fmadd): Likewise.
1541 (i6400_int_mult): Include imul3nc type and update reservation.
1542 (i6400_int_div): Include idiv3 type and update reservation.
1543 (i6400_int_load): Update to check type not move_type.
1544 (i6400_int_store): Likewise.
1545 (i6400_int_prefetch): Set zero latency.
1546
1547 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
1548
1549 * gcc.c: Document new %@{...} sequence.
1550 (LINK_COMMAND_SPEC): Use it for the -L switches.
1551 (cpp_unique_options): Use it for the -I switches.
1552 (at_file_argbuf): New global variable.
1553 (in_at_file): Likewise.
1554 (alloc_args): Create at_file_argbuf.
1555 (clear_args): Truncate at_file_argbuf.
1556 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
1557 (open_at_file): New function.
1558 (close_at_file): Likewise.
1559 (create_at_file): Delete.
1560 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
1561 <'o'>: Likewise.
1562 <'@'>: New case.
1563 (validate_switches_from_spec): Deal with %@{...} sequence.
1564 (validate_switches): Likewise.
1565 (driver::finalize): Call clear_args.
1566
1567 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
1568
1569 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
1570
1571 2018-06-11 Martin Sebor <msebor@redhat.com>
1572
1573 * doc/invoke.texi (-Wall): List -Wc++17-compat.
1574 (Wno-class-memaccess): Add @opindex.
1575 (Wno-templates, Wno-multiple-inheritance): Same.
1576 (Wno-virtual-inheritance, Wno-namespaces): Same.
1577 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
1578 (Wno-format-overflow, Wno-format-truncation): Same.
1579 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
1580 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
1581 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
1582 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
1583 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
1584 (Wno-misspelled-isr): Same.
1585
1586 2018-06-11 Martin Sebor <msebor@redhat.com>
1587
1588 * PR tree-optimization/86083
1589 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
1590
1591 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
1592
1593 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
1594
1595 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
1596
1597 PR target/85755
1598 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
1599 on the correct operand.
1600 (*movdi_internal64): Ditto.
1601
1602 2018-06-11 Martin Liska <mliska@suse.cz>
1603
1604 PR tree-optimization/86089
1605 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
1606
1607 2018-06-11 Julia Koval <julia.koval@intel.com>
1608
1609 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
1610 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
1611 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
1612
1613 2018-06-11 Olivier Hainque <hainque@adacore.com>
1614
1615 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
1616 for Ada with strict dwarf2.
1617
1618 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
1619
1620 PR target/85755
1621 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
1622 addresses.
1623
1624 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
1625
1626 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
1627
1628 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
1629
1630 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
1631 TARGET_ELF.
1632
1633 2018-06-08 Martin Liska <mliska@suse.cz>
1634
1635 * tree-cfg.h (debug_function): Fix argument type to match
1636 implementation.
1637
1638 2018-06-08 Martin Liska <mliska@suse.cz>
1639
1640 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
1641 Remove usage of MPX-related (and removed) fields.
1642 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
1643
1644 2018-06-08 David Malcolm <dmalcolm@redhat.com>
1645
1646 * cfg.c (debug): Use TDF_NONE rather than 0.
1647 * cfghooks.c (debug): Likewise.
1648 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
1649 (struct dump_option_value_info): Convert to...
1650 (struct kv_pair): ...this template type.
1651 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
1652 rather than 0.
1653 (optinfo_verbosity_options): Likewise.
1654 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
1655 OPTGROUP_NONE.
1656 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
1657 than int for "optgroup_flags" param.
1658 (dump_generic_expr_loc): Use dump_flags_t rather than int for
1659 "dump_kind" param.
1660 (dump_dec): Likewise.
1661 (dump_finish): Use TDF_NONE rather than 0.
1662 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
1663 rather than int for "optgroup_flags" param. Use TDF_NONE rather
1664 than 0. Update for change to option_ptr.
1665 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
1666 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
1667 0. Update for changes to optinfo_verbosity_options and
1668 optgroup_options.
1669 (opt_info_switch_p): Convert optgroup_flags from int to
1670 optgroup_flags_t.
1671 (dump_basic_block): Use dump_flags_t rather than int
1672 for "dump_kind" param.
1673 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
1674 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
1675 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
1676 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
1677 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
1678 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
1679 TDF_NONE): Convert from macros to...
1680 (enum dump_flag): ...this new enum.
1681 (dump_flags_t): Update to use enum.
1682 (operator|, operator&, operator~, operator|=, operator&=):
1683 Implement for dump_flags_t.
1684 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
1685 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
1686 Convert from macros to...
1687 (enum optgroup_flag): ...this new enum.
1688 (optgroup_flags_t): New typedef.
1689 (operator|, operator|=): Implement for optgroup_flags_t.
1690 (struct dump_file_info): Convert field "alt_flags" to
1691 dump_flags_t. Convert field "optgroup_flags" to
1692 optgroup_flags_t.
1693 (dump_basic_block): Use dump_flags_t rather than int for param.
1694 (dump_generic_expr_loc): Likewise.
1695 (dump_dec): Likewise.
1696 (dump_register): Convert param "optgroup_flags" to
1697 optgroup_flags_t.
1698 (opt_info_enable_passes): Likewise.
1699 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
1700 than 0.
1701 * gimple-pretty-print.c (debug): Likewise.
1702 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
1703 (merged_store_group::apply_stores): Likewise.
1704 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
1705 * gimple.c (verify_gimple_pp): Likewise.
1706 * graphite-poly.c (print_pbb_body): Likewise.
1707 * passes.c (pass_manager::register_one_dump_file): Convert
1708 local "optgroup_flags" to optgroup_flags_t.
1709 * print-tree.c (print_node): Use TDF_NONE rather than 0.
1710 (debug): Likewise.
1711 (debug_body): Likewise.
1712 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
1713 to optgroup_flags_t.
1714 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
1715 than 0.
1716 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
1717 (convert_mult_to_fma): Likewise.
1718 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
1719 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
1720 * tree-vect-data-refs.c (dump_lower_bound): Convert param
1721 "dump_kind" to dump_flags_t.
1722
1723 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
1724
1725 * config/rs6000/rs6000.c (min, max): Delete.
1726
1727 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
1728
1729 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
1730 -mabi=spe and -mabi=no-spe.
1731
1732 2018-06-08 Martin Liska <mliska@suse.cz>
1733
1734 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
1735 where we expect an existing summary.
1736
1737 2018-06-08 Martin Liska <mliska@suse.cz>
1738
1739 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
1740 * ipa-inline.h (estimate_edge_growth): Likewise.
1741
1742 2018-06-08 Martin Liska <mliska@suse.cz>
1743
1744 * cgraph.c (function_version_hasher::hash): Use
1745 cgraph_node::get_uid ().
1746 (function_version_hasher::equal):
1747 * cgraph.h (cgraph_node::get_uid): New method.
1748 * ipa-inline.c (update_caller_keys): Use
1749 cgraph_node::get_uid ().
1750 (update_callee_keys): Likewise.
1751 * ipa-utils.c (searchc): Likewise.
1752 (ipa_reduced_postorder): Likewise.
1753 * lto-cgraph.c (input_node): Likewise.
1754 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
1755 * symbol-summary.h (symtab_insertion): Likewise.
1756 (symtab_removal): Likewise.
1757 (symtab_duplication): Likewise.
1758 * tree-pretty-print.c (dump_function_header): Likewise.
1759 * tree-sra.c (convert_callers_for_node): Likewise.
1760
1761 2018-06-08 Martin Liska <mliska@suse.cz>
1762
1763 * cgraph.c (symbol_table::create_edge): Always assign a new
1764 unique number.
1765 (symbol_table::free_edge): Do not recycle numbers.
1766 * cgraph.h (cgraph_edge::get): New method.
1767 * symbol-summary.h (symtab_removal): Use it.
1768 (symtab_duplication): Likewise.
1769 (call_summary::hashable_uid): Remove.
1770
1771 2018-06-08 Martin Liska <mliska@suse.cz>
1772
1773 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
1774 (initialize_growth_caches): Remove.
1775 (free_growth_caches): Likewise.
1776 (do_estimate_edge_time): Use edge_growth_cache.
1777 (do_estimate_edge_size): Likewise.
1778 (do_estimate_edge_hints): Likewise.
1779 * ipa-inline.c (reset_edge_caches): Likewise.
1780 (recursive_inlining): Likewise.
1781 (inline_small_functions): Likewise.
1782 * ipa-inline.h (initialize_growth_caches): Remove.
1783 (estimate_edge_size): Likewise.
1784 (estimate_edge_time): Likewise.
1785 (estimate_edge_hints): Likewise.
1786 (reset_edge_growth_cache): Likewise.
1787 * symbol-summary.h (call_summary::remove): New method.
1788
1789 2018-06-08 Martin Liska <mliska@suse.cz>
1790
1791 * ipa-cp.c (class edge_clone_summary): New summary.
1792 (grow_edge_clone_vectors): Remove.
1793 (ipcp_edge_duplication_hook): Remove.
1794 (class edge_clone_summary_t): New call_summary class.
1795 (ipcp_edge_removal_hook): Remove.
1796 (edge_clone_summary_t::duplicate): New function.
1797 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
1798 (create_specialized_node): Likewise.
1799 (ipcp_driver): Initialize edge_clone_summaries and do not
1800 register hooks.
1801
1802 2018-06-08 Martin Liska <mliska@suse.cz>
1803
1804 * symbol-summary.h (get): New function.
1805 (call_summary::m_initialize_when_cloning): New class member.
1806
1807 2018-06-08 Martin Liska <mliska@suse.cz>
1808
1809 * cgraph.c (cgraph_node::remove): Do not recycle uid.
1810 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
1811 (symbol_table::allocate_cgraph_symbol): Do not set uid.
1812 * passes.c (uid_hash_t): Record removed_nodes by their uids.
1813 (remove_cgraph_node_from_order): Use the removed_nodes set.
1814 (do_per_function_toporder): Likwise.
1815 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
1816 instead of summary_uid.
1817 (symtab_removal): Likewise.
1818 (symtab_duplication): Likewise.
1819
1820 2018-06-08 Martin Liska <mliska@suse.cz>
1821
1822 * ipa-cp.c (ipcp_store_bits_results): Use
1823 ipcp_transformation_sum.
1824 (ipcp_store_vr_results): Likewise.
1825 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
1826 to ...
1827 (ipcp_transformation_initialize): ... this.
1828 (ipa_set_node_agg_value_chain):
1829 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
1830 (write_ipcp_transformation_info): Likewise.
1831 (read_ipcp_transformation_info): Likewise.
1832 (ipcp_update_bits): Likewise.
1833 (ipcp_update_vr): Likewise.
1834 (ipcp_transform_function): Likewise.
1835 * ipa-prop.h: Rename ipcp_transformation_summary to
1836 ipcp_transformation.
1837 (class ipcp_transformation_t): New function summary.
1838 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
1839 (ipa_get_agg_replacements_for_node): Likewise.
1840
1841 2018-06-08 Martin Liska <mliska@suse.cz>
1842
1843 * ipa-pure-const.c (struct funct_state_d): Do it class instead
1844 of struct.
1845 (class funct_state_summary_t): New function_summary class.
1846 (has_function_state): Remove.
1847 (get_function_state): Likewise.
1848 (set_function_state): Likewise.
1849 (add_new_function): Likewise.
1850 (funct_state_summary_t::insert): New function.
1851 (duplicate_node_data): Remove.
1852 (remove_node_data): Remove.
1853 (funct_state_summary_t::duplicate): New function.
1854 (register_hooks): Create new funct_state_summaries.
1855 (pure_const_generate_summary): Use it.
1856 (pure_const_write_summary): Likewise.
1857 (pure_const_read_summary): Likewise.
1858 (propagate_pure_const): Likewise.
1859 (propagate_nothrow): Likewise.
1860 (dump_malloc_lattice): Likewise.
1861 (propagate_malloc): Likewise.
1862 (execute): Do not register hooks, just remove summary
1863 instead.
1864 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
1865 constructor.
1866
1867 2018-06-08 Martin Liska <mliska@suse.cz>
1868
1869 * ipa-reference.c (remove_node_data): Remove.
1870 (duplicate_node_data): Likewise.
1871 (class ipa_ref_var_info_summary_t): New class.
1872 (class ipa_ref_opt_summary_t): Likewise.
1873 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
1874 (get_reference_optimization_summary): Use
1875 ipa_ref_opt_sum_summaries.
1876 (set_reference_vars_info): Remove.
1877 (set_reference_optimization_summary): Likewise.
1878 (ipa_init): Create summaries.
1879 (init_function_info): Use function summary.
1880 (ipa_ref_opt_summary_t::duplicate): New function.
1881 (ipa_ref_opt_summary_t::remove): New function.
1882 (get_read_write_all_from_node): Fix GNU coding style.
1883 (propagate): Use function summary.
1884 (write_node_summary_p): Fix GNU coding style.
1885 (stream_out_bitmap): Likewise.
1886 (ipa_reference_read_optimization_summary): Use function summary.
1887 (ipa_reference_c_finalize): Do not release hooks.
1888
1889 2018-06-08 Martin Liska <mliska@suse.cz>
1890
1891 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
1892 (analyze_function_body): Extract multiple calls of get_create.
1893 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1894 * ipa-inline.c (recursive_inlining): Use ::get method.
1895 * ipa-inline.h (estimate_edge_growth): Likewise.
1896
1897 2018-06-08 Martin Liska <mliska@suse.cz>
1898
1899 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
1900 HSA_INVALID.
1901 (hsa_function_summary::hsa_function_summary): Use the new enum
1902 value.
1903 (hsa_gpu_implementation_p): Use hsa_summaries::get.
1904 * hsa-gen.c (hsa_get_host_function): Likewise.
1905 (get_brig_function_name): Likewise.
1906 * ipa-hsa.c (process_hsa_functions): Likewise.
1907 (ipa_hsa_write_summary): Likewise.
1908 * symbol-summary.h (symtab_duplication): Use ::get function/
1909 (get): New function.
1910
1911 2018-06-08 Martin Liska <mliska@suse.cz>
1912
1913 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
1914 of get.
1915 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
1916 (hsa_register_kernel): Likewise.
1917 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
1918 * hsa-gen.c (hsa_get_host_function): Likewise.
1919 (get_brig_function_name): Likewise.
1920 (generate_hsa): Likewise.
1921 (pass_gen_hsail::execute): Likewise.
1922 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
1923 (devirtualization_time_bonus): Likewise.
1924 (ipcp_propagate_stage): Likewise.
1925 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1926 (edge_set_predicate): Likewise.
1927 (evaluate_conditions_for_known_args): Likewise.
1928 (evaluate_properties_for_edge): Likewise.
1929 (ipa_fn_summary::reset): Likewise.
1930 (ipa_fn_summary_t::duplicate): Likewise.
1931 (dump_ipa_call_summary): Likewise.
1932 (ipa_dump_fn_summary): Likewise.
1933 (analyze_function_body): Likewise.
1934 (compute_fn_summary): Likewise.
1935 (estimate_edge_devirt_benefit): Likewise.
1936 (estimate_edge_size_and_time): Likewise.
1937 (estimate_calls_size_and_time): Likewise.
1938 (estimate_node_size_and_time): Likewise.
1939 (inline_update_callee_summaries): Likewise.
1940 (remap_edge_change_prob): Likewise.
1941 (remap_edge_summaries): Likewise.
1942 (ipa_merge_fn_summary_after_inlining): Likewise.
1943 (ipa_update_overall_fn_summary): Likewise.
1944 (read_ipa_call_summary): Likewise.
1945 (inline_read_section): Likewise.
1946 (write_ipa_call_summary): Likewise.
1947 (ipa_fn_summary_write): Likewise.
1948 (ipa_free_fn_summary): Likewise.
1949 * ipa-hsa.c (process_hsa_functions): Likewise.
1950 (ipa_hsa_write_summary): Likewise.
1951 (ipa_hsa_read_section): Likewise.
1952 * ipa-icf.c (sem_function::merge): Likewise.
1953 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1954 (do_estimate_edge_time): Likewise.
1955 (estimate_size_after_inlining): Likewise.
1956 (estimate_growth): Likewise.
1957 (growth_likely_positive): Likewise.
1958 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1959 (inline_call): Likewise.
1960 * ipa-inline.c (caller_growth_limits): Likewise.
1961 (can_inline_edge_p): Likewise.
1962 (can_inline_edge_by_limits_p): Likewise.
1963 (compute_uninlined_call_time): Likewise.
1964 (compute_inlined_call_time): Likewise.
1965 (want_inline_small_function_p): Likewise.
1966 (edge_badness): Likewise.
1967 (update_caller_keys): Likewise.
1968 (update_callee_keys): Likewise.
1969 (recursive_inlining): Likewise.
1970 (inline_small_functions): Likewise.
1971 (inline_to_all_callers_1): Likewise.
1972 (dump_overall_stats): Likewise.
1973 (early_inline_small_functions): Likewise.
1974 (early_inliner): Likewise.
1975 * ipa-inline.h (estimate_edge_growth): Likewise.
1976 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1977 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1978 * ipa-prop.h (IPA_NODE_REF): Likewise.
1979 (IPA_EDGE_REF): Likewise.
1980 * ipa-pure-const.c (malloc_candidate_p): Likewise.
1981 (propagate_malloc): Likewise.
1982 * ipa-split.c (execute_split_functions): Likewise.
1983 * symbol-summary.h: Rename get to get_create.
1984 (get): Likewise.
1985 (get_create): Likewise.
1986 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1987
1988 2018-06-08 Martin Liska <mliska@suse.cz>
1989
1990 * symbol-summary.h (release): Move definition out of class
1991 declaration.
1992 (symtab_removal): Likewise.
1993 (symtab_duplication): Likewise.
1994
1995 2018-06-08 Martin Liska <mliska@suse.cz>
1996
1997 * symbol-summary.h (function_summary): Move constructor
1998 implementation out of class declaration.
1999 (release): Likewise.
2000 (symtab_insertion): Likewise.
2001 (symtab_removal): Likewise.
2002 (symtab_duplication): Likewise.
2003 (get): Likewise.
2004
2005 2018-06-08 Martin Liska <mliska@suse.cz>
2006
2007 * Makefile.in: Remove support for MPX (macros, related functions,
2008 fields in cgraph_node, ...).
2009 * builtin-types.def (BT_BND): Likewise.
2010 (BT_FN_BND_CONST_PTR): Likewise.
2011 (BT_FN_CONST_PTR_BND): Likewise.
2012 (BT_FN_VOID_PTR_BND): Likewise.
2013 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
2014 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
2015 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
2016 (expand_builtin_mempcpy_with_bounds): Likewise.
2017 (expand_builtin_memset_with_bounds): Likewise.
2018 (expand_builtin_memset_args): Likewise.
2019 (std_expand_builtin_va_start): Likewise.
2020 (expand_builtin): Likewise.
2021 (expand_builtin_with_bounds): Likewise.
2022 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
2023 (DEF_LIB_BUILTIN_CHKP): Likewise.
2024 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
2025 (DEF_CHKP_BUILTIN): Likewise.
2026 (BUILT_IN_MEMCPY): Likewise.
2027 (BUILT_IN_MEMMOVE): Likewise.
2028 (BUILT_IN_MEMPCPY): Likewise.
2029 (BUILT_IN_MEMSET): Likewise.
2030 (BUILT_IN_STPCPY): Likewise.
2031 (BUILT_IN_STRCAT): Likewise.
2032 (BUILT_IN_STRCHR): Likewise.
2033 (BUILT_IN_STRCPY): Likewise.
2034 (BUILT_IN_STRLEN): Likewise.
2035 (BUILT_IN_MEMCPY_CHK): Likewise.
2036 (BUILT_IN_MEMMOVE_CHK): Likewise.
2037 (BUILT_IN_MEMPCPY_CHK): Likewise.
2038 (BUILT_IN_MEMSET_CHK): Likewise.
2039 (BUILT_IN_STPCPY_CHK): Likewise.
2040 (BUILT_IN_STRCAT_CHK): Likewise.
2041 (BUILT_IN_STRCPY_CHK): Likewise.
2042 * calls.c (store_bounds): Likewise.
2043 (emit_call_1): Likewise.
2044 (special_function_p): Likewise.
2045 (maybe_warn_nonstring_arg): Likewise.
2046 (initialize_argument_information): Likewise.
2047 (finalize_must_preallocate): Likewise.
2048 (compute_argument_addresses): Likewise.
2049 (expand_call): Likewise.
2050 * cfgexpand.c (expand_call_stmt): Likewise.
2051 (expand_return): Likewise.
2052 (expand_gimple_stmt_1): Likewise.
2053 (pass_expand::execute): Likewise.
2054 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
2055 (cgraph_node::remove): Likewise.
2056 (cgraph_node::dump): Likewise.
2057 (cgraph_node::verify_node): Likewise.
2058 * cgraph.h (chkp_function_instrumented_p): Likewise.
2059 (symtab_node::get_alias_target): Likewise.
2060 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
2061 (cgraph_local_p): Likewise.
2062 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
2063 (cgraph_edge::rebuild_references): Likewise.
2064 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
2065 (walk_polymorphic_call_targets): Likewise.
2066 (cgraph_node::expand_thunk): Likewise.
2067 (symbol_table::output_weakrefs): Likewise.
2068 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
2069 (ix86_handle_option): Likewise.
2070 * config/i386/constraints.md: Likewise.
2071 * config/i386/i386-builtin-types.def (BND): Likewise.
2072 (VOID): Likewise.
2073 (PVOID): Likewise.
2074 (ULONG): Likewise.
2075 * config/i386/i386-builtin.def (BDESC_END): Likewise.
2076 (BDESC_FIRST): Likewise.
2077 (BDESC): Likewise.
2078 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
2079 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
2080 * config/i386/i386.c (enum reg_class): Likewise.
2081 (ix86_target_string): Likewise.
2082 (ix86_option_override_internal): Likewise.
2083 (ix86_conditional_register_usage): Likewise.
2084 (ix86_valid_target_attribute_inner_p): Likewise.
2085 (ix86_set_indirect_branch_type): Likewise.
2086 (ix86_set_current_function): Likewise.
2087 (ix86_function_arg_regno_p): Likewise.
2088 (init_cumulative_args): Likewise.
2089 (ix86_function_arg_advance): Likewise.
2090 (ix86_function_arg): Likewise.
2091 (ix86_pass_by_reference): Likewise.
2092 (ix86_function_value_regno_p): Likewise.
2093 (ix86_function_value_1): Likewise.
2094 (ix86_function_value_bounds): Likewise.
2095 (ix86_return_in_memory): Likewise.
2096 (ix86_setup_incoming_vararg_bounds): Likewise.
2097 (ix86_va_start): Likewise.
2098 (indirect_thunk_need_prefix): Likewise.
2099 (print_reg): Likewise.
2100 (ix86_print_operand): Likewise.
2101 (ix86_expand_call): Likewise.
2102 (ix86_output_function_return): Likewise.
2103 (reg_encoded_number): Likewise.
2104 (BDESC_VERIFYS): Likewise.
2105 (ix86_init_mpx_builtins): Likewise.
2106 (ix86_init_builtins): Likewise.
2107 (ix86_emit_cmove): Likewise.
2108 (ix86_emit_move_max): Likewise.
2109 (ix86_expand_builtin): Likewise.
2110 (ix86_builtin_mpx_function): Likewise.
2111 (ix86_get_arg_address_for_bt): Likewise.
2112 (ix86_load_bounds): Likewise.
2113 (ix86_store_bounds): Likewise.
2114 (ix86_load_returned_bounds): Likewise.
2115 (ix86_store_returned_bounds): Likewise.
2116 (ix86_class_likely_spilled_p): Likewise.
2117 (ix86_hard_regno_mode_ok): Likewise.
2118 (x86_order_regs_for_local_alloc): Likewise.
2119 (ix86_mitigate_rop): Likewise.
2120 (ix86_bnd_prefixed_insn_p): Likewise.
2121 (ix86_mpx_bound_mode): Likewise.
2122 (ix86_make_bounds_constant): Likewise.
2123 (ix86_initialize_bounds): Likewise.
2124 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
2125 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
2126 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
2127 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
2128 (TARGET_CHKP_BOUND_MODE): Likewise.
2129 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
2130 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
2131 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
2132 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
2133 * config/i386/i386.h (TARGET_MPX): Likewise.
2134 (TARGET_MPX_P): Likewise.
2135 (VALID_BND_REG_MODE): Likewise.
2136 (FIRST_BND_REG): Likewise.
2137 (LAST_BND_REG): Likewise.
2138 (enum reg_class): Likewise.
2139 (BND_REG_P): Likewise.
2140 (BND_REGNO_P): Likewise.
2141 (BNDmode): Likewise.
2142 (ADJUST_INSN_LENGTH): Likewise.
2143 * config/i386/i386.md: Likewise.
2144 * config/i386/i386.opt: Likewise.
2145 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
2146 (defined): Likewise.
2147 (LINK_MPX): Likewise.
2148 (MPX_SPEC): Likewise.
2149 (LIBMPX_SPEC): Likewise.
2150 (LIBMPXWRAPPERS_SPEC): Likewise.
2151 (CHKP_SPEC): Likewise.
2152 * config/i386/predicates.md: Likewise.
2153 * dbxout.c (dbxout_type): Likewise.
2154 * doc/extend.texi: Likewise.
2155 * doc/invoke.texi: Likewise.
2156 * doc/md.texi: Likewise.
2157 * doc/tm.texi: Likewise.
2158 * doc/tm.texi.in: Likewise.
2159 * dwarf2out.c (is_base_type): Likewise.
2160 (gen_formal_types_die): Likewise.
2161 (gen_subprogram_die): Likewise.
2162 (gen_type_die_with_usage): Likewise.
2163 (gen_decl_die): Likewise.
2164 (dwarf2out_late_global_decl): Likewise.
2165 * expr.c (expand_assignment): Likewise.
2166 (emit_storent_insn): Likewise.
2167 (store_expr_with_bounds): Likewise.
2168 (store_expr): Likewise.
2169 (expand_expr_real_1): Likewise.
2170 * expr.h (store_expr_with_bounds): Likewise.
2171 * function.c (use_register_for_decl): Likewise.
2172 (struct bounds_parm_data): Likewise.
2173 (assign_parms_augmented_arg_list): Likewise.
2174 (assign_parm_find_entry_rtl): Likewise.
2175 (assign_parm_is_stack_parm): Likewise.
2176 (assign_parm_load_bounds): Likewise.
2177 (assign_bounds): Likewise.
2178 (assign_parms): Likewise.
2179 (expand_function_start): Likewise.
2180 * gcc.c (CHKP_SPEC): Likewise.
2181 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
2182 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
2183 (wrestrict_dom_walker::check_call): Likewise.
2184 * gimple.c (gimple_build_call_from_tree): Likewise.
2185 * gimple.h (enum gf_mask): Likewise.
2186 (gimple_call_with_bounds_p): Likewise.
2187 (gimple_call_set_with_bounds): Likewise.
2188 * gimplify.c (gimplify_init_constructor): Likewise.
2189 * ipa-cp.c (initialize_node_lattices): Likewise.
2190 (propagate_constants_across_call): Likewise.
2191 (find_more_scalar_values_for_callers_subset): Likewise.
2192 * ipa-hsa.c (process_hsa_functions): Likewise.
2193 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
2194 * ipa-icf.c (sem_function::merge): Likewise.
2195 * ipa-inline.c (early_inliner): Likewise.
2196 * ipa-pure-const.c (warn_function_noreturn): Likewise.
2197 (warn_function_cold): Likewise.
2198 (propagate_pure_const): Likewise.
2199 * ipa-ref.h (enum GTY): Likewise.
2200 * ipa-split.c (find_retbnd): Likewise.
2201 (consider_split): Likewise.
2202 (split_function): Likewise.
2203 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2204 * ipa.c (walk_polymorphic_call_targets): Likewise.
2205 (symbol_table::remove_unreachable_nodes): Likewise.
2206 (process_references): Likewise.
2207 (cgraph_build_static_cdtor_1): Likewise.
2208 * lto-cgraph.c (lto_output_node): Likewise.
2209 (output_refs): Likewise.
2210 (compute_ltrans_boundary): Likewise.
2211 (input_overwrite_node): Likewise.
2212 (input_node): Likewise.
2213 (input_cgraph_1): Likewise.
2214 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
2215 * passes.c (pass_manager::execute_early_local_passes): Likewise.
2216 (class pass_chkp_instrumentation_passes): Likewise.
2217 (make_pass_chkp_instrumentation_passes): Likewise.
2218 * passes.def: Likewise.
2219 * rtl.h (struct GTY): Likewise.
2220 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
2221 * stor-layout.c (layout_type): Likewise.
2222 * symtab.c: Likewise.
2223 * target.def: Likewise.
2224 * targhooks.c (default_chkp_bound_type): Likewise.
2225 (default_chkp_bound_mode): Likewise.
2226 (default_builtin_chkp_function): Likewise.
2227 (default_chkp_function_value_bounds): Likewise.
2228 (default_chkp_make_bounds_constant): Likewise.
2229 (default_chkp_initialize_bounds): Likewise.
2230 * targhooks.h (default_chkp_bound_type): Likewise.
2231 (default_chkp_bound_mode): Likewise.
2232 (default_builtin_chkp_function): Likewise.
2233 (default_chkp_function_value_bounds): Likewise.
2234 (default_chkp_make_bounds_constant): Likewise.
2235 (default_chkp_initialize_bounds): Likewise.
2236 * toplev.c (compile_file): Likewise.
2237 (process_options): Likewise.
2238 * tree-core.h (DEF_BUILTIN): Likewise.
2239 (DEF_BUILTIN_CHKP): Likewise.
2240 * tree-inline.c (declare_return_variable): Likewise.
2241 (remap_gimple_stmt): Likewise.
2242 (copy_bb): Likewise.
2243 (initialize_inlined_parameters): Likewise.
2244 (expand_call_inline): Likewise.
2245 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
2246 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
2247 (make_pass_ipa_chkp_produce_thunks): Likewise.
2248 (make_pass_chkp): Likewise.
2249 (make_pass_chkp_opt): Likewise.
2250 (make_pass_chkp_instrumentation_passes): Likewise.
2251 * tree-pretty-print.c (dump_generic_node): Likewise.
2252 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
2253 * tree-ssa-dce.c (propagate_necessity): Likewise.
2254 (eliminate_unnecessary_stmts): Likewise.
2255 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
2256 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2257 * tree-ssa-sccvn.h: Likewise.
2258 * tree-ssa-strlen.c (get_string_length): Likewise.
2259 (valid_builtin_call): Likewise.
2260 (adjust_last_stmt): Likewise.
2261 (handle_builtin_strchr): Likewise.
2262 (handle_builtin_strcpy): Likewise.
2263 (handle_builtin_stxncpy): Likewise.
2264 (handle_builtin_memcpy): Likewise.
2265 (handle_builtin_strcat): Likewise.
2266 (strlen_check_and_optimize_stmt): Likewise.
2267 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
2268 * tree-streamer-in.c: Likewise.
2269 * tree-streamer.c (record_common_node): Likewise.
2270 * tree.c (tree_code_size): Likewise.
2271 (wide_int_to_tree_1): Likewise.
2272 (type_contains_placeholder_1): Likewise.
2273 (build_common_tree_nodes): Likewise.
2274 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
2275 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
2276 (POINTER_BOUNDS_P): Likewise.
2277 (BOUNDED_TYPE_P): Likewise.
2278 (BOUNDED_P): Likewise.
2279 (CALL_WITH_BOUNDS_P): Likewise.
2280 (pointer_bounds_type_node): Likewise.
2281 * value-prof.c (gimple_ic): Likewise.
2282 * var-tracking.c (vt_add_function_parameters): Likewise.
2283 * varasm.c (make_decl_rtl): Likewise.
2284 (assemble_start_function): Likewise.
2285 (output_constant): Likewise.
2286 (maybe_assemble_visibility): Likewise.
2287 * varpool.c (ctor_for_folding): Likewise.
2288 * chkp-builtins.def: Remove.
2289 * ipa-chkp.c: Remove.
2290 * ipa-chkp.h: Remove.
2291 * rtl-chkp.c: Remove.
2292 * rtl-chkp.h: Remove.
2293 * tree-chkp-opt.c: Remove.
2294 * tree-chkp.c: Remove.
2295 * tree-chkp.h: Remove.
2296
2297 2018-06-07 Carl Love <cel@us.ibm.com>
2298
2299 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
2300 vextract_fp_from_shortl): Add BE support.
2301
2302 2018-06-07 Paul Koning <ni1d@arrl.net>
2303
2304 * compare-elim.c (try_merge_compare): Don't merge compare if
2305 address contains a side effect.
2306 (try_eliminate_compare): Likewise.
2307
2308 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
2309
2310 * config.gcc: Support "tremont".
2311 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
2312 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2313 PROCESSOR_TREMONT.
2314 * config/i386/i386.c (m_TREMONT): Define.
2315 (processor_target_table): Add "tremont".
2316 (PTA_TREMONT): Define.
2317 (ix86_lea_outperforms): Add TARGET_TREMONT.
2318 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
2319 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
2320 and M_INTEL_GOLDMONT_PLUS.
2321 (fold_builtin_cpu): Add "tremont".
2322 (ix86_add_stmt_cost): Add TARGET_TREMONT.
2323 (ix86_option_override_internal): Add "tremont".
2324 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
2325 (processor_type): Add PROCESSOR_TREMONT.
2326 * config/i386/x86-tune.def: Add m_TREMONT.
2327 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2328
2329 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2330
2331 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
2332 symbol defined for msp430i* devices to be lower case.
2333
2334 gcc/testsuite/gcc.target/msp430/
2335 * msp430i-device-symbol.c: New test.
2336 * msp430f-device-symbol.c: New test.
2337 * msp430.h: New test header file.
2338
2339 2018-06-07 Richard Biener <rguenther@suse.de>
2340
2341 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
2342 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
2343 Properly wrap signed arithmetic if overflow wraps.
2344
2345 2018-06-07 Jakub Jelinek <jakub@redhat.com>
2346
2347 PR tree-optimization/69615
2348 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
2349 of a cast from a same precision integral SSA_NAME in a bb dominated
2350 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
2351 cast to utype if rhs2 has already a compatible type.
2352
2353 2018-06-07 Richard Biener <rguenther@suse.de>
2354
2355 PR tree-optimization/85935
2356 * graphite-scop-detection.c (find_params_in_bb): Analyze
2357 condition operands with respect to the correct loop. Assert
2358 the analysis doesn't fail.
2359
2360 2018-06-04 Carl Love <cel@us.ibm.com>
2361
2362 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
2363 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
2364 as it is slightly cheaper.
2365 (first_match_or_eos_index_<mode>):
2366 Calculate index using natural element order.
2367 (first_match_index_<mode>):
2368 Calculate index using natural element order.
2369 (first_match_or_eos_index_<mode>):
2370 Calculate index using natural order.
2371 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
2372 for BE and LE modes.
2373 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
2374 P9V_BUILTIN_VCLZLSBB_V16QI.
2375 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
2376 specific.
2377
2378 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
2379
2380 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
2381 indentation and line wrap for many prototypes. Add missing
2382 @smallexample directives around block of prototypes for vec_xl and
2383 vec_xst.
2384
2385 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
2386
2387 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
2388 track if we pass or return IEEE 128-bit floating point.
2389 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
2390 C++ mangling that is compatible with GCC 8.1.
2391 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
2392 (init_cumulative_args): Note if we pass or return IEEE 128-bit
2393 floating point types.
2394 (rs6000_function_arg_advance_1): Likewise.
2395 (rs6000_mangle_type): Optionally generate mangled names that match
2396 what GCC 8.1 generated for IEEE 128-bit floating point types.
2397 (rs6000_globalize_decl_name): If we have an external function that
2398 passes or returns IEEE 128-bit types, generate a weak reference
2399 from the mangled name used in GCC 8.1 to the current mangled
2400 name.
2401 (rs6000_init_builtins): Make __ibm128 use the long double type if
2402 long double is IBM extended double. Make __float128 use the long
2403 double type if long double is IEEE 128-bit.
2404
2405 PR target/85657
2406 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
2407 macro for __ibm128 built-in functions.
2408 (PACK_IF): Add __ibm128 pack/unpack functions.
2409 (UNPACK_IF): Likewise.
2410 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
2411 enable long double built-in functions if long double is IEEE
2412 128-bit floating point.
2413 (rs6000_invalid_builtin): Update long double built-in function
2414 error message.
2415 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
2416 functions, adjust the built-in function to use the long double
2417 built-in function if __ibm128 and long double are the same type.
2418 * doc/extend.texi (PowerPC builtins): Update documention for
2419 __builtin_{,un}pack_longdouble. Add documentation for
2420 __builtin_{,un}pack_ibm128.
2421
2422 2018-06-06 Jim Wilson <jimw@sifive.com>
2423
2424 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
2425 (struct machine_function): New field interrupt_mode.
2426 (riscv_handle_type_attribute): New function. Add forward declaration.
2427 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
2428 (riscv_expand_epilogue): Check interrupt_mode field.
2429 (riscv_set_current_function): Check interrupt attribute args and
2430 set interrupt_mode field.
2431 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
2432 (riscv_sret, riscv_uret): New.
2433 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
2434 new arguments to interrupt attribute.
2435
2436 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
2437
2438 PR target/63177
2439 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
2440 Don't handle -mcpu=power8 if -mpower9-vector is also used.
2441
2442 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
2443
2444 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
2445 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
2446 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2447 several redundant entries.
2448
2449 2018-06-06 David Malcolm <dmalcolm@redhat.com>
2450
2451 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
2452 type from "rtx" to "rtx_insn *".
2453 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
2454 for local "call_insn", removing cast.
2455 (ix86_expand_call): Likewise, introducing a "call_insn" local.
2456
2457 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
2458
2459 PR tree-optimization/86066
2460 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
2461 for BIT_INSERT_EXPR stores.
2462
2463 2018-06-06 Richard Biener <rguenther@suse.de>
2464
2465 PR tree-optimization/86062
2466 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2467 component refs ontop
2468 of to be offsetted base.
2469
2470 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2471
2472 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
2473 to be static and remove check on interrupt attribute name.
2474
2475 gcc/testsuite/gcc.target/msp430/
2476 * function-attributes-4.c: New test.
2477 * static-interrupts.c: New test.
2478
2479 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
2480
2481 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2482 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
2483
2484 2018-06-05 Steve Ellcey <sellcey@cavium.com>
2485
2486 PR target/79924
2487 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
2488 second argument.
2489 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
2490 Remove second argument, change how error is called.
2491 (aarch64_layout_arg): Remove second argument from
2492 aarch64_err_no_fpadvsimd call.
2493 (aarch64_init_cumulative_args): Ditto.
2494 (aarch64_gimplify_va_arg_expr): Ditto.
2495 * config/aarch64/aarch64.md (mov<mode>): Ditto.
2496
2497 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
2498
2499 * config/i386/i386.md (simple_return_indirect_internal): New expander.
2500 (*simple_return_indirect_internal<mode>): Rename from
2501 simple_return_indirect_internal. Use W mode iterator.
2502 (rstorssp): New expander.
2503 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
2504 (clrssbsy): New expander.
2505 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
2506
2507 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
2508
2509 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
2510 __typeof__.
2511 (cmse_check_pointed_object): Likewise.
2512
2513 2018-06-05 Martin Liska <mliska@suse.cz>
2514
2515 PR gcov-profile/47618
2516 * doc/invoke.texi: Document how -fprofile-dir format
2517 is extended.
2518
2519 2018-06-05 Richard Biener <rguenther@suse.de>
2520
2521 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
2522 removal pretend DOM info isn't available so we do not update
2523 it and only remove edges, not dominated blocks. Actually free
2524 DOM info in case we removed something. Remove unreachable blocks.
2525 (mfb_keep_latches): Work with either DOM info or marked backedges.
2526 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
2527 first. Mark backedges if DOM info isn't available.
2528 (Re-)compute DOM info after cleanup_control_flow_pre.
2529
2530 2018-06-05 Richard Biener <rguenther@suse.de>
2531
2532 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
2533 (locus_discrim_hasher::hash): Adjust.
2534 (locus_discrim_hasher::equal): Likewise.
2535 (next_discriminator_for_locus): Work on line directly.
2536 (same_line_p): Pass in expanded locus1 as well.
2537 (assign_discriminators): Avoid redundant location expansions.
2538
2539 2018-06-05 Richard Biener <rguenther@suse.de>
2540
2541 PR tree-optimization/86046
2542 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
2543 if required after clearing TREE_ADDRESSABLE.
2544
2545 2018-06-05 Richard Biener <rguenther@suse.de>
2546
2547 PR tree-optimization/86047
2548 * tree-ssa-loop.c (for_each_index): Glob handling of all
2549 decls and constants and really handle all of them.
2550
2551 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2552
2553 PR target/81497
2554 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
2555 qualifier_void_pointer and qualifier_const_void_pointer.
2556 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
2557 (arm_init_builtins): Handle the above.
2558 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
2559 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
2560 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
2561 void intrinsics.
2562
2563 2018-06-05 Martin Liska <mliska@suse.cz>
2564
2565 * auto-profile.c (read_autofdo_file): Do not use
2566 gcov_ctr_summary struct.
2567 (afdo_callsite_hot_enough_for_early_inline): Likewise.
2568 * coverage.c (struct counts_entry): Likewise.
2569 (read_counts_file): Read just single summary entry.
2570 (get_coverage_counts): Use gcov_summary struct.
2571 * coverage.h (get_coverage_counts): Likewise.
2572 * gcov-dump.c (dump_working_sets): Likewise.
2573 (tag_summary): Dump just single summary.
2574 * gcov-io.c (gcov_write_summary): Write just histogram
2575 summary.
2576 (gcov_read_summary): Read just single summary.
2577 (compute_working_sets): Use gcov_summary struct.
2578 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
2579 of GCOV_COUNTERS_SUMMABLE.
2580 (GCOV_COUNTERS_SUMMABLE): Remove.
2581 (GCOV_FIRST_VALUE_COUNTER): Replace with
2582 GCOV_COUNTER_V_INTERVAL.
2583 (struct gcov_ctr_summary): Remove.
2584 (struct gcov_summary): Directly use fields of former
2585 gcov_ctr_summary.
2586 (compute_working_sets): Use gcov_summary struct.
2587 * gcov.c (read_count_file): Do not use ctrs fields.
2588 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
2589 struct.
2590 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
2591 struct.
2592 * profile.c: Likewise.
2593 * profile.h: Likewise.
2594
2595 2018-06-05 Martin Liska <mliska@suse.cz>
2596
2597 PR gcov-profile/84846
2598 * gcov.c (output_lines): Print working directory only
2599 in intermediate format.
2600
2601 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
2602
2603 * config/s390/s390-builtin-types.def: Add void function type.
2604 * config/s390/s390-builtins.def: Use the function type for the
2605 tbeginc builtin.
2606
2607 2018-06-04 Jim Wilson <jimw@sifive.com>
2608
2609 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
2610 to int.
2611 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
2612 and maybe_eh_return. Change regno to unsigned int. Use new args to
2613 handle EH_RETURN_DATA_REGNO registers properly.
2614 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
2615 (riscv_expand_epilogue): Update comment. Change argument name and
2616 type. Update code to use new name and type. Pass new args to
2617 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
2618 EXCEPTION_RETURN.
2619 * config/riscv/riscv.md (NORMAL_RETURN): New.
2620 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
2621 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
2622 (eh_return): Call gen_eh_return_internal and emit barrier.
2623 (eh_return_internal): Call riscv_expand_epilogue.
2624
2625 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
2626
2627 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
2628 bit_insertion field and declare can_be_merged_into method.
2629 (merged_store_group::can_be_merged_into): New method.
2630 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
2631 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
2632 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
2633
2634 2018-06-04 Richard Biener <rguenther@suse.de>
2635
2636 PR tree-optimization/85955
2637 * builtins.c (fold_builtin_sincos): Convert pointers to
2638 destination to appropriate type before dereferencing.
2639
2640 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
2641
2642 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
2643
2644 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
2645
2646 * expr.c (expand_expr_real_1): Force the operand into memory if
2647 its TYPE_MODE is BLKmode and if there is no integer mode for
2648 the number of bits being extracted.
2649
2650 2018-06-04 Jakub Jelinek <jakub@redhat.com>
2651
2652 PR target/85832
2653 PR target/86036
2654 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
2655 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
2656
2657 2018-06-04 Richard Biener <rguenther@suse.de>
2658
2659 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
2660 (cleanup_tree_cfg_noloop): ... single caller. Do
2661 start_recording_case_labels later.
2662
2663 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
2664
2665 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
2666 to _IMMINTRIN_H_INCLUDED.
2667 * config/i386/pconfigintrin.h: Ditto.
2668 * config/i386/waitpkgintrin.h: Ditto.
2669 * config/i386/immintrin.h: Add includes for sgxintrin.h,
2670 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
2671 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
2672 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
2673 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
2674 waitpkgintrin.h and cldemoteintrin.h.
2675
2676 2018-06-04 Richard Biener <rguenther@suse.de>
2677
2678 PR tree-optimization/86038
2679 * tracer.c (find_best_successor): Check probability for
2680 being initialized, bail out if not.
2681
2682 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
2683
2684 PR target/86003
2685 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
2686 of bits to ignore when comparing architectures.
2687
2688 2018-06-04 Jakub Jelinek <jakub@redhat.com>
2689
2690 PR tree-optimization/69615
2691 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
2692 maximum or minimum of the type, try to merge it also as if
2693 range1 is + [-, x - 1] or + [x + 1, -].
2694
2695 PR c++/86025
2696 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
2697
2698 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
2699
2700 PR tree-optimization/86034
2701 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
2702 the unsigned bitfield type in a bit insertion sequence if it does not
2703 have a larger precision than the bitfield size.
2704 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
2705
2706 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
2707
2708 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
2709
2710 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
2711
2712 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
2713 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
2714 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
2715 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
2716
2717 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
2718
2719 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
2720 Disable -fdelete-null-pointer-checks for ELF toolchain.
2721
2722 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
2723 Kito Cheng <kito.cheng@gmail.com>
2724
2725 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
2726 (nds32le-*-*, nds32be-*-*): Integrate checking process.
2727 (nds32*-*-*): Add glibc and uclibc conditions.
2728 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
2729 (TARGET_EXCEPT_UNWIND_INFO): Define.
2730 * config/nds32/elf.h: New file.
2731 * config/nds32/linux.h: New file.
2732 * config/nds32/nds32-elf.opt: New file.
2733 * config/nds32/nds32-linux.opt: New file.
2734 * config/nds32/nds32-fp-as-gp.c
2735 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
2736 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
2737 TARGET_LINUX_ABI.
2738 (nds32_asm_file_end): Ditto.
2739 (nds32_print_operand): Ditto.
2740 (nds32_insert_attributes): Ditto.
2741 (nds32_init_libfuncs): New function.
2742 (TARGET_HAVE_TLS): Define.
2743 (TARGET_INIT_LIBFUNCS): Define.
2744 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
2745 spec content.
2746 (TARGET_ELF): Apply different mcmodel setting.
2747 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
2748 been migrated into elf.h and linux.h files.
2749 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
2750 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
2751 (mcmodel): The content has been migrated into nds32-elf.opt and
2752 nds32-linux.opt files.
2753 * config/nds32/t-elf: New file.
2754 * config/nds32/t-linux: New file.
2755
2756 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
2757 Shiva Chen <shiva0217@gmail.com>
2758
2759 * config/nds32/constants.md (unspec_volatile_element): Add
2760 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
2761 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
2762 optimization.
2763 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
2764 (make_pass_nds32_fp_as_gp): Declare.
2765 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
2766 optmization pass.
2767 (nds32_asm_function_end_prologue): Remove unused asm output.
2768 (nds32_asm_function_begin_epilogue): Remove unused asm output.
2769 (nds32_asm_file_start): Output necessary fp_as_gp information.
2770 (nds32_option_override): Adjust register usage.
2771 (nds32_expand_prologue): Consider fp_as_gp situation.
2772 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
2773 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
2774 (epilogue): Ditto.
2775 (return): Ditto.
2776 (simple_return): Ditto.
2777 (omit_fp_begin): Output special directive for fp_as_gp.
2778 (omit_fp_end): Output special directive for fp_as_gp.
2779 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
2780 mforbid-fp-as-gp): New options.
2781
2782 2018-06-01 Mark Wielaard <mark@klomp.org>
2783
2784 * dwarf2out.c (dwarf2out_finish): Remove generation of
2785 DW_AT_loclists_base.
2786
2787 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2788
2789 * gimple-ssa-store-merging.c: Include gimple-fold.h.
2790 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
2791 (struct merged_store_group): Add bit_insertion field.
2792 (dump_char_array): Use standard hexadecimal format.
2793 (merged_store_group::merged_store_group): Set bit_insertion to false.
2794 (merged_store_group::apply_stores): Use optimal buffer size. Deal
2795 with BIT_INSERT_EXPR stores. Move up code updating the mask and
2796 also print the mask in the dump file.
2797 (pass_store_merging::gate): Minor tweak.
2798 (imm_store_chain_info::coalesce_immediate): Fix wrong association
2799 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
2800 stores with INTEGER_CST stores.
2801 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
2802 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
2803 and use it throughout. Generate bit insertion sequences if need be.
2804 (pass_store_merging::process_store): Remove redundant condition.
2805 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
2806
2807 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
2808
2809 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
2810 the 128-bit floating point types. Fix function comment.
2811
2812 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2813
2814 * config/aarch64/aarch64-simd.md
2815 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
2816 mnemonics.
2817 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
2818 mnemonics.
2819
2820 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
2821
2822 PR tree-optimization/85989
2823 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
2824 variable.
2825 (backprop::intersect_uses): Check it when deciding whether this
2826 is a backedge reference.
2827 (backprop::process_block): Add each phi to m_visited_phis
2828 after visiting it, then clear it at the end.
2829
2830 2018-06-01 Richard Biener <rguenther@suse.de>
2831
2832 * tree-vectorizer.h (vect_dr_stmt): New function.
2833 (vect_get_load_cost): Adjust.
2834 (vect_get_store_cost): Likewise.
2835 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
2836 Use vect_dr_stmt instead of DR_SMTT.
2837 (vect_record_base_alignments): Likewise.
2838 (vect_calculate_target_alignment): Likewise.
2839 (vect_compute_data_ref_alignment): Likewise and make static.
2840 (vect_update_misalignment_for_peel): Likewise.
2841 (vect_verify_datarefs_alignment): Likewise.
2842 (vector_alignment_reachable_p): Likewise.
2843 (vect_get_data_access_cost): Likewise. Pass down
2844 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
2845 (vect_get_peeling_costs_all_drs): Likewise.
2846 (vect_peeling_hash_get_lowest_cost): Likewise.
2847 (vect_enhance_data_refs_alignment): Likewise.
2848 (vect_find_same_alignment_drs): Likewise.
2849 (vect_analyze_data_refs_alignment): Likewise.
2850 (vect_analyze_group_access_1): Likewise.
2851 (vect_analyze_group_access): Likewise.
2852 (vect_analyze_data_ref_access): Likewise.
2853 (vect_analyze_data_ref_accesses): Likewise.
2854 (vect_vfa_segment_size): Likewise.
2855 (vect_small_gap_p): Likewise.
2856 (vectorizable_with_step_bound_p): Likewise.
2857 (vect_prune_runtime_alias_test_list): Likewise.
2858 (vect_analyze_data_refs): Likewise.
2859 (vect_supportable_dr_alignment): Likewise.
2860 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2861 (vect_gen_prolog_loop_niters): Likewise.
2862 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2863 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
2864 modify DR_STMT.
2865 (vect_recog_mask_conversion_pattern): Likewise.
2866 (vect_try_gather_scatter_pattern): Likewise.
2867 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
2868 to vect_get_store_cost.
2869 (vect_get_store_cost): Get stmt_info instead of DR.
2870 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
2871 (vect_get_load_cost): Get stmt_info instead of DR.
2872
2873 2018-06-01 Richard Biener <rguenther@suse.de>
2874
2875 PR middle-end/86017
2876 * gimple-fold.c (var_decl_component_p): Also allow offsetted
2877 vars wrapped in MEM_REFs.
2878
2879 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
2880
2881 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
2882 Fix subreg tests so that we only return a choice between
2883 GENERAL_REGS and FP_REGS if the original classes included both.
2884
2885 2018-06-01 Richard Biener <rguenther@suse.de>
2886
2887 PR ipa/85960
2888 * tree-ssa-structalias.c (get_function_part_constraint):
2889 Handle NULL fi->decl.
2890 (find_func_aliases_for_call): Properly handle indirect
2891 fi from direct call.
2892 (find_func_clobbers): Likewise.
2893 (ipa_pta_execute): Likewise.
2894 (create_variable_info_for): For functions that are ifunc_resolver
2895 resolve to a varinfo that contains the result of the resolver call.
2896 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
2897 aliases.
2898
2899 2018-05-31 Michael Collison <michael.collison@arm.com>
2900
2901 * config/aarch64/aarch64.md:
2902 (*fix_to_zero_extenddfdi2): New pattern.
2903 * gcc.target/aarch64/fix_extend1.c: New testcase.
2904
2905 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
2906
2907 PR middle-end/78809
2908 PR middle-end/83026
2909 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
2910 and BUILT_IN_STRNCMP_EQ.
2911 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
2912 BUILT_IN_STRNCMP_EQ.
2913 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
2914 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2915 (gimple_fold_builtin): Likewise.
2916 * tree-ssa-strlen.c (compute_string_length): New function.
2917 (determine_min_obsize): New function.
2918 (handle_builtin_string_cmp): New function to handle calls to
2919 string compare functions.
2920 (strlen_optimize_stmt): Add handling to builtin string compare
2921 calls.
2922 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
2923 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2924 * tree.c (build_common_builtin_nodes): Add new defines of
2925 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
2926
2927 2018-05-31 Jakub Jelinek <jakub@redhat.com>
2928
2929 PR target/85984
2930 * bb-reorder.c (pass_partition_blocks::gate): Return false for
2931 functions with naked attribute.
2932
2933 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2934
2935 * config/i386/sse.md (avx_vec_concat<mode>):
2936 Substitute concat_tg_mode mode attribute with xtg_mode.
2937 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
2938 (concat_tg_mode): Remove mode attribute.
2939
2940 2018-05-31 Martin Sebor <msebor@redhat.com>
2941
2942 PR c/82063
2943 * calls.c (alloc_max_size): Correct a logic error/typo.
2944 Treat excessive arguments as infinite. Warn for invalid arguments.
2945 * doc/invoke.texi (-Walloc-size-larger-than): Update.
2946
2947 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
2948
2949 PR target/85829
2950 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
2951 and movx for Haswell.
2952
2953 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
2954 Cesar Philippidis <cesar@codesourcery.com>
2955
2956 PR middle-end/85879
2957 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
2958 when emitting error on private/firstprivate reductions.
2959 * omp-low.c (lower_omp_target): Avoid reference-type processing
2960 on pointers for firstprivate clause.
2961
2962 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2963
2964 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
2965 (st1x2): Likewise.
2966 (st1x3): Likewise.
2967 * config/aarch64/aarch64-simd.md
2968 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
2969 (aarch64_ld1_x3_<mode>): Likewise
2970 (aarch64_st1x2<VALLDIF:mode>): Likewise
2971 (aarch64_st1_x2_<mode>): Likewise
2972 (aarch64_st1x3<VALLDIF:mode>): Likewise
2973 (aarch64_st1_x3_<mode>): Likewise
2974 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
2975 (vld1_s8_x3): Likewise.
2976 (vld1_u16_x3): Likewise.
2977 (vld1_s16_x3): Likewise.
2978 (vld1_u32_x3): Likewise.
2979 (vld1_s32_x3): Likewise.
2980 (vld1_u64_x3): Likewise.
2981 (vld1_s64_x3): Likewise.
2982 (vld1_f16_x3): Likewise.
2983 (vld1_f32_x3): Likewise.
2984 (vld1_f64_x3): Likewise.
2985 (vld1_p8_x3): Likewise.
2986 (vld1_p16_x3): Likewise.
2987 (vld1_p64_x3): Likewise.
2988 (vld1q_u8_x3): Likewise.
2989 (vld1q_s8_x3): Likewise.
2990 (vld1q_u16_x3): Likewise.
2991 (vld1q_s16_x3): Likewise.
2992 (vld1q_u32_x3): Likewise.
2993 (vld1q_s32_x3): Likewise.
2994 (vld1q_u64_x3): Likewise.
2995 (vld1q_s64_x3): Likewise.
2996 (vld1q_f16_x3): Likewise.
2997 (vld1q_f32_x3): Likewise.
2998 (vld1q_f64_x3): Likewise.
2999 (vld1q_p8_x3): Likewise.
3000 (vld1q_p16_x3): Likewise.
3001 (vld1q_p64_x3): Likewise.
3002 (vst1_s64_x2): Likewise.
3003 (vst1_u64_x2): Likewise.
3004 (vst1_f64_x2): Likewise.
3005 (vst1_s8_x2): Likewise.
3006 (vst1_p8_x2): Likewise.
3007 (vst1_s16_x2): Likewise.
3008 (vst1_p16_x2): Likewise.
3009 (vst1_s32_x2): Likewise.
3010 (vst1_u8_x2): Likewise.
3011 (vst1_u16_x2): Likewise.
3012 (vst1_u32_x2): Likewise.
3013 (vst1_f16_x2): Likewise.
3014 (vst1_f32_x2): Likewise.
3015 (vst1_p64_x2): Likewise.
3016 (vst1q_s8_x2): Likewise.
3017 (vst1q_p8_x2): Likewise.
3018 (vst1q_s16_x2): Likewise.
3019 (vst1q_p16_x2): Likewise.
3020 (vst1q_s32_x2): Likewise.
3021 (vst1q_s64_x2): Likewise.
3022 (vst1q_u8_x2): Likewise.
3023 (vst1q_u16_x2): Likewise.
3024 (vst1q_u32_x2): Likewise.
3025 (vst1q_u64_x2): Likewise.
3026 (vst1q_f16_x2): Likewise.
3027 (vst1q_f32_x2): Likewise.
3028 (vst1q_f64_x2): Likewise.
3029 (vst1q_p64_x2): Likewise.
3030 (vst1_s64_x3): Likewise.
3031 (vst1_u64_x3): Likewise.
3032 (vst1_f64_x3): Likewise.
3033 (vst1_s8_x3): Likewise.
3034 (vst1_p8_x3): Likewise.
3035 (vst1_s16_x3): Likewise.
3036 (vst1_p16_x3): Likewise.
3037 (vst1_s32_x3): Likewise.
3038 (vst1_u8_x3): Likewise.
3039 (vst1_u16_x3): Likewise.
3040 (vst1_u32_x3): Likewise.
3041 (vst1_f16_x3): Likewise.
3042 (vst1_f32_x3): Likewise.
3043 (vst1_p64_x3): Likewise.
3044 (vst1q_s8_x3): Likewise.
3045 (vst1q_p8_x3): Likewise.
3046 (vst1q_s16_x3): Likewise.
3047 (vst1q_p16_x3): Likewise.
3048 (vst1q_s32_x3): Likewise.
3049 (vst1q_s64_x3): Likewise.
3050 (vst1q_u8_x3): Likewise.
3051 (vst1q_u16_x3): Likewise.
3052 (vst1q_u32_x3): Likewise.
3053 (vst1q_u64_x3): Likewise.
3054 (vst1q_f16_x3): Likewise.
3055 (vst1q_f32_x3): Likewise.
3056 (vst1q_f64_x3): Likewise.
3057 (vst1q_p64_x3): Likewise.
3058
3059 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3060
3061 * config/msp430/msp430.c (msp430_output_labelref): Prepend
3062 user_label_prefix to name.
3063
3064 * tree-core.h: Update comment about the format of NAME string
3065 passed to handler in attribute_spec.
3066
3067 * config/msp430/msp430.md: Remove erroneous subreg expression from
3068 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
3069 zero_extend{q,h}isi2.
3070
3071 2018-05-30 Borislav Petkov <bp@suse.de>
3072
3073 * doc/extend.texi: Document some architecture specific
3074 constraints and sort entries.
3075
3076 2018-05-30 Martin Sebor <msebor@redhat.com>
3077
3078 PR middle-end/85369
3079 * builtins.c (expand_builtin_stpcpy_1): New function.
3080 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
3081 only if the former succeeds.
3082
3083 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3084
3085 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
3086 in saphira.
3087
3088 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
3089
3090 * doc/invoke.texi (-flinker-output): Document
3091
3092 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
3093
3094 * passes.c (ipa_write_summaries): Only modify statements if body
3095 is in memory.
3096 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
3097 incrementally linking.
3098 (ipa_passes): Likewise.
3099 * lto-cgraph.c (lto_output_node): When incrementally linking do not
3100 pass down resolution info.
3101 * common.opt (flag_incremental_link): Update info.
3102 * gcc.c (plugin specs): Turn flinker-output=* to
3103 -plugin-opt=-linker-output-known
3104 * toplev.c (compile_file): Also cut compilation when doing incremental
3105 link.
3106 * flag-types. (enum lto_partition_model): Add
3107 LTO_LINKER_OUTPUT_NOLTOREL.
3108 (invoke.texi): Add -flinker-output docs.
3109 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
3110 link same way as WPA; do not stream in dead initializers.
3111
3112 * dwarf2out.c (dwarf2out_die_ref_for_decl,
3113 darf2out_register_external_decl): Support incremental link.
3114
3115 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
3116
3117 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
3118
3119 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
3120
3121 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
3122 it down to simple_object_copy_lto_debug_sections.
3123 (run_gcc): Determine incremental LTO link time and configure
3124 lto1 into non-wpa mode, disable renaming of debug sections.
3125
3126 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
3127
3128 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3129 descriptions of various incorrectly documented functions.
3130
3131 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
3132
3133 Revert:
3134 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3135 address check not strict.
3136
3137 2018-05-30 Richard Biener <rguenther@suse.de>
3138
3139 PR tree-optimization/85964
3140 * tracer.c (better_p): Drop initialized count check, we only
3141 call the function with initialized counts now.
3142 (find_best_successor): Do find a best edge if one
3143 has uninitialized count.
3144 (find_best_predecessor): Likewise. Do BB frequency check only
3145 if count is initialized.
3146
3147 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
3148
3149 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
3150 (aarch64_ldrstr_offset_compare): New.
3151 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
3152 load/store orderings.
3153 (aarch64_gen_adjusted_ldpstp): Likewise.
3154
3155 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
3156
3157 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3158 Check for subset of GENERAL_REGS and FP_REGS.
3159 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
3160 r=w alternative.
3161
3162 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
3163
3164 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
3165 and wi::to_poly_offset. Add the current offset and then check
3166 whether the sum fits, rather than using an unchecked addition of
3167 a checked term. Check for a shwi rather than a uhwi.
3168 * expr.c (get_bit_range): Use tree_to_poly_uint64.
3169 (store_constructor): Use poly_int_tree_p.
3170 (expand_expr_real_1): Likewise.
3171 * function.c (assign_temp): Likewise.
3172 * fold-const.c (const_binop): Use poly_int_tree_p and
3173 wi::to_poly_offset.
3174 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
3175 division.
3176 * ipa-icf-gimple.c (func_checker::compare_operand): Use
3177 to_poly_offset for MEM offsets.
3178 * ipa-icf.c (sem_variable::equals): Likewise.
3179 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
3180 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
3181 wi::to_poly_offset for BIT_FIELD_REF offsets.
3182 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
3183 wi::to_poly_offset.
3184 * var-tracking.c (emit_note_insn_var_location): Use
3185 tree_to_poly_uint64.
3186
3187 2018-05-29 Jim Wilson <jimw@sifive.com>
3188
3189 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
3190
3191 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
3192
3193 PR target/85950
3194 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
3195 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
3196 sequence.
3197 (sse4_1_round<mode>2): Use nonimmediate_operand
3198 for operand 1 predicate.
3199
3200 2018-05-29 Martin Sebor <msebor@redhat.com>
3201 Richard Biener <rguenther@suse.de>
3202
3203 PR testsuite/85888
3204 * calls.c (get_size_range): Call determine_value_range instead
3205 of get_value_range..
3206 * tree-vrp.h (determine_value_range): Declared new function.
3207 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
3208
3209 2018-05-29 Richard Biener <rguenther@suse.de>
3210
3211 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
3212 sure to use non-pattern stmts for get_earlier_stmt arguments.
3213 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
3214 called on pattern stmts.
3215 (get_later_stmt): Likewise.
3216
3217 2018-05-29 Martin Liska <mliska@suse.cz>
3218
3219 PR gcov-profile/85759
3220 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
3221 env variables.
3222
3223 2018-05-29 Jakub Jelinek <jakub@redhat.com>
3224
3225 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
3226 VEC_UNPACK_*_EXPR.
3227 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
3228 VEC_PACK_*_EXPR.
3229
3230 PR target/85918
3231 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3232 VEC_PACK_FLOAT_EXPR): New tree codes.
3233 * tree-pretty-print.c (op_code_prio): Handle
3234 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3235 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3236 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3237 * tree-inline.c (estimate_operator_cost): Likewise.
3238 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
3239 * fold-const.c (const_binop): Likewise.
3240 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
3241 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3242 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3243 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
3244 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3245 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3246 * expr.c (expand_expr_real_2): Likewise.
3247 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
3248 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
3249 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
3250 optabs.
3251 * optabs.c (expand_widen_pattern_expr): For
3252 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
3253 sign from result type rather than operand's type.
3254 (expand_binop_directly): For vec_packu_float_optab and
3255 vec_packs_float_optab allow result type to be different from operand's
3256 type.
3257 * optabs-tree.c (optab_for_tree_code): Handle
3258 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3259 VEC_PACK_FLOAT_EXPR. Formatting fixes.
3260 * tree-vect-generic.c (expand_vector_operations_1): Handle
3261 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3262 VEC_PACK_FLOAT_EXPR.
3263 * tree-vect-stmts.c (supportable_widening_operation): Handle
3264 FIX_TRUNC_EXPR.
3265 (supportable_narrowing_operation): Handle FLOAT_EXPR.
3266 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
3267 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
3268 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
3269 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
3270 mode attributes.
3271 (vec_pack<floatprefix>_float_<mode>): New expander.
3272 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
3273 attributes.
3274 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
3275 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
3276 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
3277 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
3278 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
3279 Document.
3280 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
3281 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
3282 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3283 VEC_PACK_FLOAT_EXPR): Document.
3284
3285 2018-05-29 Richard Biener <rguenther@suse.de>
3286
3287 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
3288 member.
3289 (stmt_vec_info_vec): Make pointer.
3290 (init_stmt_vec_info_vec): Remove.
3291 (free_stmt_vec_info_vec): Likewise.
3292 (set_stmt_vec_info_vec): New function.
3293 (free_stmt_vec_infos): Likewise.
3294 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
3295 (set_vinfo_for_stmt): Likewise.
3296 (get_earlier_stmt): Likewise.
3297 (get_later_stmt): Likewise.
3298 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
3299 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
3300 (vec_info::~vec_info): Free stmt_vec_infos.
3301 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
3302 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
3303 (pass_slp_vectorize::execute): Likewise.
3304 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
3305 (free_stmt_vec_info_vec): Likewise.
3306 (set_stmt_vec_info_vec): New function.
3307 (free_stmt_vec_infos): Likewise.
3308 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
3309 the global stmt_vec_info_vec.
3310 * tree-parloops.c (gather_scalar_reductions): Use
3311 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
3312 vector.
3313
3314 2018-05-29 Richard Biener <rguenther@suse.de>
3315
3316 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
3317
3318 2018-05-29 Martin Liska <mliska@suse.cz>
3319 David Malcolm <dmalcolm@redhat.com>
3320
3321 * vec.c (test_reverse): New.
3322 (vec_c_tests): Add new test.
3323 * vec.h (vl_ptr>::reverse): New function.
3324
3325 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
3326
3327 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
3328
3329 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
3330 and later.
3331
3332 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3333
3334 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
3335
3336 2018-05-28 Richard Biener <rguenther@suse.de>
3337
3338 PR tree-optimization/85933
3339 * tree-vect-data-refs.c (vect_record_base_alignments): Only
3340 look at stmts marked as vectorizable.
3341
3342 2018-05-28 Richard Biener <rguenther@suse.de>
3343
3344 PR tree-optimization/85934
3345 * tree-vect-generic.c (expand_vector_operations_1): Hoist
3346 vector boolean check before scalar optimization.
3347
3348 2018-05-28 Jakub Jelinek <jakub@redhat.com>
3349
3350 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
3351 for armv5te.
3352
3353 2018-05-28 Mark Wielaard <mark@klomp.org>
3354
3355 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
3356 if it is an expression containing a minus sign.
3357
3358 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
3359
3360 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
3361
3362 2018-05-27 Paul Koning <ni1d@arrl.net>
3363
3364 * config/pdp11/pdp11.md (truncsihi2): Remove.
3365
3366 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
3367 Chung-Ju Wu <jasonwucj@gmail.com>
3368
3369 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
3370 implementation.
3371 (unaligned_store_dw): Ditto.
3372 * config/nds32/nds32-memory-manipulation.c
3373 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
3374 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
3375 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
3376 (emit_setmem_word_loop): Rename to ...
3377 (emit_setmem_doubleword_loop): ... this.
3378 (nds32_gen_dup_4_byte_to_word_value): New function.
3379 (nds32_gen_dup_8_byte_to_double_word_value): New function.
3380 (nds32_expand_setmem_loop): Refine implementation.
3381 (nds32_expand_setmem_loop_v3m): Ditto.
3382 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
3383 pattern.
3384
3385 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
3386
3387 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
3388
3389 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
3390
3391 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
3392 (nds32_init_machine_status): Initialize machine->attr_naked_p and
3393 machine->attr_no_prologue_p.
3394 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
3395 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
3396 (nds32_expand_epilogue): Consider attr_naked_p.
3397 (nds32_expand_epilogue_v3pop): Likewise.
3398 (nds32_can_use_return_insn): Likewise.
3399 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
3400 attr_no_prologue_p fields.
3401 * config/nds32/nds32.opt (mret-in-naked-func): New option.
3402
3403 2018-05-27 Jakub Jelinek <jakub@redhat.com>
3404
3405 PR target/85918
3406 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
3407 attributes.
3408 * config/i386/sse.md
3409 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
3410 Rename to ...
3411 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
3412 ... this.
3413 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
3414 Rename to ...
3415 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
3416 ... this.
3417 (*<floatsuffix>floatv2div2sf2): Rename to ...
3418 (*float<floatunssuffix>v2div2sf2): ... this.
3419 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
3420 (float<floatunssuffix>v2div2sf2_mask): ... this.
3421 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
3422 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
3423 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
3424 to ...
3425 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
3426 ... this.
3427 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3428 Rename to ...
3429 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3430 ... this.
3431 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3432 Rename to ...
3433 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3434 ... this.
3435 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
3436 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
3437 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
3438 gen_ufix_truncv8dfv8si2.
3439 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
3440 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
3441 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
3442 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
3443 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
3444 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
3445 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
3446 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
3447
3448 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
3449
3450 PR target/85900
3451 PR target/85345
3452 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
3453
3454 2018-05-25 Jim Wilson <jimw@sifive.com>
3455
3456 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
3457 * config/riscv/riscv.c (struct machine_function): Add
3458 interrupt_handler_p and attribute_checked_p fields.
3459 (riscv_attribute_table): Add interrupt.
3460 (riscv_interrupt_type_p): New.
3461 (riscv_save_reg_p): Save extra regs for interrupt handler.
3462 (riscv_use_save_libcall): Return false for interrupt handler.
3463 (riscv_first_stack_step): Add forward declaration.
3464 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
3465 for interrupt handler with large frame. Use it for saved reg list.
3466 (riscv_expand_prologue): Move flag_stack_usage_info support to
3467 eliminate duplication.
3468 (riscv_expand_epilogue): Generate mret for interrupt handler.
3469 (riscv_epilogue_uses): New.
3470 (riscv_can_use_return_insn): Return false for interrupt handler.
3471 (riscv_function_ok_for_sibcall): Likewise.
3472 (riscv_set_current_function): Add interrupt handler support.
3473 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
3474 * config/riscv/riscv.md (UNSPECV_MRET): New.
3475 (GP_REGNUM): New.
3476 (riscv_frflags, riscv_fsflags): Use tab after opcode.
3477 (riscv_mret): New.
3478 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
3479
3480 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
3481
3482 PR tree-optimization/85712
3483 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
3484 this candidate has already been replaced in-situ by a copy.
3485
3486 2018-05-25 Jason Merrill <jason@redhat.com>
3487
3488 PR c++/80485 - inline function non-zero address.
3489 * symtab.c (nonzero_address): Check DECL_COMDAT.
3490
3491 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
3492
3493 PR target/83628
3494 * config/alpha/alpha.md (ashlsi3): New insn pattern.
3495 (*ashlsi_se): Rename from *ashldi_se. Define as sign
3496 extension of SImode operation. Use const123_operand predicate.
3497 (*saddsi_1): Remove.
3498 (*saddl_se_1): Ditto.
3499 (*ssubsi_1): Ditto.
3500 (*ssubl_se_1): Ditto.
3501 * config/alpha/predicates.md (const123_operand): New predicate.
3502 * config/alpha/constraints.md (P): Use IN_RANGE.
3503
3504 2018-05-25 Richard Biener <rguenther@suse.de>
3505
3506 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
3507 defaulted to true.
3508 (ref_maybe_used_by_stmt_p): Likewise.
3509 (stmt_may_clobber_ref_p): Likewise.
3510 (stmt_may_clobber_ref_p_1): Likewise.
3511 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
3512 and pass it along.
3513 (ref_maybe_used_by_stmt_p): Likewise.
3514 (stmt_may_clobber_ref_p): Likewise.
3515 (stmt_may_clobber_ref_p_1): Likewise.
3516 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
3517 the alias oracle to disambiguate DRs with stmts DR analysis
3518 couldn't handle.
3519 (vect_analyze_data_refs): Do not give up on not analyzable
3520 DRs for BB vectorization. Remove code truncating the dataref
3521 vector.
3522
3523 2018-05-25 Jakub Jelinek <jakub@redhat.com>
3524
3525 PR target/85832
3526 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3527 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
3528 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
3529
3530 2018-05-25 Richard Biener <rguenther@suse.de>
3531
3532 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
3533 function, combining stmt data ref gathering and fatal analysis
3534 parts.
3535 (vect_analyze_data_refs): Remove now redudnant code and simplify.
3536 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
3537 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
3538 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
3539 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
3540
3541 2018-05-25 Bin Cheng <bin.cheng@arm.com>
3542
3543 PR tree-optimization/85720
3544 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
3545 SCC if all partitions are builtins.
3546 (version_loop_by_alias_check): New parameter. Generate cancelable
3547 runtime alias check if all partitions are builtins.
3548 (distribute_loop): Update call to above function.
3549
3550 2018-05-25 Bin Cheng <bin.cheng@arm.com>
3551
3552 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
3553 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
3554 (parm_default_def_partition_arg): Ditto.
3555 (set_parm_default_def_partition): Ditto.
3556 (get_parm_default_def_partitions): Ditto and make it static.
3557 (get_undefined_value_partitions): Ditto and make it static.
3558 (remove_ssa_form): Refactor call to init_var_map here.
3559 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
3560 computation for loop region.
3561 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
3562 (register_default_def): Delete.
3563 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
3564 (parm_default_def_partition_arg): Ditto.
3565 (set_parm_default_def_partition): Ditto.
3566 (get_parm_default_def_partitions): Ditto and make it static.
3567 (get_undefined_value_partitions): Ditto and make it static.
3568 (coalesce_with_default, coalesce_with_default): Update comment.
3569 (create_coalesce_list_for_region): New func factored out from
3570 create_outofssa_var_map.
3571 (populate_coalesce_list_for_outofssa): New func factored out from
3572 create_outofssa_var_map and coalesce_ssa_name.
3573 (create_outofssa_var_map): Delete.
3574 (coalesce_ssa_name): Refactor to support live range computation.
3575 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
3576 (get_parm_default_def_partitions): Delete.
3577 (get_undefined_value_partitions): Ditto.
3578 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
3579 computation for loop region.
3580 (new_tree_live_info, loe_visit_block): Ditto.
3581 (live_worklist, set_var_live_on_entry): Ditto.
3582 (calculate_live_on_exit, verify_live_on_entry): Ditto.
3583 * tree-ssa-live.h (struct _var_map): New fields.
3584 (init_var_map): Change decl.
3585 (region_contains_p): New.
3586
3587 2018-05-25 Bin Cheng <bin.cheng@arm.com>
3588
3589 * tree-ssa-live.h (live_merge_and_clear): Delete.
3590
3591 2018-05-25 Richard Biener <rguenther@suse.de>
3592
3593 PR c++/85912
3594 * tree-dump.c (dequeue_and_dump): Remove access to removed
3595 operand 2 of a SWITCH_EXPR.
3596
3597 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3598
3599 * doc/sourcebuild.texi (vect_double_cond_arith): Include
3600 multiplication and division.
3601 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
3602 (cond_udiv@var{m}, cond_umod@var{m}): Document.
3603 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
3604 (cond_udiv_optab, cond_umod_optab): New optabs.
3605 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
3606 (IFN_COND_RDIV): New internal functions.
3607 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
3608 TRUNC_MOD_EXPR and RDIV_EXPR.
3609 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
3610 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
3611 New unspecs.
3612 (SVE_INT_BINARY): Include mult.
3613 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
3614 (optab, sve_int_op): Handle mult.
3615 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
3616 UNSPEC_COND_DIV.
3617 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
3618 for SVE_INT_BINARY_SD.
3619
3620 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3621
3622 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
3623 (optab, sve_int_op): Handle div and udiv.
3624 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
3625 for SVE_INT_BINARY_SD.
3626 (*<optab><mode>3): New insn for the same.
3627
3628 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3629
3630 * tree-vect-patterns.c: Include predict.h.
3631 (vect_recog_divmod_pattern): Restrict check for division support
3632 to when optimizing for size.
3633
3634 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3635
3636 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
3637 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
3638 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
3639 (gimple_match_op::set_op): Likewise.
3640 (gimple_resimplify4): Declare.
3641 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
3642 (expr::gen_transform): Likewise.
3643 (decision_tree::gen): Generate a simplification routine for 4 operands.
3644 * gimple-match-head.c (gimple_simplify): Add an overload for
3645 4 operands. In the top-level function, handle up to 4 call
3646 arguments and call gimple_resimplify4.
3647 (gimple_resimplify4): New function.
3648 (build_call_internal): Pass a fourth operand.
3649 (maybe_push_to_seq): Likewise.
3650 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
3651 Fold VEC_COND_EXPRs of an operation and a default value into
3652 an IFN_COND_* function if possible.
3653 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
3654 New unspecs.
3655 (SVE_COND_FP_BINARY): Include them.
3656 (optab, sve_fp_op): Handle them.
3657 (SVE_INT_BINARY_REV): New code iterator.
3658 (SVE_COND_FP_BINARY_REV): New int iterator.
3659 (commutative): New int attribute.
3660 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
3661 Declare.
3662 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
3663 function.
3664 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
3665 (*cond_<optab><mode>): New patterns for reversed operands.
3666
3667 2018-05-25 Richard Biener <rguenther@suse.de>
3668
3669 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
3670 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
3671 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
3672 (STMT_VINFO_GROUPED_ACCESS): Adjust.
3673 * tree-vect-data-refs.c (everywhere): Adjust users.
3674 * tree-vect-loop.c (everywhere): Likewise.
3675 * tree-vect-slp.c (everywhere): Likewise.
3676 * tree-vect-stmts.c (everywhere): Likewise.
3677 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3678
3679 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3680
3681 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
3682 Rename to...
3683 (gcc_cv_as_section_exclude): ... this.
3684 Try Solaris as #exclude syntax.
3685 * configure: Regenerate.
3686 * config.in: Regenerate.
3687 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
3688 SECTION_EXCLUDE.
3689 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
3690 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
3691
3692 * varasm.c (default_elf_asm_named_section): Don't check if
3693 HAVE_GAS_SECTION_EXCLUDE is defined.
3694
3695 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3696
3697 * doc/md.texi: Update the documentation of the cond_* optabs
3698 to mention the new final operand. Fix GET_MODE_NUNITS call.
3699 Describe the scalar case too.
3700 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
3701 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
3702 instead of 2.
3703 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
3704 (get_conditional_internal_fn): Update comment.
3705 * tree-vect-loop.c (vectorizable_reduction): Pass the original
3706 accumulator value as a final argument to conditional functions.
3707 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
3708 a define_expand and add an "else" operand. Assert for now that
3709 the else operand is equal to operand 2. Use SVE_INT_BINARY and
3710 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
3711 (*cond_<optab><mode>): New patterns.
3712 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
3713 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
3714 (UNSPEC_COND_EOR): Delete.
3715 (optab): Remove associated mappings.
3716 (SVE_INT_BINARY): New code iterator.
3717 (sve_int_op): Remove int attribute and add "minus" to the code
3718 attribute.
3719 (SVE_COND_INT_OP): Delete.
3720 (SVE_COND_FP_OP): Rename to...
3721 (SVE_COND_FP_BINARY): ...this.
3722
3723 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
3724
3725 * optabs.c (can_reuse_operands_p): New function.
3726 (maybe_legitimize_operands): Try to reuse the results for
3727 earlier operands.
3728
3729 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
3730
3731 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
3732 Add {q} suffix to insn mnemonic.
3733
3734 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3735
3736 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
3737 (msp430_warn_func_return): New.
3738
3739 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
3740
3741 * fold-const.c (tree_nonzero_bits): New function.
3742 * fold-const.h (tree_nonzero_bits): Likewise.
3743 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
3744 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
3745
3746 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
3747
3748 PR target/85900
3749 PR target/85345
3750 * varasm.c (assemble_alias): Check ifunc_resolver only on
3751 FUNCTION_DECL.
3752
3753 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
3754
3755 PR target/85903
3756 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
3757 when memory input operand is handled.
3758
3759 2018-05-24 Luis Machado <luis.machado@linaro.org>
3760
3761 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
3762 global.
3763 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
3764
3765 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
3766
3767 * match.pd: Delay FMA folds until after vectorization.
3768
3769 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
3770
3771 PR target/83009
3772 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3773 address check not strict.
3774
3775 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
3776
3777 * gimple-match.h (gimple_match_op): New class.
3778 (mprts_hook): Replace parameters with a gimple_match_op *.
3779 (maybe_build_generic_op): Likewise.
3780 (gimple_simplified_result_is_gimple_val): Replace parameters with
3781 a const gimple_match_op *.
3782 (gimple_simplify): Replace code_helper * and tree * parameters with
3783 a gimple_match_op * parameter.
3784 (gimple_resimplify1): Replace code_helper *, tree and tree *
3785 parameters with a gimple_match_op * parameter.
3786 (gimple_resimplify2): Likewise.
3787 (gimple_resimplify3): Likewise.
3788 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
3789 parameters with a gimple_match_op * parameter.
3790 * gimple-match-head.c (gimple_simplify): Change prototypes of
3791 auto-generated functions to take a gimple_match_op * instead of
3792 separate code_helper * and tree * parameters. Make the same
3793 change in the top-level overload and update calls to the
3794 gimple_resimplify routines. Update calls to the auto-generated
3795 functions and to maybe_push_res_to_seq in the publicly-facing
3796 operation-specific gimple_simplify overloads.
3797 (gimple_match_op::MAX_NUM_OPS): Define.
3798 (gimple_resimplify1): Replace rcode and ops with a single res_op
3799 parameter. Update call to gimple_simplify.
3800 (gimple_resimplify2): Likewise.
3801 (gimple_resimplify3): Likewise.
3802 (mprts_hook): Replace parameters with a gimple_match_op *.
3803 (maybe_build_generic_op): Likewise.
3804 (build_call_internal): Replace type, nargs and ops with
3805 a gimple_match_op *.
3806 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
3807 with a single gimple_match_op *. Update calls to mprts_hook,
3808 build_call_internal and gimple_simplified_result_is_gimple_val.
3809 Factor out code that is common to the tree_code and combined_fn cases.
3810 * genmatch.c (expr::gen_transform): Replace tem_code and
3811 tem_ops with a gimple_match_op called tem_op. Update calls
3812 to the gimple_resimplify functions and maybe_push_res_to_seq.
3813 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
3814 res_ops. Update call to the gimple_resimplify functions.
3815 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
3816 (decision_tree::gen): Make the functions take a gimple_match_op *
3817 called res_op instead of separate res_code and res_ops parameters.
3818 Update call accordingly.
3819 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
3820 and ops with a single res_op parameter. Update calls to
3821 maybe_build_generic_op and maybe_push_res_to_seq.
3822 (fold_stmt_1): Update calls to gimple_simplify and
3823 replace_stmt_with_simplification.
3824 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
3825 and gimple_simplified_result_is_gimple_val.
3826 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
3827 gimple_simplify.
3828 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
3829 with a gimple_match_op *.
3830 (vn_nary_build_or_lookup): Likewise. Update call to
3831 vn_nary_build_or_lookup_1.
3832 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
3833 gimple_match_op *. Update calls to the gimple_resimplify routines
3834 and to gimple_simplified_result_is_gimple_val.
3835 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
3836 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
3837 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
3838 (visit_nary_op): Likewise.
3839 (visit_reference_op_load): Likewise.
3840
3841 2018-05-23 Luis Machado <luis.machado@linaro.org>
3842
3843 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
3844 modifier for printing the step amount.
3845
3846 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
3847
3848 PR target/78849
3849 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
3850 types.
3851
3852 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
3853
3854 * doc/sourcebuild.texi (Endianness): New subsubsection.
3855
3856 2018-05-23 Luis Machado <luis.machado@linaro.org>
3857
3858 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3859 <prefetch_dynamic_strides>: New const bool field.
3860 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3861 prefetch_dynamic_strides.
3862 (exynosm1_prefetch_tune): Likewise.
3863 (thunderxt88_prefetch_tune): Likewise.
3864 (thunderx_prefetch_tune): Likewise.
3865 (thunderx2t99_prefetch_tune): Likewise.
3866 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
3867 false.
3868 (aarch64_override_options_internal): Update to set
3869 PARAM_PREFETCH_DYNAMIC_STRIDES.
3870 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3871 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3872 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3873 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3874 prefetch-dynamic-strides setting.
3875
3876 2018-05-23 Luis Machado <luis.machado@linaro.org>
3877
3878 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3879 <minimum_stride>: New const int field.
3880 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3881 minimum_stride field defaulting to -1.
3882 (exynosm1_prefetch_tune): Likewise.
3883 (thunderxt88_prefetch_tune): Likewise.
3884 (thunderx_prefetch_tune): Likewise.
3885 (thunderx2t99_prefetch_tune): Likewise.
3886 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
3887 <default_opt_level>: Set to 3.
3888 (aarch64_override_options_internal): Update to set
3889 PARAM_PREFETCH_MINIMUM_STRIDE.
3890 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3891 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3892 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3893 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3894 stride is constant and is below the minimum stride threshold.
3895
3896 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3897
3898 * config/arm/arm-cpus.in (mode26): Delete.
3899 (armv4): Delete mode26 reference.
3900 * config/arm/arm.c (arm_configure_build_target): Delete use of
3901 isa_bit_mode26.
3902
3903 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
3904
3905 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
3906 New insn pattern.
3907 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
3908 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
3909 for non-SSE modes.
3910 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
3911 (floatunsdidf2): Ditto.
3912
3913 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
3914
3915 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
3916 (fixuns_trunc<mode>si2_avx512f): Ditto.
3917 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
3918 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
3919 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
3920
3921 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
3922
3923 PR rtl-optimization/79985
3924 * df-scan.c (df_insn_refs_collect): Remove special case for
3925 global registers and asm statements.
3926
3927 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
3928
3929 * extend.texi (Global Register Variables): Rewrite the bullet list.
3930 Note that the register is available for allocation. Note that access
3931 via inline asm must use constraints. Add note about async-signal
3932 handlers. Remove paragraph about automagic register selection.
3933
3934 2018-05-23 Richard Biener <rguenther@suse.de>
3935
3936 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
3937 of fixed offset from memset VN.
3938
3939 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
3940
3941 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
3942 first_interp field.
3943 (alloc_cand_and_find_basis): Initialize first_interp field.
3944 (slsr_process_mul): Modify first_interp field.
3945 (slsr_process_add): Likewise.
3946 (slsr_process_cast): Modify first_interp field for each new
3947 interpretation.
3948 (slsr_process_copy): Likewise.
3949 (dump_candidate): Dump first_interp field.
3950 (replace_mult_candidate): Process all interpretations, not just
3951 subsequent ones.
3952 (replace_rhs_if_not_dup): Likewise.
3953 (replace_one_candidate): Likewise.
3954
3955 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
3956
3957 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
3958 Add new boolean.
3959 (aarch64_needs_frame_chain): New function.
3960 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
3961
3962 2018-05-23 Sudakshina Das <sudi.das@arm.com>
3963
3964 PR target/84882
3965 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
3966 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
3967 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
3968 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
3969 as true for strict-align.
3970 (aarch64_can_inline_p): Perform checks even when callee has no
3971 attributes to check for strict alignment.
3972 * doc/extend.texi (AArch64 Function Attributes): Document
3973 no-strict-align.
3974 * doc/invoke.texi: (AArch64 Options): Likewise.
3975
3976 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
3977
3978 PR tree-optimization/85853
3979 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
3980 the handling of the root of the node to...
3981 (vect_slp_analyze_node_operations_1): ...this new function,
3982 and run the whole thing with the child nodes' def types
3983 set according to their SLP node's def type.
3984
3985 2018-05-23 Richard Biener <rguenther@suse.de>
3986
3987 PR middle-end/85874
3988 * tree-data-ref.c (create_runtime_alias_checks): Defer
3989 and ignore overflow warnings.
3990
3991 2018-05-23 Yury Gribov <tetra2005@gmail.com>
3992
3993 PR tree-optimization/85822
3994 * tree-vrp.c (is_masked_range_test): Fix handling of negative
3995 constants.
3996
3997 2018-05-23 Richard Biener <rguenther@suse.de>
3998
3999 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4000 memset constants via native_interpret_expr.
4001
4002 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
4003
4004 PR target/85345
4005 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4006 attribute.
4007 (cgraph_node::create_alias): Likewise.
4008 (cgraph_node::get_availability): Check ifunc_resolver instead
4009 of looking up ifunc attribute.
4010 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4011 * varasm.c (do_assemble_alias): Likewise.
4012 (assemble_alias): Likewise.
4013 (default_binds_local_p_3): Likewise.
4014 * cgraph.h (cgraph_node): Add ifunc_resolver.
4015 (cgraph_node::only_called_directly_or_aliased_p): Return false
4016 for IFUNC resolver.
4017 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4018 attribute.
4019 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4020 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4021 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4022 instead of looking up ifunc attribute.
4023
4024 2018-05-22 Luis Machado <luis.machado@linaro.org>
4025
4026 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
4027
4028 2018-05-22 Martin Sebor <msebor@redhat.com>
4029
4030 PR middle-end/85359
4031 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
4032 only when expasion succeeds.
4033 (expand_builtin_strcmp): Same.
4034 (expand_builtin_strncmp): Same.
4035
4036 2018-05-22 Martin Sebor <msebor@redhat.com>
4037
4038 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
4039
4040 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
4041 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4042
4043 * config/aarch64/aarch64-ldpstp.md: Replace uses of
4044 aarch64_mem_pair_operand with memory_operand and delete operand swapping
4045 code.
4046 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4047 Add check for legitimate_address.
4048 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
4049 (aarch64_swap_ldrstr_operands): New.
4050 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
4051 Define prototype.
4052
4053 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
4054 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4055
4056 * config/aarch64/aarch64.md: New patterns to generate stp
4057 and ldp.
4058 (store_pair_sw, store_pair_dw): New patterns to generate stp for
4059 single words and double words.
4060 (load_pair_sw, load_pair_dw): Likewise.
4061 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
4062 Delete.
4063 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
4064 Delete.
4065 * config/aarch64/aarch64-ldpstp.md: Modify peephole
4066 for different mode ldpstp and add peephole for merged zero stores.
4067 Likewise for loads.
4068 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4069 Add size check.
4070 (aarch64_gen_store_pair): Rename calls to match new patterns.
4071 (aarch64_gen_load_pair): Rename calls to match new patterns.
4072 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
4073 (load_pair<DREG:mode><DREG2:mode>): ... This.
4074 (store_pair<mode>): Rename to...
4075 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
4076 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
4077 New mode iterators.
4078 (V_INT_EQUIV): Handle SImode.
4079 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
4080 New predicate.
4081
4082 2018-05-22 Martin Sebor <msebor@redhat.com>
4083
4084 PR c/85623
4085 * calls.c (maybe_warn_nonstring_arg): Use string length to set
4086 or ajust the presumed bound on an operation to avoid unnecessary
4087 warnings.
4088
4089 2018-05-22 Martin Sebor <msebor@redhat.com>
4090
4091 PR tree-optimization/85826
4092 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
4093 assuming that a DECL necesarily has a constant size.
4094
4095 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
4096
4097 PR middle-end/85862
4098 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
4099
4100 2018-05-22 Richard Biener <rguenther@suse.de>
4101
4102 PR tree-optimization/85834
4103 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
4104 non-constant and non-zero memset arguments.
4105
4106 2018-05-22 Martin Liska <mliska@suse.cz>
4107
4108 PR ipa/85607
4109 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
4110
4111 2018-05-22 Richard Biener <rguenther@suse.de>
4112
4113 PR tree-optimization/85863
4114 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4115 comparisons when vectype is specified.
4116 (vectorizable_condition): Do not specify vectype for
4117 vect_is_simple_cond when SLP vectorizing.
4118
4119 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
4120
4121 PR target/85657
4122 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
4123 define __ibm128 as long double.
4124 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
4125 as a distinct type when IEEE 128-bit support is enabled.
4126 (init_float128_ieee): Fix up conversions between IFmode and IEEE
4127 128-bit types to use the correct functions.
4128 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4129 convert between 128-bit floating point types that have different
4130 modes but the same representation, instead of using gen_lowpart to
4131 makean alias.
4132 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4133 KFmode.
4134 (IFKF_reg): New attributes to give the register constraints for
4135 IFmode and KFmode.
4136 (extend<mode>tf2_internal): New insns to mark an explicit
4137 conversion between 128-bit floating point types that have a
4138 different mode but share the same representation.
4139
4140 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
4141
4142 PR tree-optimization/85814
4143 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4144 a null return from get_strinfo when unsharing the next
4145 strinfo in the chain.
4146
4147 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4148
4149 PR gcc/84923
4150 * varasm.c (weak_finish): Clean up weak_decls.
4151
4152 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4153
4154 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
4155 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
4156 UNSPEC_UADALP values.
4157 * config/aarch64/iterators.md (ABAL): New int iterator.
4158 (ABDL2): Likewise.
4159 (ADALP): Likewise.
4160 (sur): Add mappings for the above.
4161 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
4162 New define_insn.
4163 (aarch64_<sur>abal<mode>_4): Likewise.
4164 (aarch64_<sur>adalp<mode>_3): Likewise.
4165 (<sur>sadv16qi): New define_expand.
4166
4167 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
4168
4169 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
4170 (*movdf_internal): Ditto.
4171 (*rcpsf2_sse): Ditto.
4172 (*rsqrtsf2_sse): Ditto.
4173 (*sqrt<mode>2_sse): Ditto.
4174
4175 2018-05-21 Tamar Christina <tamar.christina@arm.com>
4176
4177 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
4178 eor3q<mode>4.
4179 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
4180 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
4181 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
4182 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
4183 vbcaxq_s64): New.
4184 * config/aarch64/arm_neon.h: Likewise.
4185 * config/aarch64/iterators.md (VQ_I): New.
4186
4187 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
4188
4189 * config.gcc: Add arc/t-multilib-linux to tmake_file for
4190 arc*-*-linux*.
4191 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
4192 MULTILIB_DIRNAMES
4193
4194 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
4195
4196 * config/nds32/constraints.md (S): New constraint.
4197 * config/nds32/nds32.md (call_internal): Use constraint S.
4198 (call_value_internal): Likewise.
4199 (sibcall_internal): Likewise.
4200 (sibcall_value_internal): Likewise.
4201
4202 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
4203 Chung-Ju Wu <jasonwucj@gmail.com>
4204
4205 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
4206 into consideration.
4207
4208 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
4209 Chung-Ju Wu <jasonwucj@gmail.com>
4210
4211 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
4212 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
4213 (nds32_rtx_costs_impl): Simplify.
4214 (nds32_address_cost_impl): Simplify.
4215 (nds32_init_rtx_costs): New function.
4216 (nds32_rtx_costs_speed_prefer): Likewise.
4217 (nds32_rtx_costs_size_prefer): Likewise.
4218 (nds32_address_cost_speed_prefer): Likewise.
4219 (nds32_address_cost_speed_fwprop): Likewise.
4220 (nds32_address_cost_size_prefer): Likewise.
4221 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
4222 * config/nds32/nds32.c (nds32_option_override): Use
4223 nds32_init_rtx_costs function.
4224
4225 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
4226
4227 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
4228 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
4229 (TARGET_PIPELINE_N8): Likewise.
4230 (TARGET_PIPELINE_N10): Likewise.
4231 (TARGET_PIPELINE_N13): Likewise.
4232 (TARGET_PIPELINE_GRAYWOLF): Likewise.
4233
4234 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
4235
4236 * config/nds32/nds32-fpu.md: Update copyright year.
4237
4238 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4239
4240 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
4241
4242 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4243
4244 * config/nds32/nds32.c
4245 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
4246 * config/nds32/nds32.opt (minline-asm-r15): New option.
4247
4248 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4249
4250 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
4251 MASK_HW_ABS.
4252 * config/nds32/nds32.md (abssi2): New pattern.
4253
4254 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
4255
4256 * config/i386/i386.md (rex64namesuffix): New mode attribute.
4257 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
4258 Merge insn pattern from sse_cvtsi2ss<round_name> and
4259 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
4260 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
4261 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
4262 using SWI48 mode iterator.
4263 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
4264 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
4265 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
4266 pattern from sse_cvttss2si<round_saeonly_name>
4267 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
4268 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
4269 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
4270 using SWI48 mode iterator.
4271 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
4272 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
4273 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
4274 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
4275 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
4276 using SWI48 mode iterator.
4277 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
4278 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
4279 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
4280 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
4281 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
4282 SWI48 mode iterator.
4283 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
4284 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
4285 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
4286 pattern from sse_cvttsd2si<round_saeonly_name>
4287 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
4288
4289 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4290
4291 * config/nds32/nds32-md-auxiliary.c
4292 (nds32_valid_smw_lwm_base_p): Refine.
4293 (nds32_output_smw_single_word): Refine.
4294 (nds32_output_smw_double_word): New.
4295 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
4296
4297 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4298
4299 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
4300 (nds32_output_stack_pop): Refine.
4301 (nds32_expand_unaligned_load): Refine.
4302 (nds32_expand_unaligned_store): Refine.
4303
4304 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4305 Chung-Ju Wu <jasonwucj@gmail.com>
4306
4307 * config/nds32/constants.md: Add TP_REGNUM constant.
4308 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
4309 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
4310 UNSPEC_ADD32.
4311 * config/nds32/nds32-doubleword.md: Consider flag_pic.
4312 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
4313 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
4314 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
4315 and PIC code generation.
4316 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
4317 code generation.
4318 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
4319 optimization.
4320 * config/nds32/nds32.md: Support TLS and PIC.
4321 * config/nds32/nds32.c: Support TLS and PIC.
4322 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
4323 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
4324 predicate.
4325
4326 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4327
4328 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
4329 mode with E_ prefix.
4330
4331 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4332 Chung-Ju Wu <jasonwucj@gmail.com>
4333
4334 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
4335 * config/nds32/nds32-md-auxiliary.c
4336 (symbolic_reference_mentioned_p): New.
4337 (nds32_legitimize_ict_address): New.
4338 (nds32_expand_ict_move): New.
4339 (nds32_indirect_call_referenced_p): New.
4340 (nds32_symbol_binds_local_p): Delete.
4341 (nds32_long_call_p): Modify.
4342 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
4343 * config/nds32/nds32-protos.h
4344 (symbolic_reference_mentioned_p): Declare.
4345 (nds32_legitimize_ict_address): Declare.
4346 (nds32_expand_ict_move): Declare.
4347 (nds32_indirect_call_referenced_p): Declare.
4348 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
4349 (nds32_relax_group): Use nds32_ict_const_p as condition.
4350 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
4351 (nds32_asm_file_start): Output ict_model directive in asm code.
4352 (nds32_legitimate_address_p): Consider indirect call.
4353 (nds32_print_operand): Consider indirect call.
4354 (nds32_print_operand_address): Consider indirect call.
4355 (nds32_insert_attributes): Handle "indirect_call" attribute.
4356 (TARGET_LEGITIMATE_ADDRESS_P): Define.
4357 (TARGET_LEGITIMATE_CONSTANT_P): Define.
4358 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
4359 (TARGET_DELEGITIMIZE_ADDRESS): Define.
4360 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
4361 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
4362 (TARGET_ICT_MODEL_SMALL): Define.
4363 (TARGET_ICT_MODEL_LARGE): Define.
4364 * config/nds32/nds32.md (movsi): Consider ict model.
4365 (call, call_value): Consider ict model.
4366 (sibcall, sibcall_value): Consider ict model.
4367 * config/nds32/nds32.opt (mict-model): New option.
4368 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
4369 model.
4370
4371 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
4372 Monk Chiang <sh.chiang04@gmail.com>
4373 Jim Wilson <jimw@sifive.com>
4374
4375 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
4376 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
4377 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
4378 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
4379 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
4380 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
4381 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
4382 compute save_libcall_adjustment properly.
4383 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
4384 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
4385 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
4386 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
4387 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
4388 (ABI_SPEC): Handle mabi=ilp32e.
4389 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
4390 (RVE): Add RVE mask.
4391 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
4392 <-march>: Add rv32e as an example.
4393
4394 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
4395
4396 PR c++/82899
4397 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
4398 (intra_create_variable_infos): Handle C++ constructors.
4399
4400 2018-05-18 Martin Liska <mliska@suse.cz>
4401
4402 * passes.def: Remove a redundant pass.
4403
4404 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
4405
4406 PR bootstrap/85838
4407 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
4408
4409 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4410
4411 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
4412 (ARMv4): Update.
4413 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
4414 (ARMv6m): Update.
4415 (armv2, armv2a, armv3, armv3m): Delete architectures.
4416 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
4417 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
4418 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
4419 Delete cpus.
4420 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
4421 (*mulsidi3adddi): Likewise.
4422 (mulsidi3): Likewise.
4423 (*mulsidi3_nov6): Likewise.
4424 (umulsidi3): Likewise.
4425 (umulsidi3_nov6): Likewise.
4426 (umaddsidi4): Likewise.
4427 (*umulsidi3adddi): Likewise.
4428 (smulsi3_highpart): Likewise.
4429 (*smulsi3_highpart_nov6): Likewise.
4430 (umulsi3_highpart): Likewise.
4431 (*umulsi3_highpart_nov6): Likewise.
4432 * config/arm/arm.h (arm_arch3m): Delete.
4433 * config/arm/arm.c (arm_arch3m): Delete.
4434 (arm_option_override_internal): Update armv3-related comment.
4435 (arm_configure_build_target): Delete use of isa_bit_mode32.
4436 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
4437 (arm_rtx_costs_internal): Delete check of arm_arch3m.
4438 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
4439 (mulsa3): Likewise.
4440 (mulusa3): Likewise.
4441 * config/arm/arm-protos.h (arm_arch3m): Delete.
4442 * config/arm/arm-tables.opt: Regenerate.
4443 * config/arm/arm-tune.md: Likewise.
4444 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
4445 deleted architectures.
4446
4447 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4448
4449 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
4450 (armv5t, armv5te): New features.
4451 (ARMv5, ARMv5e): Delete fgroups.
4452 (ARMv5t, ARMv5te): Adjust for above changes.
4453 (ARMv6m): Likewise.
4454 (armv5, armv5e): Delete arches.
4455 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
4456 arm_arch5.
4457 (*call_reg_arm): Likewise.
4458 (*call_value_reg_armv5): Likewise.
4459 (*call_value_reg_arm): Likewise.
4460 (*call_symbol): Likewise.
4461 (*call_value_symbol): Likewise.
4462 (*sibcall_insn): Likewise.
4463 (*sibcall_value_insn): Likewise.
4464 (clzsi2): Likewise.
4465 (prefetch): Likewise.
4466 (define_split and define_peephole2 dependent on arm_arch5):
4467 Likewise.
4468 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
4469 arm_arch5e.
4470 (TARGET_ARM_QBIT): Likewise.
4471 (TARGET_DSP_MULTIPLY): Likewise.
4472 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
4473 (arm_arch5, arm_arch5e): Delete.
4474 (arm_arch5t, arm_arch5te): Declare.
4475 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
4476 (arm_arch5t): Declare.
4477 (arm_option_reconfigure_globals): Update for the above.
4478 (arm_options_perform_arch_sanity_checks): Update comment, replace
4479 use of arm_arch5 with arm_arch5t.
4480 (use_return_insn): Likewise.
4481 (arm_emit_call_insn): Likewise.
4482 (output_return_instruction): Likewise.
4483 (arm_final_prescan_insn): Likewise.
4484 (arm_coproc_builtin_available): Likewise.
4485 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
4486 arm_arch5e with arm_arch5t and arm_arch5te.
4487 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
4488 (arm_arch5t, arm_arch5te): Declare.
4489 * config/arm/arm-tables.opt: Regenerate.
4490 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
4491 * config/arm/t-multilib: Likewise.
4492 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
4493 instead of arm_arch5.
4494 (*call_reg_thumb1): Likewise.
4495 (*call_value_reg_thumb1_v5): Likewise.
4496 (*call_value_reg_thumb1): Likewise.
4497 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
4498 unreachable path.
4499 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
4500
4501 2018-05-18 Martin Liska <mliska@suse.cz>
4502
4503 PR gcov-profile/84846
4504 * doc/gcov.texi: Document -t option of gcov tool.
4505
4506 2018-05-18 Martin Liska <mliska@suse.cz>
4507
4508 PR gcov-profile/84846
4509 * gcov.c (print_usage): Add new -t option.
4510 (process_args): Handle the option.
4511 (generate_results): Use stdout as output when requested by
4512 the option.
4513
4514 2018-05-18 Martin Liska <mliska@suse.cz>
4515
4516 PR gcov-profile/84846
4517 * coverage.c (coverage_init): Write PWD to .gcno file.
4518 * doc/gcov.texi: Document how working directory is printed.
4519 * gcov-dump.c (dump_gcov_file): Print PWD.
4520 * gcov.c (output_intermediate_file): Likewise.
4521 (read_graph_file): Read PWD string.
4522 (output_lines): Print PWD.
4523
4524 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4525
4526 PR middle-end/85817
4527 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
4528 for retval and return false if all args to phi are zero.
4529
4530 2018-05-18 Richard Biener <rguenther@suse.de>
4531
4532 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
4533 method.
4534 (evrp_dom_walker::before_dom_children): Call it.
4535
4536 2018-05-18 Richard Biener <rguenther@suse.de>
4537
4538 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
4539 results when processing array refs with variable index.
4540
4541 2018-05-18 Toon Moene <toon@moene.org>
4542
4543 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4544 directly after that of -floop-interchange. Indicate that both
4545 options are enabled by default when specifying -O3.
4546
4547 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4548
4549 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
4550 iterator. Delete separate integer-mode vec_set<mode> expander.
4551 (aarch64_simd_vec_setv2di): Delete.
4552 (vec_setv2di): Delete.
4553 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
4554 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
4555 the "w, r" alternative.
4556
4557 2018-05-18 Martin Liska <mliska@suse.cz>
4558
4559 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
4560 * tree-pass.h (make_pass_lower_switch_O0): New function.
4561 * tree-switch-conversion.c (node_has_low_bound): Remove.
4562 (node_has_high_bound): Likewise.
4563 (node_is_bounded): Likewise.
4564 (class pass_lower_switch): Make it a template type and create
4565 two instances.
4566 (pass_lower_switch::execute): Add template argument.
4567 (make_pass_lower_switch): New function.
4568 (make_pass_lower_switch_O0): New function.
4569 (do_jump_if_equal): Remove.
4570 (emit_case_nodes): Simplify to just handle all 3 cases and leave
4571 all the hard work to tree optimization passes.
4572
4573 2018-05-18 Martin Liska <mliska@suse.cz>
4574
4575 * dbgcnt.c (limit_low): Renamed from limit.
4576 (limit_high): New variable.
4577 (dbg_cnt_is_enabled): Check for upper limit.
4578 (dbg_cnt): Adjust dumping.
4579 (dbg_cnt_set_limit_by_index): Add new argument for high
4580 value.
4581 (dbg_cnt_set_limit_by_name): Likewise.
4582 (dbg_cnt_process_single_pair): Parse new format.
4583 (dbg_cnt_process_opt): Use strtok.
4584 (dbg_cnt_list_all_counters): Remove 'value' and add
4585 'limit_high'.
4586 * doc/invoke.texi: Document changes.
4587
4588 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
4589
4590 * doc/sourcebuild.texi (scalar_all_fma): Document.
4591 * tree.def (FMA_EXPR): Delete.
4592 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
4593 * internal-fn.c (ternary_direct): New macro.
4594 (expand_ternary_optab_fn): Likewise.
4595 (direct_ternary_optab_supported_p): Likewise.
4596 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
4597 * builtins.c (fold_builtin_fma): Delete.
4598 (fold_builtin_3): Don't call it.
4599 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
4600 * expr.c (expand_expr_real_2): Likewise.
4601 * fold-const.c (operand_equal_p): Likewise.
4602 (fold_ternary_loc): Likewise.
4603 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
4604 * gimple.c (DEFTREECODE): Likewise.
4605 * gimplify.c (gimplify_expr): Likewise.
4606 * optabs-tree.c (optab_for_tree_code): Likewise.
4607 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
4608 * tree-eh.c (operation_could_trap_p): Likewise.
4609 (stmt_could_throw_1_p): Likewise.
4610 * tree-inline.c (estimate_operator_cost): Likewise.
4611 * tree-pretty-print.c (dump_generic_node): Likewise.
4612 (op_code_prio): Likewise.
4613 * tree-ssa-loop-im.c (stmt_cost): Likewise.
4614 * tree-ssa-operands.c (get_expr_operands): Likewise.
4615 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
4616 * fold-const-call.h (fold_fma): Delete.
4617 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
4618 CFN_FNMA and CFN_FNMS.
4619 (fold_fma): Delete.
4620 * genmatch.c (combined_fn): New enum.
4621 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
4622 (commutative_op): New function.
4623 (commutate): Use it. Handle more than 2 operands.
4624 (dt_operand::gen_gimple_expr): Use commutative_op.
4625 (parser::parse_expr): Allow :c to be used with non-binary
4626 operators if the commutative operand is known.
4627 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
4628 CFN_FMS, CFN_FNMA and CFN_FNMS.
4629 (backprop::process_assign_use): Remove FMA_EXPR handling.
4630 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
4631 (gen_hsa_fma): New function.
4632 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
4633 IFN_FNMA and IFN_FNMS.
4634 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
4635 * gimple-fold.h (follow_all_ssa_edges): Declare.
4636 * gimple-fold.c (follow_all_ssa_edges): New function.
4637 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
4638 gimple_build interface and use follow_all_ssa_edges to fold the result.
4639 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
4640 instead of checking for optabs directly.
4641 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
4642 rather than FMA_EXPRs.
4643 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
4644 call to IFN_FMA instead of an FMA_EXPR.
4645
4646 2018-05-17 Jim Wilson <jimw@sifive.com>
4647
4648 * expr.c (do_tablejump): When converting index to Pmode, if we have a
4649 sign extended promoted subreg, and the range does not have the sign bit
4650 set, then do a sign extend.
4651
4652 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
4653 test, check for sign extended subreg and/or constant operands, and
4654 do a sign extend in that case.
4655
4656 2018-05-17 Steve Ellcey <sellcey@cavium.com>
4657
4658 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
4659 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
4660 Add untyped.
4661 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
4662 Change logics_shift_reg to logics_shift_imm.
4663 (thunderx2t99_fp_loadpair_basic): Delete.
4664 (thunderx2t99_fp_storepair_basic): Delete.
4665 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
4666 (thunderx2t99_asimd_polynomial): Delete.
4667 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
4668 and neon_fp_mul_d_scalar_q.
4669 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
4670 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
4671 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
4672 (thunderx2t99_asimd_lut): Add missing tbl types.
4673 (thunderx2t99_asimd_ext): Delete.
4674 (thunderx2t99_asimd_load1_1_mult): Delete.
4675 (thunderx2t99_asimd_load1_2_mult): Delete.
4676 (thunderx2t99_asimd_load1_ldp): New.
4677 (thunderx2t99_asimd_load1): New.
4678 (thunderx2t99_asimd_load2): Add missing *load2* types.
4679 (thunderx2t99_asimd_load3): New.
4680 (thunderx2t99_asimd_load4): New.
4681 (thunderx2t99_asimd_store1_1_mult): Delete.
4682 (thunderx2t99_asimd_store1_2_mult): Delete.
4683 (thunderx2t99_asimd_store2_mult): Delete.
4684 (thunderx2t99_asimd_store2_onelane): Delete.
4685 (thunderx2t99_asimd_store_stp): New.
4686 (thunderx2t99_asimd_store1): New.
4687 (thunderx2t99_asimd_store2): New.
4688 (thunderx2t99_asimd_store3): New.
4689 (thunderx2t99_asimd_store4): New.
4690
4691 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
4692
4693 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
4694 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
4695
4696 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
4697 Segher Boessenkool <segher@kernel.crashing.org>
4698
4699 PR target/85698
4700 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
4701 operand.
4702
4703 2018-05-17 Richard Biener <rguenther@suse.de>
4704
4705 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
4706 for pruning loop and prune defs feeding only already visited PHIs.
4707
4708 2018-05-17 Richard Biener <rguenther@suse.de>
4709
4710 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
4711
4712 2018-05-17 Bin Cheng <bin.cheng@arm.com>
4713 Richard Biener <rguenther@suse.de>
4714
4715 PR tree-optimization/85793
4716 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
4717 for VMAT_ELEMENTWISE.
4718
4719 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4720
4721 * internal-fn.h (lookup_internal_fn): Declare
4722 * internal-fn.c (lookup_internal_fn): New function.
4723 * gimple.c (gimple_build_call_from_tree): Handle calls to
4724 internal functions.
4725 * gimple-pretty-print.c (dump_gimple_call): Print "." before
4726 internal function names.
4727 * tree-pretty-print.c (dump_generic_node): Likewise.
4728 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
4729
4730 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4731
4732 * gimple-fold.h (gimple_build): Make the function forms take
4733 combined_fn rather than built_in_function.
4734 (gimple_simplify): Likewise.
4735 * gimple-match-head.c (gimple_simplify): Likewise.
4736 * gimple-fold.c (gimple_build): Likewise.
4737 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
4738 rather than gimple_build_call_internal.
4739 (get_initial_defs_for_reduction): Likewise.
4740 (vect_create_epilog_for_reduction): Likewise.
4741 (vectorizable_live_operation): Likewise.
4742
4743 2018-05-17 Martin Liska <mliska@suse.cz>
4744
4745 * gimple-ssa-sprintf.c (format_directive): Do not use
4746 space in between 'G_' and '('.
4747
4748 2018-05-17 Jakub Jelinek <jakub@redhat.com>
4749
4750 PR target/85323
4751 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
4752 even if the mask is not all ones.
4753
4754 PR target/85323
4755 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
4756 vector.
4757 (ix86_gimple_fold_builtin): Likewise.
4758
4759 PR target/85323
4760 * config/i386/i386.c: Include tree-vector-builder.h.
4761 (ix86_vector_shift_count): New function.
4762 (ix86_fold_builtin): Fold shift builtins by scalar count.
4763 (ix86_gimple_fold_builtin): Likewise.
4764
4765 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
4766 _mm512_setzero): New intrinsics.
4767
4768 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4769 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4770
4771 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
4772 code generation for cases where splatting a value is not useful.
4773 * simplify-rtx.c (simplify_ternary_operation): Simplify
4774 vec_merge across a vec_duplicate and a paradoxical subreg forming
4775 a vector mode to a vec_concat.
4776
4777 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
4778
4779 * config.gcc: Support "goldmont-plus".
4780 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4781 "goldmont-plus".
4782 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4783 PROCESSOR_GOLDMONT_PLUS.
4784 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
4785 (processor_target_table): Add "goldmont-plus".
4786 (PTA_GOLDMONT_PLUS): Define.
4787 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
4788 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
4789 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
4790 (fold_builtin_cpu): Add "goldmont-plus".
4791 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
4792 (ix86_option_override_internal): Add "goldmont-plus".
4793 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
4794 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
4795 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
4796 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
4797
4798 2018-05-17 Richard Biener <rguenther@suse.de>
4799
4800 PR tree-optimization/85757
4801 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
4802 remove defs that only feed that PHI from further processing.
4803
4804 2018-05-16 Jim Wilson <jimw@sifive.com>
4805
4806 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
4807 asterisk to name.
4808 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
4809
4810 2018-05-16 Mark Wielaard <mark@klomp.org>
4811
4812 * dwarf2out.c (count_index_strings): New function.
4813 (output_indirect_strings): Call count_index_strings and generate
4814 header for dwarf_version >= 5.
4815
4816 2018-05-16 Mark Wielaard <mark@klomp.org>
4817
4818 * dwarf2out.c (dwarf_FORM): New function.
4819 (set_indirect_string): Use dwarf_FORM.
4820 (reset_indirect_string): Likewise.
4821 (size_of_die): Likewise.
4822 (value_format): Likewise.
4823 (output_die): Likewise.
4824 (add_skeleton_AT_string): Likewise.
4825 (output_macinfo_op): Likewise.
4826 (index_string): Likewise.
4827 (output_index_string_offset): Likewise.
4828 (output_index_string): Likewise.
4829 (count_index_strings): Likewise.
4830
4831 2018-05-16 Carl Love <cel@us.ibm.com>
4832
4833 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
4834 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
4835
4836 2018-05-16 Martin Jambor <mjambor@suse.cz>
4837
4838 * ipa-prop.c (ipa_free_all_edge_args): Remove.
4839 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
4840
4841 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
4842
4843 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
4844 (fnma<mode>4): Likewise.
4845 (fms<mode>4): Likewise.
4846 (fnms<mode>4): Likewise.
4847 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
4848 (aarch64_fnma<mode>4): Likewise.
4849 (aarch64_fms<mode>4): Likewise.
4850 (aarch64_fnms<mode>4): Likewise.
4851 (aarch64_fnmadd<mode>4): Likewise.
4852
4853 2018-05-16 Jason Merrill <jason@redhat.com>
4854
4855 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
4856
4857 2018-05-16 Richard Biener <rguenther@suse.de>
4858
4859 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
4860 (dump_stmt_cost): Declare.
4861 (add_stmt_cost): Dump cost we add.
4862 (add_stmt_costs): New function.
4863 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
4864 No longer exported.
4865 (vect_analyze_stmt): Adjust prototype.
4866 (vectorizable_condition): Likewise.
4867 (vectorizable_live_operation): Likewise.
4868 (vectorizable_reduction): Likewise.
4869 (vectorizable_induction): Likewise.
4870 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
4871 cost vector to pass to vectorizable_ and record afterwards.
4872 (vect_model_reduction_cost): Take cost vector argument and adjust.
4873 (vect_model_induction_cost): Likewise.
4874 (vectorizable_reduction): Likewise.
4875 (vectorizable_induction): Likewise.
4876 (vectorizable_live_operation): Likewise.
4877 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
4878 SLP_TREE_NUMBER_OF_VEC_STMTS.
4879 (vect_analyze_slp_cost_1): Remove.
4880 (vect_analyze_slp_cost): Likewise.
4881 (vect_slp_analyze_node_operations): Take visited args and
4882 a target cost vector. Avoid processing already visited stmt sets.
4883 (vect_slp_analyze_operations): Use a local cost vector to gather
4884 costs and register those of non-discarded instances.
4885 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
4886 (vect_schedule_slp_instance): Remove copying of
4887 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
4888 zero.
4889 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
4890 adding cost. Record cost entry location.
4891 (vect_prologue_cost_for_slp_op): Function to compute cost of
4892 a constant or invariant generated for SLP vect in the prologue,
4893 split out from vect_analyze_slp_cost_1.
4894 (vect_model_simple_cost): Make static. Adjust for SLP costing.
4895 (vect_model_promotion_demotion_cost): Likewise.
4896 (vect_model_store_cost): Likewise, make static.
4897 (vect_model_load_cost): Likewise.
4898 (vectorizable_bswap): Add cost vector arg and adjust.
4899 (vectorizable_call): Likewise.
4900 (vectorizable_simd_clone_call): Likewise.
4901 (vectorizable_conversion): Likewise.
4902 (vectorizable_assignment): Likewise.
4903 (vectorizable_shift): Likewise.
4904 (vectorizable_operation): Likewise.
4905 (vectorizable_store): Likewise.
4906 (vectorizable_load): Likewise.
4907 (vectorizable_condition): Likewise.
4908 (vectorizable_comparison): Likewise.
4909 (can_vectorize_live_stmts): Likewise.
4910 (vect_analyze_stmt): Likewise.
4911 (vect_transform_stmt): Adjust calls to vectorizable_*.
4912 * tree-vectorizer.c: Include gimple-pretty-print.h.
4913 (dump_stmt_cost): New function.
4914
4915 2018-05-16 Richard Biener <rguenther@suse.de>
4916
4917 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
4918 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
4919 * tree-ssa-dse.c: Include tree-ssa-loop.h.
4920 (check_name): New callback.
4921 (dse_classify_store): Track cycles via a visited bitmap of PHI
4922 defs and simplify handling of in-loop and across loop dead stores
4923 and properly fail for loop-variant refs. Handle byte-tracking with
4924 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
4925 limiting the walk.
4926
4927 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
4928
4929 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
4930 (vect_get_mask_type_for_stmt): Likewise.
4931 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
4932 split out from...
4933 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
4934 to determine the statement's vector type and the vector type that
4935 should be used for calculating nunits. Deal with cases in which
4936 the type has to be deferred.
4937 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
4938 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
4939 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
4940 (vect_determine_vf_for_stmt): New functions, split out from...
4941 (vect_determine_vectorization_factor): ...here.
4942 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
4943 (vect_get_mask_type_for_stmt): New functions, split out from
4944 vect_determine_vectorization_factor.
4945
4946 2018-05-16 Richard Biener <rguenther@suse.de>
4947
4948 * tree-cfg.c (verify_gimple_assign_ternary): Properly
4949 verify the [VEC_]COND_EXPR embedded comparison.
4950
4951 2018-05-15 Martin Sebor <msebor@redhat.com>
4952
4953 PR tree-optimization/85753
4954 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
4955 RECORD_TYPE in addition to ARRAY_TYPE.
4956
4957 2018-05-15 Martin Sebor <msebor@redhat.com>
4958
4959 PR middle-end/85643
4960 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
4961
4962 2018-05-15 Richard Biener <rguenther@suse.de>
4963
4964 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
4965 add by_clobber_p one. Change algorithm to collect all defs
4966 representing uses we need to walk and try reducing them to
4967 a single one before failing.
4968 (dse_dom_walker::dse_optimize_stmt): Adjust.
4969
4970 2018-05-13 Mark Wielaard <mark@klomp.org>
4971
4972 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
4973 (size_of_loc_descr): Likewise.
4974 (output_loc_operands): Likewise.
4975 (output_loc_operands_raw): Likewise.
4976 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
4977 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
4978 (hash_loc_operands): Likewise.
4979 (compare_loc_operands): Likewise.
4980
4981 2018-05-14 Mark Wielaard <mark@klomp.org>
4982
4983 * dwarf2out.c (count_index_addrs): New function.
4984 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
4985
4986 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4987
4988 PR tree-optimization/83648
4989 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
4990 return value as malloc candidate.
4991
4992 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4993
4994 PR ipa/85734
4995 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
4996 param as true in call to suggest_attribute.
4997
4998 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
4999
5000 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
5001 -mreadonly-in-sdata.
5002
5003 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5004
5005 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
5006 New pattern.
5007 (aarch64_crypto_aesd_fused): Likewise.
5008
5009 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
5010
5011 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
5012 (movsi_aarch64): Likewise.
5013 (load_pairsi): Likewise.
5014 (load_pairdi): Likewise.
5015 (store_pairsi): Likewise.
5016 (store_pairdi): Likewise.
5017 (load_pairsf): Likewise.
5018 (load_pairdf): Likewise.
5019 (store_pairsf): Likewise.
5020 (store_pairdf): Likewise.
5021 (zero_extend): Likewise.
5022 (trunc): Swap alternatives.
5023 (fcvt_target): Add '?' to prefer w over r.
5024
5025 2018-05-14 Jakub Jelinek <jakub@redhat.com>
5026
5027 PR target/85756
5028 * config/i386/i386.md: Disallow non-commutative arithmetics in
5029 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
5030 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
5031 in the peephole2 before it.
5032
5033 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
5034
5035 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
5036 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
5037 (ix86_handle_option): Handle -mcldemote.
5038 * config.gcc: New header.
5039 * config/i386/cldemoteintrin.h: New file.
5040 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
5041 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5042 -mcldemote.
5043 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5044 OPTION_MASK_ISA_CLDEMOTE.
5045 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
5046 (ix86_valid_target_attribute_inner_p): Ditto.
5047 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
5048 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
5049 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
5050 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
5051 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
5052 (cldemote): New.
5053 * config/i386/i386.opt: Add -mcldemote.
5054 * config/i386/x86intrin.h: New header.
5055 * doc/invoke.texi: Add -mcldemote.
5056
5057 2018-05-14 Richard Biener <rguenther@suse.de>
5058
5059 * doc/match-and-simplify.texi: Adjust :s documentation.
5060
5061 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
5062
5063 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
5064 intended memcpy size.
5065 (REORDER_45): Likewise.
5066
5067 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
5068
5069 * sort.cc: New file.
5070 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
5071 * vec.c (qsort_chk): Use gcc_qsort.
5072 * Makefile.in (OBJS-libcommon): Add sort.o.
5073 (build/sort.o): New target. Use it...
5074 (BUILD_RTL): ... here, and...
5075 (build/gencfn-macros): ... here, and...
5076 (build/genmatch): ... here.
5077
5078 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
5079 Chung-Ju Wu <jasonwucj@gmail.com>
5080
5081 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
5082 * config/nds32/nds32-graywolf.md: New file.
5083 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
5084 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
5085 pipeline.
5086 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
5087 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
5088 * config/nds32/nds32.md (pipeline_model): Add graywolf.
5089 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
5090 * config/nds32/pipelines.md: Include n15 settings.
5091
5092 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
5093 Chung-Ju Wu <jasonwucj@gmail.com>
5094
5095 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
5096 * config/nds32/nds32-n13.md: New file.
5097 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
5098 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
5099 pipeline.
5100 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
5101 * config/nds32/nds32.md (pipeline_model): Add n13.
5102 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
5103 * config/nds32/pipelines.md: Include n13 settings.
5104
5105 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
5106 Chung-Ju Wu <jasonwucj@gmail.com>
5107
5108 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
5109 * config/nds32/nds32-n10.md: New file.
5110 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
5111 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
5112 pipeline.
5113 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
5114 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
5115 * config/nds32/nds32.md (pipeline_model): Add n10.
5116 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
5117 * config/nds32/pipelines.md: Include n10 settings.
5118
5119 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
5120 Kito Cheng <kito.cheng@gmail.com>
5121 Chung-Ju Wu <jasonwucj@gmail.com>
5122
5123 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
5124 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5125 Add enum values for DSP extension instructions.
5126 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
5127 New constraints.
5128 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
5129 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
5130 New code iterators.
5131 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
5132 * config/nds32/nds32-dspext.md: New file for DSP implementation.
5133 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
5134 * config/nds32/nds32-intrinsic.md: Likewise.
5135 * config/nds32/nds32_intrinsic.h: Likewise.
5136 * config/nds32/nds32-md-auxiliary.c: Likewise.
5137 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
5138 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
5139 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
5140 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
5141 * config/nds32/nds32-protos.h: New declarations for DSP extension.
5142 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
5143 TYPE_DMAC in switch statement.
5144 * config/nds32/nds32.c: New checking and implementation for DSP
5145 extension instructions.
5146 * config/nds32/nds32.h: Likewise.
5147 * config/nds32/nds32.md: Likewise.
5148 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
5149 * config/nds32/predicates.md: Implement new predicates for DSP
5150 extension.
5151
5152 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
5153
5154 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
5155 Reformat alternatives and attributes so it is easier to identify
5156 which constraints/attributes go with which instruction.
5157 (mov<mode>_hardfloat32, FMOVE64): Likewise.
5158 (mov<mode>_softfloat32, FMOVE64): Likewise.
5159 (mov<mode>_hardfloat64, FMOVE64): Likewise.
5160 (mov<mode>_softfloat64, FMOVE64): Likewise.
5161
5162 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
5163
5164 * doc/extend.texi (PowerPC Built-in Functions): Rename this
5165 subsection.
5166 (Basic PowerPC Built-in Functions): The new name of the
5167 subsection previously known as "PowerPC Built-in Functions".
5168 (Basic PowerPC Built-in Functions Available on all Configurations):
5169 New subsubsection.
5170 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
5171 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
5172 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
5173 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
5174
5175 2018-05-11 Martin Jambor <mjambor@suse.cz>
5176
5177 PR ipa/85655
5178 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
5179 single const.
5180
5181 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
5182
5183 PR target/85733
5184 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
5185
5186 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
5187
5188 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
5189 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
5190 (ix86_handle_option): Handle -mwaitpkg.
5191 * config.gcc: New header.
5192 * config/i386/cpuid.h (bit_WAITPKG): New bit.
5193 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
5194 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
5195 function type.
5196 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5197 OPTION_MASK_ISA_WAITPKG.
5198 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
5199 (ix86_option_override_internal): Add PTA_WAITPKG.
5200 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
5201 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
5202 IX86_BUILTIN_TPAUSE.
5203 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
5204 __builtin_ia32_umwait and __builtin_ia32_tpause.
5205 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
5206 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
5207 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
5208 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
5209 UNSPECV_TPAUSE): New.
5210 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
5211 * config/i386/i386.opt: Add -mwaitpkg.
5212 * config/i386/waitpkgintrin.h: New file.
5213 * config/i386/x86intrin.h: New header.
5214 * doc/invoke.texi: Add -mwaitpkg.
5215
5216 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
5217
5218 PR target/85606
5219 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
5220 equivalent.
5221 (cortex-m0): Use armv6s-m isa.
5222 (cortex-m0plus): Likewise.
5223 (cortex-m1): Likewise.
5224 (cortex-m0.small-multiply): Likewise.
5225 (cortex-m0plus.small-multiply): Likewise.
5226 (cortex-m1.small-multiply): Likewise.
5227
5228 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
5229 Jakub Jelinek <jakub@redhat.com>
5230
5231 PR tree-optimization/85692
5232 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
5233 source permute as well.
5234
5235 2018-05-11 Martin Liska <mliska@suse.cz>
5236
5237 PR sanitizer/85556
5238 * doc/extend.texi: Document LLVM style format for no_sanitize
5239 attribute.
5240
5241 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
5242
5243 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
5244 mode_supports_vsx_dform_quad to mode_supports_dq_form.
5245 (mode_supports_vsx_dform_quad): Likewise.
5246 (mode_supports_vmx_dform): Move these functions to be next to the
5247 other mode_supports functions.
5248 (mode_supports_dq_form): Likewise.
5249 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
5250 mode_supports_dq_form.
5251 (reg_offset_addressing_ok_p): Likewise.
5252 (offsettable_ok_by_alignment): Likewise.
5253 (rs6000_legitimate_offset_address_p): Likewise.
5254 (legitimate_lo_sum_address_p): Likewise.
5255 (rs6000_legitimize_address): Likewise.
5256 (rs6000_legitimize_reload_address): Likewise.
5257 (rs6000_secondary_reload_inner): Likewise.
5258 (rs6000_preferred_reload_class): Likewise.
5259 (rs6000_output_move_128bit): Likewise.
5260
5261 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
5262
5263 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
5264 Generate SImode target register for null target.
5265 <case IX86_BUILTIN_XGETBV>: Ditto.
5266 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
5267 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
5268
5269 2018-05-10 Carl Love <cel@us.ibm.com>
5270
5271 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5272 dcbtt and dcbtstt if operands[2] is 0.
5273
5274 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
5275
5276 PR target/85693
5277 * config/i386/sse.md (usadv64qi): New expander.
5278
5279 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
5280
5281 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
5282 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
5283 -maltivec=be support.
5284 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
5285 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
5286 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
5287 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
5288 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
5289 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
5290 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
5291 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
5292 altivec_vsumsws): Adjust.
5293 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
5294 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
5295 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
5296 support.
5297 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
5298 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
5299 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
5300 (altivec_lve<VI_char>x): Delete expand.
5301 (*altivec_lve<VI_char>x_internal): Rename to...
5302 (altivec_lve<VI_char>x): ... this.
5303 (altivec_lvxl_<mode>): Delete expand.
5304 (*altivec_lvxl_<mode>_internal): Rename to ...
5305 (altivec_lvxl_<mode>): ... this.
5306 (altivec_stvxl_<mode>): Delete expand.
5307 (*altivec_stvxl_<mode>_internal): Rename to ...
5308 (altivec_stvxl_<mode>): ... this.
5309 (altivec_stve<VI_char>x): Delete expand.
5310 (*altivec_stve<VI_char>x_internal): Rename to ...
5311 (altivec_stve<VI_char>x): ... this.
5312 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
5313 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
5314 reduc_plus_scal_<mode>): Adjust.
5315 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
5316 comment.
5317 (rs6000_cpu_cpp_builtins): Adjust.
5318 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
5319 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
5320 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
5321 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
5322 -maltivec=be support.
5323 (rs6000_split_vec_extract_var): Adjust.
5324 (rs6000_split_v4si_init): Adjust.
5325 (swap_selector_for_mode): Delete.
5326 (altivec_expand_lvx_be, altivec_expand_stvx_be,
5327 altivec_expand_stvex_be): Delete.
5328 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
5329 -maltivec=be support.
5330 (rs6000_gimple_fold_builtin): Ditto.
5331 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
5332 Adjust.
5333 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
5334 (TARGET_DIRECT_MOVE_64BIT): Adjust.
5335 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
5336 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
5337 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
5338 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
5339 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
5340 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
5341 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
5342 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
5343 anonymous split): Adjust.
5344 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
5345 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
5346
5347 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5348
5349 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
5350 when --with-gxx-include-dir is also specified.
5351 * configure: Regenerate.
5352
5353 2018-05-09 Jim Wilson <jimw@sifive.com>
5354
5355 PR target/84797
5356 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
5357 * config/riscv/t-withmultilib: New.
5358 * config/riscv/withmultilib.h: New.
5359 * doc/install.texi: Document RISC-V --with-multilib-list support.
5360
5361 2018-05-09 Richard Biener <rguenther@suse.de>
5362
5363 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
5364 vector.
5365 (vect_bb_vectorization_profitable_p): Adjust. Compute
5366 actual scalar cost using the cost vector and the add_stmt_cost
5367 machinery.
5368
5369 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
5370
5371 PR rtl-optimization/85645
5372 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
5373 in the REG_CFA_REGISTER note for LR, don't leave it empty.
5374
5375 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
5376
5377 PR rtl-optimization/85645
5378 * shrink-wrap.c (spread_components): Return a boolean saying if
5379 anything was changed.
5380 (try_shrink_wrapping_separate): Iterate spread_components until
5381 nothing changes anymore.
5382
5383 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
5384
5385 PR rtl-optimization/85645
5386 * regrename.c (build_def_use): Also kill the chains that include the
5387 destination of a REG_CFA_REGISTER note.
5388
5389 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
5390
5391 PR rtl-optimization/85645
5392 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
5393 insn that has a REG_CFA_REGISTER note.
5394
5395 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
5396
5397 * cfgexpand.c (expand_clobber): New function.
5398 (expand_gimple_stmt_1): Use it.
5399 * tree-vect-stmts.c (vect_clobber_variable): New function,
5400 split out from...
5401 (vectorizable_simd_clone_call): ...here.
5402 (vectorizable_store): Emit a clobber either side of an
5403 IFN_STORE_LANES sequence.
5404 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
5405
5406 2018-05-09 Tom de Vries <tom@codesourcery.com>
5407
5408 PR target/85626
5409 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
5410 (define_insn "trap_if_false"): Add exit after trap.
5411
5412 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
5413
5414 PR rtl-optimization/85638
5415 * bb-reorder.c: Include common/common-target.h.
5416 (create_forwarder_block): New function extracted from...
5417 (fix_up_crossing_landing_pad): ...here. Rename into...
5418 (dw2_fix_up_crossing_landing_pad): ...this.
5419 (sjlj_fix_up_crossing_landing_pad): New function.
5420 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
5421 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
5422 from both partitions and exit the loop after one iteration.
5423
5424 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
5425
5426 Revert:
5427 * doc/extend.texi (PowerPC Built-in Functions): Rename this
5428 subsection.
5429 (Basic PowerPC Built-in Functions): The new name of the
5430 subsection previously known as "PowerPC Built-in Functions".
5431 (Basic PowerPC Built-in Functions Available on all Configurations):
5432 New subsubsection.
5433 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5434 subsubsection.
5435 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5436 subsubsection.
5437 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5438 subsubsection.
5439 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5440 subsubsection.
5441
5442 2018-05-08 Jim Wilson <jimw@sifive.com>
5443
5444 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
5445 (LD_EMUL_SUFFIX): New.
5446 (LINK_SPEC): Use it.
5447
5448 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
5449
5450 * doc/extend.texi (PowerPC Built-in Functions): Rename this
5451 subsection.
5452 (Basic PowerPC Built-in Functions): The new name of the
5453 subsection previously known as "PowerPC Built-in Functions".
5454 (Basic PowerPC Built-in Functions Available on all Configurations):
5455 New subsubsection.
5456 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5457 subsubsection.
5458 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5459 subsubsection.
5460 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5461 subsubsection.
5462 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5463 subsubsection.
5464
5465 2018-05-08 Jakub Jelinek <jakub@redhat.com>
5466
5467 PR target/85683
5468 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
5469 after cmpelim optimization.
5470
5471 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
5472
5473 * config.gcc: Support "goldmont".
5474 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
5475 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5476 PROCESSOR_GOLDMONT.
5477 * config/i386/i386.c (m_GOLDMONT): Define.
5478 (processor_target_table): Add "goldmont".
5479 (PTA_GOLDMONT): Define.
5480 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
5481 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
5482 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
5483 (fold_builtin_cpu): Add "goldmont".
5484 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
5485 (ix86_option_override_internal): Add "goldmont".
5486 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
5487 (processor_type): Add PROCESSOR_GOLDMONT.
5488 * config/i386/i386.md: Add CPU "glm".
5489 * config/i386/glm.md: New file.
5490 * config/i386/x86-tune.def: Add m_GOLDMONT.
5491 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
5492
5493 2018-05-08 Jakub Jelinek <jakub@redhat.com>
5494
5495 PR target/85572
5496 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
5497 E_V4DImode.
5498 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
5499 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
5500 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
5501
5502 PR target/85317
5503 * config/i386/i386.c (ix86_fold_builtin): Handle
5504 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
5505
5506 PR target/85480
5507 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
5508 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
5509
5510 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
5511
5512 PR target/85658
5513 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
5514 (check_arch): Likewise.
5515 (check_fpu): Return the result rather than printing it.
5516 (end arch): Fix operator precedence.
5517 (end cpu): Likewise.
5518 (END): Print the result from check_fpu.
5519
5520 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
5521 Alan Hayward <alan.hayward@arm.com>
5522 David Sherwood <david.sherwood@arm.com>
5523
5524 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
5525 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
5526 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
5527 (*fcmuo<mode>_and): New patterns.
5528
5529 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
5530
5531 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
5532 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
5533 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
5534 (cmp_op, sve_imm_con): New code attributes.
5535 (SVE_COND_INT_CMP, imm_con): Delete.
5536 (cmp_op): Remove above unspecs from int attribute.
5537 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
5538 to...
5539 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
5540 comparison-specific unspecs.
5541 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
5542 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
5543 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
5544 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
5545 (*vec_fcm<cmp_op><mode>): Rename to...
5546 (*fcm<cmp_op><mode>): ...this and adjust likewise.
5547 (*vec_fcmuo<mode>): Rename to...
5548 (*fcmuo<mode>): ...this and adjust likewise.
5549 (*pred_fcm<cmp_op><mode>): New pattern.
5550 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
5551 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
5552 functions.
5553 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
5554 and UNORDERED.
5555 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
5556 (aarch64_emit_sve_predicated_cond): New function.
5557 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
5558 (aarch64_emit_unspec_cond_or): Replace with...
5559 (aarch64_emit_sve_or_conds): ...this new function. Use
5560 aarch64_emit_sve_ptrue_op for the individual comparisons and
5561 aarch64_emit_binop to OR them together.
5562 (aarch64_emit_inverted_unspec_cond): Replace with...
5563 (aarch64_emit_sve_inverted_cond): ...this new function. Use
5564 aarch64_emit_sve_ptrue_op for the comparison and
5565 aarch64_emit_unop to invert the result.
5566 (aarch64_expand_sve_vec_cmp_float): Update after the above
5567 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
5568
5569 2018-05-07 Nathan Sidwell <nathan@acm.org>
5570
5571 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
5572 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
5573 (Backwards Compatibility): Likewise.
5574
5575 2018-05-07 Luis Machado <luis.machado@linaro.org>
5576
5577 PR bootstrap/85681
5578 Revert:
5579 2018-05-07 Luis Machado <luis.machado@linaro.org>
5580
5581 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5582 <prefetch_dynamic_strides>: New const bool field.
5583 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5584 prefetch_dynamic_strides.
5585 (exynosm1_prefetch_tune): Likewise.
5586 (thunderxt88_prefetch_tune): Likewise.
5587 (thunderx_prefetch_tune): Likewise.
5588 (thunderx2t99_prefetch_tune): Likewise.
5589 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5590 to false.
5591 (aarch64_override_options_internal): Update to set
5592 PARAM_PREFETCH_DYNAMIC_STRIDES.
5593 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5594 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5595 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5596 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5597 prefetch-dynamic-strides setting.
5598
5599 2018-05-07 Luis Machado <luis.machado@linaro.org>
5600
5601 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5602 <minimum_stride>: New const int field.
5603 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5604 minimum_stride field.
5605 (exynosm1_prefetch_tune): Likewise.
5606 (thunderxt88_prefetch_tune): Likewise.
5607 (thunderx_prefetch_tune): Likewise.
5608 (thunderx2t99_prefetch_tune): Likewise.
5609 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5610 (aarch64_override_options_internal): Update to set
5611 PARAM_PREFETCH_MINIMUM_STRIDE.
5612 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5613 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5614 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5615 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5616 stride is constant and is below the minimum stride threshold.
5617
5618 2018-05-07 Luis Machado <luis.machado@linaro.org>
5619
5620 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
5621 to 512.
5622
5623 2018-05-07 Luis Machado <luis.machado@linaro.org>
5624
5625 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5626 <prefetch_dynamic_strides>: New const bool field.
5627 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5628 prefetch_dynamic_strides.
5629 (exynosm1_prefetch_tune): Likewise.
5630 (thunderxt88_prefetch_tune): Likewise.
5631 (thunderx_prefetch_tune): Likewise.
5632 (thunderx2t99_prefetch_tune): Likewise.
5633 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5634 to false.
5635 (aarch64_override_options_internal): Update to set
5636 PARAM_PREFETCH_DYNAMIC_STRIDES.
5637 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5638 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5639 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5640 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5641 prefetch-dynamic-strides setting.
5642
5643 2018-05-07 Luis Machado <luis.machado@linaro.org>
5644
5645 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5646 <minimum_stride>: New const int field.
5647 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5648 minimum_stride field.
5649 (exynosm1_prefetch_tune): Likewise.
5650 (thunderxt88_prefetch_tune): Likewise.
5651 (thunderx_prefetch_tune): Likewise.
5652 (thunderx2t99_prefetch_tune): Likewise.
5653 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5654 (aarch64_override_options_internal): Update to set
5655 PARAM_PREFETCH_MINIMUM_STRIDE.
5656 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5657 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5658 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5659 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5660 stride is constant and is below the minimum stride threshold.
5661
5662 2018-05-06 Jakub Jelinek <jakub@redhat.com>
5663
5664 PR c++/85659
5665 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
5666 the type is addressable. Don't force op into register if it has
5667 BLKmode.
5668
5669 2018-05-05 Roland McGrath <mcgrathr@google.com>
5670
5671 PR other/77609
5672 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
5673 any section for which we don't know a specific type it should have,
5674 regardless of name. Previously this was done only for the exact
5675 names ".init_array", ".fini_array", and ".preinit_array".
5676 (default_elf_asm_named_section): Add comment about
5677 relationship with default_section_type_flags and SECTION_NOTYPE.
5678 (get_section): Don't consider it a type conflict if one side has
5679 SECTION_NOTYPE and the other doesn't, as long as neither has the
5680 SECTION_BSS et al used in the default_section_type_flags logic.
5681
5682 2018-05-05 Tom de Vries <tom@codesourcery.com>
5683
5684 PR target/85653
5685 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
5686 (workaround_barsyncs): New function.
5687 (nvptx_reorg): Use workaround_barsyncs.
5688 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5689 (define_expand "nvptx_membar_cta"): New define_expand.
5690 (define_insn "*nvptx_membar_cta"): New insn.
5691
5692 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
5693
5694 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
5695 To improve optimization opportunities.
5696 * builtin-types.def: The new needed builtin types for the above.
5697
5698 2018-05-04 Richard Biener <rguenther@suse.de>
5699
5700 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
5701 * gimple-ssa-store-merging.c
5702 (imm_store_chain_info::output_merged_store): Remove redundant create,
5703 release split_store vector contents on failure.
5704 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
5705 scalar stmt vector on cache hit.
5706
5707 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
5708
5709 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
5710 Xilinx FP support.
5711 * config.gcc (powerpc-xilinx-eabi*): Remove.
5712 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
5713 support.
5714 (fusion_addis_mem_combo_load): Ditto.
5715 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
5716 FP support.
5717 (rs6000_cpu_cpp_builtins): Ditto.
5718 * config/rs6000/rs6000-linux.c
5719 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
5720 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
5721 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
5722 support.
5723 (rs6000_setup_reg_addr_masks): Ditto.
5724 (rs6000_init_hard_regno_mode_ok): Ditto.
5725 (rs6000_option_override_internal): Ditto.
5726 (legitimate_lo_sum_address_p): Ditto.
5727 (rs6000_legitimize_address): Ditto.
5728 (rs6000_legitimize_reload_address): Ditto.
5729 (rs6000_legitimate_address_p): Ditto.
5730 (abi_v4_pass_in_fpr): Ditto.
5731 (setup_incoming_varargs): Ditto.
5732 (rs6000_gimplify_va_arg): Ditto.
5733 (rs6000_split_multireg_move): Ditto.
5734 (rs6000_savres_strategy): Ditto.
5735 (rs6000_emit_prologue_components): Ditto.
5736 (rs6000_emit_epilogue_components): Ditto.
5737 (rs6000_emit_prologue): Ditto.
5738 (rs6000_emit_epilogue): Ditto.
5739 (rs6000_elf_file_end): Ditto.
5740 (rs6000_function_value): Ditto.
5741 (rs6000_libcall_value): Ditto.
5742 * config/rs6000/rs6000.h: Ditto.
5743 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
5744 (TARGET_MINMAX): ... this. New.
5745 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
5746 * config/rs6000/rs6000.md: Remove Xilinx FP support.
5747 (*movsi_internal1_single): Delete.
5748 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
5749 mfpu=, mxilinx-fpu): Delete.
5750 * config/rs6000/singlefp.h: Delete.
5751 * config/rs6000/sysv4.h: Remove Xilinx FP support.
5752 * config/rs6000/t-rs6000: Ditto.
5753 * config/rs6000/t-xilinx: Delete.
5754 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
5755 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
5756 (VStype_simple): Delete.
5757 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
5758 * config/rs6000/xfpu.h: Delete.
5759 * config/rs6000/xfpu.md: Delete.
5760 * config/rs6000/xilinx.h: Delete.
5761 * config/rs6000/xilinx.opt: Delete.
5762 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
5763 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
5764
5765 2018-05-04 Tom de Vries <tom@codesourcery.com>
5766
5767 PR libgomp/85639
5768 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
5769 if ignore == 0.
5770
5771 2018-05-04 Richard Biener <rguenther@suse.de>
5772
5773 PR middle-end/85627
5774 * tree-complex.c (update_complex_assignment): We are always in SSA form.
5775 (expand_complex_div_wide): Likewise.
5776 (expand_complex_operations_1): Likewise.
5777 (expand_complex_libcall): Preserve EH info of the original stmt.
5778 (tree_lower_complex): Handle removed blocks.
5779 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
5780 on complex multiplication and division libcall builtins.
5781
5782 2018-05-04 Richard Biener <rguenther@suse.de>
5783
5784 PR middle-end/85574
5785 * fold-const.c (negate_expr_p): Restrict negation of operand
5786 zero of a division to when we know that can happen without
5787 overflow.
5788 (fold_negate_expr_1): Likewise.
5789
5790 2018-05-04 Jakub Jelinek <jakub@redhat.com>
5791
5792 PR libstdc++/85466
5793 * real.h (real_nextafter): Declare.
5794 * real.c (real_nextafter): New function.
5795 * fold-const-call.c (fold_const_nextafter): New function.
5796 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
5797 CASE_CFN_NEXTTOWARD.
5798 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
5799 even when arg1_mode is different from arg0_mode.
5800
5801 2018-05-03 Nathan Sidwell <nathan@acm.org>
5802
5803 * doc/extend.texi (Deprecated Features): Remove
5804 -ffriend-injection.
5805 (Backwards Compatibility): Likewise.
5806 * doc/invoke.texi (C++ Language Options): Likewise.
5807 (C++ Dialect Options): Likewise.
5808
5809 2018-05-03 Jakub Jelinek <jakub@redhat.com>
5810
5811 PR target/85530
5812 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
5813 _mm512_mask_mullox_epi64): New intrinsics.
5814
5815 2018-05-03 Tom de Vries <tom@codesourcery.com>
5816
5817 PR testsuite/85106
5818 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5819 dump files): Add offload-tree.
5820
5821 2018-05-03 Richard Biener <rguenther@suse.de>
5822
5823 PR tree-optimization/85615
5824 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
5825 to loops not nested in BBs loop father to avoid creating multi-entry
5826 loops.
5827
5828 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5829
5830 PR tree-optimization/70291
5831 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
5832 arguments. Change return type to tree. Emit libcall as a new
5833 statement rather than replacing existing one when inplace_p is true.
5834 (expand_complex_multiplication_components): New function.
5835 (expand_complex_multiplication): Expand floating-point complex
5836 multiplication using the above.
5837 (expand_complex_division): Rename inner_type parameter to type.
5838 Update expand_complex_libcall call-site.
5839 (expand_complex_operations_1): Update expand_complex_multiplication
5840 and expand_complex_division call-sites.
5841
5842 2018-05-02 Jakub Jelinek <jakub@redhat.com>
5843
5844 PR target/85582
5845 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5846 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5847 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
5848 the highest significant bit of the shift count mask is clear. In
5849 check whether and[sq]i3 is needed verify that all significant bits
5850 of the shift count other than the highest are set.
5851
5852 2018-05-02 Tom de Vries <tom@codesourcery.com>
5853
5854 PR libgomp/82428
5855 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
5856 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
5857 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
5858 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
5859 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
5860 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
5861 __builtin_goacc_parlevel_size.
5862
5863 2018-05-02 Richard Biener <rguenther@suse.de>
5864
5865 PR tree-optimization/85597
5866 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
5867 do not use split vect_get_vec_defs call but call vect_get_slp_defs
5868 directly.
5869
5870 2018-05-02 Tom de Vries <tom@codesourcery.com>
5871
5872 PR testsuite/85106
5873 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5874 dump files): Add ltrans-tree.
5875
5876 2018-05-02 Tom de Vries <tom@codesourcery.com>
5877
5878 PR testsuite/85106
5879 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5880 dump files): Add wpa-ipa.
5881
5882 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
5883
5884 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
5885 powerpc*-*-linux*paired* target.
5886 * config/rs6000/750cl.h: Delete.
5887 * config/rs6000/paired.h: Delete.
5888 * config/rs6000/paired.md: Delete.
5889 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
5890 float support.
5891 * config/rs6000/rs6000-builtin.def: Remove paired float support.
5892 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
5893 comment. Remove paired float support.
5894 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
5895 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5896 VECTOR_PAIRED.
5897 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
5898 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
5899 declarations.
5900 * config/rs6000/rs6000.c: Remove paired float support.
5901 (paired_expand_vector_init, paired_expand_vector_move,
5902 paired_emit_vector_compare, paired_emit_vector_cond_expr,
5903 (paired_expand_lv_builtin, paired_expand_stv_builtin,
5904 paired_expand_builtin, paired_expand_predicate_builtin,
5905 paired_init_builtins): Delete.
5906 * config/rs6000/rs6000.h: Remove paired float support.
5907 * config/rs6000/rs6000.md: Remove paired float support.
5908 (move_from_CR_ov_bit): Delete.
5909 * config/rs6000/rs6000.opt (mpaired): Delete.
5910 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
5911 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
5912
5913 2018-05-02 Richard Biener <rguenther@suse.de>
5914
5915 PR middle-end/85567
5916 * gimplify.c (gimplify_save_expr): When in SSA form allow
5917 SAVE_EXPRs to compute to SSA vars.
5918
5919 2018-05-02 Jakub Jelinek <jakub@redhat.com>
5920
5921 PR target/85582
5922 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5923 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5924 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
5925 clobber operands[2], instead use a new pseudo. Formatting fixes.
5926
5927 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
5928
5929 PR tree-optimization/85586
5930 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
5931 exit early for statements in the same group if the accesses are
5932 not strided.
5933
5934 2018-05-02 Tom de Vries <tom@codesourcery.com>
5935
5936 PR lto/85451
5937 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
5938 error message.
5939
5940 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
5941
5942 PR tree-optimization/85143
5943 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
5944
5945 2018-05-01 Tom de Vries <tom@codesourcery.com>
5946
5947 PR lto/85451
5948 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
5949 not found" error message.
5950
5951 2018-05-01 Tom de Vries <tom@codesourcery.com>
5952
5953 PR other/83786
5954 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
5955 * vec.c (test_ordered_remove_if): New function.
5956 (vec_c_tests): Call test_ordered_remove_if.
5957 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
5958 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
5959 * tree-vect-patterns.c (vect_pattern_recog_1): Use
5960 VEC_ORDERED_REMOVE_IF.
5961
5962 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5963
5964 PR tree-optimization/82665
5965 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
5966 pointer subtraction where arguments come from a memchr call.
5967
5968 2018-05-01 Jakub Jelinek <jakub@redhat.com>
5969
5970 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
5971 --push-state --as-needed and --pop-state instead of --as-needed and
5972 --no-as-needed if ld supports it.
5973 * configure: Regenerated.
5974
5975 PR web/85578
5976 * doc/install.texi2html: Replace _002d with - and _002a with * in
5977 generated html files using sed.
5978
5979 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5980
5981 PR c++/85523
5982 * gcc-rich-location.c (blank_line_before_p): New function.
5983 (use_new_line): New function.
5984 (gcc_rich_location::add_fixit_insert_formatted): New function.
5985 * gcc-rich-location.h
5986 (gcc_rich_location::add_fixit_insert_formatted): New function.
5987
5988 2018-04-30 David Malcolm <dmalcolm@redhat.com>
5989
5990 * selftest.c (assert_streq): Rename "expected" and "actual" to
5991 "val1" and "val2". Extend NULL-handling to cover both inputs
5992 symmetrically, while still requiring both to be non-NULL for a pass.
5993 * selftest.h (assert_streq): Rename "expected" and "actual" to
5994 "val1" and "val2".
5995 (ASSERT_EQ): Likewise.
5996 (ASSERT_EQ_AT): Likewise.
5997 (ASSERT_KNOWN_EQ): Likewise.
5998 (ASSERT_KNOWN_EQ_AT): Likewise.
5999 (ASSERT_NE): Likewise.
6000 (ASSERT_MAYBE_NE): Likewise.
6001 (ASSERT_MAYBE_NE_AT): Likewise.
6002 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
6003 the assertion to pass.
6004 (ASSERT_STREQ_AT): Likewise.
6005
6006 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
6007
6008 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
6009 interaction with -pie.
6010
6011 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6012
6013 * selftest.h: Fix alphabetization of per-source-file selftest
6014 declarations.
6015
6016 2018-04-30 Jason Merrill <jason@redhat.com>
6017
6018 PR c++/61982 - dead stores to destroyed objects.
6019 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
6020 of clobber.
6021
6022 2018-04-30 Jason Merrill <jason@redhat.com>
6023
6024 * tree.c (build_clobber): New.
6025 * tree.h: Declare it.
6026 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
6027
6028 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6029
6030 * diagnostic-show-locus.c (layout::layout): Update for
6031 location_get_source_line returning a char_span.
6032 (struct char_span): Move to input.h.
6033 (struct correction): Update for fields in char_span becoming
6034 private.
6035 (struct source_line): Update for location_get_source_line
6036 returning a char_span.
6037 (layout::print_line): Likewise.
6038 * edit-context.c (edited_file::print_content): Likewise.
6039 (edited_file::print_diff_hunk): Likewise.
6040 (edited_file::print_run_of_changed_lines): Likewise.
6041 (edited_file::get_num_lines): Likewise.
6042 (edited_line::edited_line): Likewise.
6043 * final.c (asm_show_source): Likewise.
6044 * input.c (location_get_source_line): Convert return type
6045 from const char * to char_span, losing the final "line_len"
6046 param.
6047 (dump_location_info): Update for the above.
6048 (get_substring_ranges_for_loc): Likewise. Use a char_span
6049 when handling the literal within the line.
6050 (test_reading_source_line): Update for location_get_source_line
6051 returning a char_span.
6052 * input.h (class char_span): Move here from
6053 diagnostic-show-locus.c, converting from a struct to a class.
6054 Make data members private.
6055 (char_span::operator bool): New.
6056 (char_span::length): New.
6057 (char_span::get_buffer): New.
6058 (char_span::operator[]): New.
6059 (char_span::subspan): Make const.
6060 (char_span::xstrdup): New.
6061 (location_get_source_line): Convert return type from const char *
6062 to char_span, losing the final "line_size" param.
6063
6064 2018-04-30 Jan Hubicka <jh@suse.cz>
6065
6066 * lto-wrapper.c (ltrans_priorities): New static var.
6067 (cmp_priority): New.
6068 (run_gcc): Read priorities and if doing parallel build order
6069 the Makefile by them.
6070
6071 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6072
6073 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
6074
6075 2018-04-30 Richard Biener <rguenther@suse.de>
6076
6077 * tree-cfg.c (verify_address): Remove base argument, add
6078 flag whether to check TREE_ADDRESSABLE and do that.
6079 (verify_expr): Remove.
6080 (verify_types_in_gimple_reference): Add pieces from verify_expr.
6081 (verify_gimple_assign_single): Likewise.
6082 (verify_gimple_switch): Likewise.
6083 (verify_expr_location_1): Dereference tp once. Add (disabled)
6084 piece from verify_expr.
6085 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
6086
6087 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
6088
6089 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
6090
6091 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
6092
6093 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
6094 (small_data_pattern): Likewise.
6095 (arc_rewrite_small_data): Likewise.
6096 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
6097 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
6098 (get_symbol_alignment): New function.
6099 (legitimate_small_data_address_p): Likewise.
6100 (legitimate_scaled_address): Update, call
6101 legitimate_small_data_address_p.
6102 (output_sdata): New static variable.
6103 (arc_print_operand): Update how we handle small data operands.
6104 (arc_print_operand_address): Likewise.
6105 (arc_legitimate_address_p): Update, use
6106 legitimate_small_data_address_p.
6107 (arc_rewrite_small_data_p): Remove.
6108 (arc_rewrite_small_data_1): Likewise.
6109 (arc_rewrite_small_data): Likewise.
6110 (small_data_pattern): Likewise.
6111 (compact_sda_memory_operand): Update to use
6112 legitimate_small_data_address_p and get_symbol_alignment.
6113 (prepare_move_operands): Don't rewite sdata pattern.
6114 (prepare_extend_operands): Remove.
6115 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
6116 pattern.
6117 (zero_extendqisi2): Likewise.
6118 (zero_extendhisi2): Likewise.
6119 (extendqihi2): Likewise.
6120 (extendqisi2): Likewise.
6121 (extendhisi2): Likewise.
6122 (addsi3): Likewise.
6123 (subsi3): Likewise.
6124 (andsi3): Likewise.
6125 * config/arc/constraints.md (Usd): Change it to memory constraint.
6126
6127 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
6128
6129 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
6130 as source of std instructions.
6131 * config/arc/arc.md (movsi_insn): Update pattern predicate to
6132 allow 6-bit constants as source for store instructions.
6133 (movdi_insn): Update instruction pattern to allow 6-bit constants
6134 as source for store instructions.
6135
6136 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
6137
6138 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
6139
6140 2018-04-30 Nathan Sidwell <nathan@acm.org>
6141 Sandra Loosemore <sandra@codesourcery.com>
6142
6143 * dumpfile.c (dump_open): Allow '-' for stdout.
6144 * doc/invoke.texi (Developer Options): Document dump filename
6145 determination early. Document stdin/stdout selection.
6146
6147 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
6148
6149 Microblaze Target: PIC data text relative
6150
6151 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
6152 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
6153 Add declaration.
6154 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
6155 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
6156 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
6157 New addressing mode for data-text relative position indepenedent code.
6158 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
6159 'ADDRESS_SYMBOLIC_TXT_REL'.
6160 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
6161 (microblaze_legitimate_pic_operand): Exclude function calls from
6162 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
6163 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
6164 addresses cases.
6165 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6166 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6167 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
6168 for 'address + offset'.
6169 (microblaze_expand_prologue): Add new function prologue call for
6170 'r20' assignation.
6171 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
6172 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
6173 table in case of TARGET_PIC_DATA_TEXT_REL.
6174 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
6175 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
6176 Add new macros 'UNSPEC_TEXT',
6177 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
6178 + exclude function calls from 'UNSPEC_PLT' in case of data text
6179 relative mode.
6180 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6181 new target hook for generating address diff vector tables in case of
6182 flag_pic.
6183 * doc/tm.texi : Regenerate.
6184 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
6185 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
6186 of addr diff vector generation.
6187 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6188 target hook definition.
6189 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
6190 Add default function for generate_pic_addr_diff_vec -> flag_pic.
6191 * doc/invoke.texi (Add new pic option): Add new microblaze pic
6192 option for data text relative.
6193
6194 2018-04-30 Richard Biener <rguenther@suse.de>
6195
6196 * tree-chrec.h (evolution_function_is_constant_p): Remove
6197 redundant check.
6198 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
6199
6200 2018-04-30 Richard Biener <rguenther@suse.de>
6201
6202 PR bootstrap/85571
6203 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
6204
6205 2018-04-30 Richard Biener <rguenther@suse.de>
6206
6207 PR tree-optimization/28364
6208 PR tree-optimization/85275
6209 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
6210 copying first exit test.
6211
6212 2018-04-28 Mark Wielaard <mark@klomp.org>
6213
6214 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
6215 dwarf_version >= 5.
6216 (dwarf_AT): Handle DW_AT_addr_base.
6217 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
6218
6219 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
6220
6221 PR target/84431
6222 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
6223 (*ashl<dwi>3_doubleword_mask_1): Ditto.
6224 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
6225 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
6226
6227 2018-04-28 Richard Biener <rguenther@suse.de>
6228
6229 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
6230 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
6231 to reflect use. Only add interesting stmts.
6232
6233 2018-04-27 Martin Jambor <mjambor@suse.cz>
6234
6235 PR ipa/85549
6236 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
6237 the jump function allows for passing through aggregate values.
6238
6239 2018-04-27 David Malcolm <dmalcolm@redhat.com>
6240
6241 * input.h (in_system_header_at): Convert from macro to inline
6242 function.
6243 (from_macro_expansion_at): Likewise.
6244 (from_macro_definition_at): Likewise.
6245
6246 2018-04-27 Jeff Law <law@redhat.com>
6247
6248 * config.gcc: Mark tile* targets as deprecated/obsolete.
6249
6250 2018-04-27 Richard Biener <rguenther@suse.de>
6251
6252 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
6253 fix for ILP32.
6254
6255 2018-04-27 Richard Biener <rguenther@suse.de>
6256
6257 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
6258
6259 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
6260
6261 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
6262 with Yd constraint. Set "preferred_for_speed" attribute from
6263 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
6264 with Yd constraint.
6265 (*movdi_internal): Ditto.
6266 (movti_interunit splitters): Remove
6267 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
6268 (movdi_interunit splitters): Ditto.
6269 * config/i386/constraints.md (Ye): Remove.
6270 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
6271
6272 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6273
6274 PR target/85512
6275 * config/aarch64/constraints.md (Usg): Limit to 31.
6276 (Usj): Limit to 63.
6277
6278 2018-04-27 Jakub Jelinek <jakub@redhat.com>
6279
6280 PR tree-optimization/85529
6281 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
6282 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
6283 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
6284 zero extension or masking of the MSB bit.
6285 (optimize_range_tests): Add FIRST_BB argument, pass it through
6286 to optimize_range_tests_var_bound.
6287 (maybe_optimize_range_tests, reassociate_bb): Adjust
6288 optimize_range_tests callers.
6289
6290 2018-04-26 Richard Biener <rguenther@suse.de>
6291 Jakub Jelinek <jakub@redhat.com>
6292
6293 * cgraph.h (symbol_table): Just declare debug method here.
6294 * symtab.c (symbol_table::debug): Define.
6295
6296 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
6297
6298 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
6299
6300 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
6301
6302 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
6303 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
6304 (*movdi_internal): Substitute Yi and Yj constraint with x
6305 and Ym and Yn constraint with y constraint. Update "isa"
6306 attribute and set "preferred_for_speed" attribute from
6307 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
6308 (*movsi_internal): Ditto.
6309 (*movdf_internal): Ditto.
6310 (*movsf_internal): Ditto.
6311 (*zero_extendsidi2): Ditto.
6312 * config/i386/sse.md (vec_set<mode>_0): Ditto.
6313 (sse2_loadld): Ditto.
6314 (*vec_extract<ssevecmodelower>_0): Ditto.
6315 (*vec_extractv4si_0_zext_sse4): Ditto.
6316 (vec_concatv2di): Ditto.
6317 (*vec_dup<mode>): Ditto.
6318 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
6319 * config/i386/constraints.md (Yi): Remove.
6320 (Yj): Remove.
6321 (Ym): Remove.
6322 (Yn): Remove.
6323
6324 2018-04-26 Nathan Sidwell <nathan@acm.org>
6325
6326 * dumpfile.c (dump_open): New.
6327 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
6328 (dump_finish): Detect stdio/stderr by value not name.
6329
6330 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
6331
6332 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
6333
6334 2018-04-26 Tom de Vries <tom@codesourcery.com>
6335
6336 PR target/84952
6337 * config/nvptx/nvptx.c (verify_neutering_jumps)
6338 (verify_neutering_labels): New function
6339 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
6340
6341 2018-04-26 Tom de Vries <tom@codesourcery.com>
6342
6343 PR target/84025
6344 * config/nvptx/nvptx.c (needs_neutering_p): New function.
6345 (nvptx_single): Use needs_neutering_p to skip over insns that do not
6346 need neutering.
6347
6348 2018-04-26 Richard Biener <rguenther@suse.de>
6349 Tom de Vries <tom@codesourcery.com>
6350
6351 PR lto/85422
6352 * lto-streamer-out.c (output_function): Fixup loops if required to match
6353 discovery done in the reader.
6354
6355 2018-04-26 Richard Biener <rguenther@suse.de>
6356
6357 PR tree-optimization/85116
6358 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
6359 have a loop exit from the single latch predecessor. Remove
6360 case of header with just condition.
6361 (ch_base::copy_headers): Exclude infinite loops from any
6362 processing.
6363 (pass_ch::execute): Record exits.
6364
6365 2018-04-26 Richard Biener <rguenther@suse.de>
6366
6367 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
6368 prologue cost vector and pass it to vect_get_load_cost.
6369 (vect_get_peeling_costs_all_drs): Likewise.
6370 (vect_peeling_hash_get_lowest_cost): Likewise.
6371 (vect_enhance_data_refs_alignment): Likewise.
6372
6373 2018-04-26 Richard Biener <rguenther@suse.de>
6374
6375 PR middle-end/85450
6376 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
6377 checking of integer<->pointer conversions.
6378 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
6379 sign-/zero-extending pointer types.
6380 (expand_omp_for_static_chunk): Likewise.
6381
6382 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
6383 Jean Lee <xiaoyur347@gmail.com>
6384
6385 * config/mips/mips.c (mips_asan_shadow_offset): New function.
6386 (TARGET_ASAN_SHADOW_OFFSET): Define.
6387 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
6388 true for -fsanitize=address.
6389
6390 2018-04-25 Mark Wielaard <mark@klomp.org>
6391
6392 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
6393 shorter ones.
6394
6395 2018-04-25 Jakub Jelinek <jakub@redhat.com>
6396
6397 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
6398 than "alu", remove explicit "memory" and "imm_disp" attributes.
6399 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
6400
6401 PR middle-end/85414
6402 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
6403 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
6404 gen_lowpart_no_emit.
6405
6406 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
6407
6408 PR target/85473
6409 * config/i386/i386.c (ix86_expand_builtin): Change memory
6410 operand to XI, extend p0 to Pmode.
6411 * config/i386/i386.md: Change unspec volatile and operand
6412 1 mode to XI, change operand 0 mode to P.
6413
6414 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
6415
6416 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
6417 GET_MODE_MASK before any checking.
6418 (nds32_can_use_bset_p): Likewise.
6419 (nds32_can_use_btgl_p): Likewise.
6420
6421 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
6422
6423 * config/nds32/nds32-doubleword.md: New define_split pattern for
6424 illegal register number.
6425
6426 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
6427
6428 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
6429
6430 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
6431
6432 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
6433
6434 2018-04-25 Richard Biener <rguenther@suse.de>
6435
6436 * lto-streamer.h (LTO_major_version): Bump to 8.
6437
6438 2018-04-25 Jakub Jelinek <jakub@redhat.com>
6439
6440 * BASE-VER: Set to 9.0.0.
6441
6442 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
6443
6444 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
6445 in __abskf2 and __powikf2.
6446
6447 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6448
6449 PR target/85512
6450 * config/aarch64/constraints.md (Usg, Usj): New constraints.
6451 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
6452 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
6453 Use the above on operand 2. Reindent.
6454 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
6455
6456 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
6457
6458 PR target/85485
6459 * common/config/i386/i386-common.c (ix86_handle_option): Don't
6460 handle OPT_mcet.
6461 * config/i386/i386.opt (mcet): Removed.
6462 * doc/install.texi: Remove -mcet documentation.
6463 * doc/invoke.texi: Likewise.
6464
6465 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
6466
6467 PR target/85485
6468 * doc/install.texi: Remove -mcet from bootstrap-cet.
6469
6470 2018-04-24 Jakub Jelinek <jakub@redhat.com>
6471
6472 PR target/85511
6473 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
6474 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
6475 if TARGET_64BIT.
6476
6477 PR target/85503
6478 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
6479 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
6480 containing a CONST_VECTOR.
6481
6482 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
6483
6484 * doc/install.texi: Update newlib dependency for nvptx.
6485
6486 2018-04-24 Jakub Jelinek <jakub@redhat.com>
6487
6488 PR target/85508
6489 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
6490 instead of INTVAL when shifting x left.
6491
6492 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
6493
6494 PR tree-optimization/85478
6495 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
6496 vect_grouped_store_supported for single element vectors.
6497
6498 2018-04-24 Richard Biener <rguenther@suse.de>
6499
6500 PR target/85491
6501 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
6502 load cost increase to the case of non-constant step.
6503
6504 2018-04-24 Jakub Jelinek <jakub@redhat.com>
6505
6506 PR target/84828
6507 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
6508 destination if any_malformed_asm.
6509
6510 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
6511
6512 PR middle-end/85496
6513 * expr.c (store_field): In the bitfield case, if the value comes from
6514 a function call and is returned in registers by means of a PARALLEL,
6515 do not change the mode of the temporary unless BLKmode and VOIDmode.
6516
6517 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
6518
6519 PR rtl-optimization/85423
6520 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
6521 dependencies to debug insns when the previous insn is non-debug.
6522
6523 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
6524
6525 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
6526 enums into a single definition.
6527 (fls): Fix predicates and printing.
6528 (seti): Likewise.
6529
6530 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
6531
6532 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
6533 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
6534 and short u6 immediate.
6535 (check_if_valid_sleep_operand): Remove.
6536 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
6537
6538 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
6539
6540 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
6541 flag_always_save_lp condition.
6542 * config/nds32/nds32.opt (malways-save-lp): New option.
6543
6544 2018-04-22 Shiva Chen <shiva0217@gmail.com>
6545
6546 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
6547 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
6548 * config/nds32/nds32.h
6549 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
6550 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
6551
6552 2018-04-22 Shiva Chen <shiva0217@gmail.com>
6553
6554 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
6555 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
6556
6557 2018-04-22 Shiva Chen <shiva0217@gmail.com>
6558 Chung-Ju Wu <jasonwucj@gmail.com>
6559
6560 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
6561 Declare.
6562 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
6563 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
6564
6565 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
6566
6567 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
6568
6569 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
6570
6571 * config/nds32/nds32-protos.h (nds32_data_alignment,
6572 nds32_local_alignment): Declare.
6573 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
6574 nds32_local_alignment): New functions.
6575 (TARGET_CONSTANT_ALIGNMENT): Define.
6576 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
6577
6578 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
6579
6580 * config/nds32/nds32.c
6581 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
6582 (TARGET_MODES_TIEABLE_P): Likewise.
6583
6584 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
6585
6586 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
6587 level Ofast and Og.
6588
6589 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
6590 Chung-Ju Wu <jasonwucj@gmail.com>
6591
6592 * config/nds32/constants.md (unspec_volatile_element): Add enum values
6593 for unaligned access.
6594 * config/nds32/nds32-intrinsic.c: Implementation of expanding
6595 unaligned access.
6596 * config/nds32/nds32-intrinsic.md: Likewise.
6597 * config/nds32/nds32_intrinsic.h: Likewise.
6598 * config/nds32/nds32.h (nds32_builtins): Likewise.
6599 * config/nds32/nds32.opt (munaligned-access): New option.
6600 * config/nds32/nds32.c (nds32_asm_file_start): Display
6601 flag_unaligned_access status.
6602
6603 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
6604
6605 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
6606 -mno-relax is present.
6607 * config/riscv/linux.h (LINK_SPEC): Ditto.
6608
6609 2018-04-20 Martin Sebor <msebor@redhat.com>
6610
6611 PR c/85365
6612 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
6613 for null pointers.
6614 (gimple_fold_builtin_stxcpy_chk): Same.
6615 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
6616
6617 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
6618
6619 PR target/85456
6620 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
6621 __powikf2 when long double is IEEE 128-bit.
6622
6623 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
6624
6625 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
6626 step to make sure stack always aligned.
6627
6628 2018-04-20 Carl Love <cel@us.ibm.com>
6629
6630 PR target/83402
6631 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
6632 size check for arg0.
6633
6634 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
6635 Tom de Vries <tom@codesourcery.com>
6636
6637 PR target/85445
6638 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
6639 Emit insns for calls too.
6640 (nvptx_find_par): Always look for worker-level predecessor insn.
6641 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
6642 calls.
6643 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
6644 (nvptx_process_pars): Propagate frames for calls.
6645
6646 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
6647
6648 PR target/85469
6649 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
6650 Removed.
6651 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
6652 (ix86_handle_option): Don't handle OPT_mibt.
6653 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
6654 __SHSTK__.
6655 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
6656 has_ibt and ibt.
6657 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
6658 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
6659 (ix86_target_macros): Define __CET__ with flag_cf_protection
6660 for -fcf-protection.
6661 * config/i386/i386.c (isa2_opts): Remove -mibt.
6662 * config/i386/i386.h (TARGET_IBT): Removed.
6663 (TARGET_IBT_P): Likewise.
6664 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
6665 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
6666 * config/i386/i386.opt (mcet): Update help message.
6667 (mshstk): Likewise.
6668 (mibt): Removed.
6669 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
6670 -mcet as an alias for -mshstk.
6671
6672 2018-04-20 Richard Biener <rguenther@suse.de>
6673
6674 PR middle-end/85475
6675 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
6676 complexity by forcing a single use of the multiply operand.
6677
6678 2018-04-20 Martin Jambor <mjambor@suse.cz>
6679
6680 ipa/85449
6681 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
6682 recursion dependency to only apply to non-clones.
6683
6684 2018-04-20 Martin Jambor <mjambor@suse.cz>
6685
6686 ipa/85447
6687 * ipa-cp.c (create_specialized_node): Check that clones of
6688 self-recursive edges exist during IPA-CP.
6689
6690 2018-04-19 Toon Moene <toon@moene.org>
6691
6692 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
6693 by -O3.
6694
6695 2018-04-19 Jakub Jelinek <jakub@redhat.com>
6696
6697 PR tree-optimization/85467
6698 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
6699 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
6700 VECTOR_CST element to type.
6701
6702 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
6703
6704 PR target/85397
6705 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
6706 * config/i386/i386.md (builtin_setjmp_setup): Removed.
6707 (builtin_longjmp): Likewise.
6708 (save_stack_nonlocal): New pattern.
6709 (restore_stack_nonlocal): Likewise.
6710
6711 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
6712
6713 PR target/85404
6714 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6715 Replace ASM_OUTPUT_LABEL with fprintf.
6716
6717 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
6718
6719 PR target/85417
6720 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6721 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
6722 * config/i386/i386-c.c (ix86_target_macros_internal): Also
6723 define __IBT__ and __SHSTK__ for -fcf-protection.
6724 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
6725 TARGET_IBT.
6726 (ix86_trampoline_init): Likewise.
6727 (x86_output_mi_thunk): Likewise.
6728 (ix86_notrack_prefixed_insn_p): Likewise.
6729 (ix86_option_override_internal): Don't disallow -fcf-protection.
6730 * config/i386/i386.md (rdssp<mode>): Also enable for
6731 -fcf-protection.
6732 (incssp<mode>): Likewise.
6733 (nop_endbr): Likewise.
6734 * config/i386/i386.opt (mcet): Change help message to built-in
6735 functions only.
6736 (mibt): Likewise.
6737 (mshstk): Likewise.
6738 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
6739 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
6740 enable CET built-in functions.
6741
6742 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
6743
6744 * common/config/i386/i386-common.c
6745 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
6746 OPTION_MASK_ISA_MOVDIRI_UNSET,
6747 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
6748 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
6749 * config.gcc (movdirintrin.h): New header.
6750 * config/i386/cpuid.h (bit_MOVDIRI,
6751 bit_MOVDIR64B): New bits.
6752 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
6753 and -mmvodir64b.
6754 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
6755 (VOID, PVOID, PCVOID)): New function types.
6756 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
6757 __builtin_ia32_directstoreu_u64,
6758 __builtin_ia32_movdir64b): New builtins.
6759 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
6760 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
6761 and -mmovdiri.
6762 (ix86_valid_target_attribute_inner_p): Ditto.
6763 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
6764 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
6765 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
6766 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
6767 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
6768 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
6769 (movdiri<mode>, movdir64b_<mode>): New.
6770 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
6771 * config/i386/immintrin.h: Include movdirintrin.h.
6772 * config/i386/movdirintrin.h: New file.
6773 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
6774
6775 2018-04-19 Richard Biener <rguenther@suse.de>
6776
6777 PR middle-end/85455
6778 * cfg.c (clear_bb_flags): When loop state says we have
6779 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
6780
6781 2018-04-19 Richard Biener <rguenther@suse.de>
6782
6783 PR tree-optimization/84737
6784 * tree-vect-data-refs.c (vect_copy_ref_info): New function
6785 copying restrict info.
6786 (vect_setup_realignment): Use it.
6787 * tree-vectorizer.h (vect_copy_ref_info): Declare.
6788 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
6789 the first DR to all generated stores.
6790 (vectorizable_load): Likewise for loads.
6791
6792 2018-04-19 Jakub Jelinek <jakub@redhat.com>
6793
6794 PR tree-optimization/85446
6795 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
6796 the integral and pointer types to have the same precision.
6797
6798 * doc/install.texi: Document --disable-cet being the default and
6799 --enable-cet=auto.
6800
6801 2018-04-18 Martin Liska <mliska@suse.cz>
6802
6803 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
6804 style.
6805
6806 2018-04-18 Martin Liska <mliska@suse.cz>
6807
6808 Revert
6809 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
6810
6811 PR ipa/83983
6812 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6813 arguments if they are comparable.
6814
6815 2018-04-18 Martin Liska <mliska@suse.cz>
6816
6817 Revert
6818 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
6819
6820 PR lto/84805
6821 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6822 incomplete types.
6823
6824 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
6825
6826 PR target/85388
6827 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
6828 ENDBR after calling __morestack.
6829
6830 2018-04-18 David Malcolm <dmalcolm@redhat.com>
6831
6832 PR jit/85384
6833 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
6834 by using gcc_base_ver to generate a gcc_driver_version, and use
6835 it when generating GCC_DRIVER_NAME.
6836 * configure: Regenerate.
6837
6838 2018-04-18 Jakub Jelinek <jakub@redhat.com>
6839
6840 PR target/81084
6841 * config.gcc: Obsolete powerpc*-*-*spe*.
6842
6843 2018-04-17 Jakub Jelinek <jakub@redhat.com>
6844
6845 PR debug/84637
6846 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
6847 (stabstr_D): Change type of unum from unsigned int to
6848 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
6849 type.
6850
6851 2018-04-17 Jim Wilson <jimw@sifive.com>
6852
6853 PR 84856
6854 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
6855 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
6856 Set arg_pointer_offset after using pretend_args_size.
6857
6858 2018-04-17 Jakub Jelinek <jakub@redhat.com>
6859
6860 PR rtl-optimization/85431
6861 * dse.c (record_store): Ignore zero width stores.
6862
6863 PR sanitizer/85230
6864 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
6865 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
6866 __builtin_stack_restore rather than after it.
6867 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
6868 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
6869 argument instead of virtual_dynamic_stack_rtx.
6870
6871 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
6872
6873 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
6874 New prototype.
6875 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
6876 Add note to error message to explain internal mapping of overloaded
6877 built-in function name to non-overloaded built-in function name.
6878 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
6879 function.
6880
6881 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
6882
6883 PR target/85424
6884 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
6885 where the inputs overlap with the output.
6886
6887 2018-04-17 Jakub Jelinek <jakub@redhat.com>
6888
6889 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
6890 (=v, v) alternative and explicit "memory" attribute.
6891 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
6892 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6893 attributes.
6894 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
6895 "sselog1" type instead of "sselog".
6896 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
6897 "sselog". Remove explicit "memory" attribute.
6898 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
6899 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6900 attributes.
6901 (vec_extract_hi_v32hi): Merge all alternatives into one, use
6902 "sselog1" type instead of "sselog". Remove explicit "memory"
6903 attribute.
6904 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
6905 use "sselog1" type instead of "sselog". Remove explicit "memory"
6906 attribute.
6907 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
6908 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6909 attributes.
6910 (vec_extract_hi_v64qi): Merge all alternatives into one, use
6911 "sselog1" type instead of "sselog". Remove explicit "memory"
6912 attribute.
6913 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
6914 use "sselog1" type instead of "sselog". Remove explicit "memory"
6915 attribute.
6916
6917 PR target/85430
6918 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
6919
6920 PR middle-end/85414
6921 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
6922 on a SUBREG.
6923
6924 2018-04-17 Martin Jambor <mjambor@suse.cz>
6925
6926 PR ipa/85421
6927 * ipa-cp.c (create_specialized_node): Call
6928 expand_all_artificial_thunks if necessary.
6929
6930 2018-04-17 Martin Liska <mliska@suse.cz>
6931
6932 PR lto/85405
6933 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
6934 in message, remote space in between '_G' and '('.
6935
6936 2018-04-17 Jakub Jelinek <jakub@redhat.com>
6937
6938 PR target/85281
6939 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
6940 avx512f_vmcmp<mode>3<round_saeonly_name>,
6941 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
6942 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
6943 avx512f_rndscale<mode><round_saeonly_name>,
6944 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
6945 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
6946 Use %<iptr>2 instead of %2 for -masm=intel.
6947 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
6948 avx512f_vcvttss2usi<round_saeonly_name>,
6949 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
6950 -masm=intel.
6951 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
6952 avx512f_vcvttsd2usi<round_saeonly_name>,
6953 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
6954 Use %q1 instead of %1 for -masm=intel.
6955 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
6956 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
6957 of %3 for -masm=intel.
6958 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
6959 -masm=intel.
6960 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
6961 -masm=intel.
6962 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
6963 -masm=intel.
6964 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
6965 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
6966 %g1.
6967 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
6968 -masm=intel.
6969 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
6970 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
6971 %g1 and one with %0 and %1.
6972 (avx512er_vmrcp28<mode><round_saeonly_name>,
6973 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
6974 %1 for -masm=intel.
6975 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
6976 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
6977 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
6978 of %0 and %{%4%} for -masm=intel.
6979 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
6980 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
6981 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
6982 order of %0 and %{%5%}%{z%} for -masm=intel.
6983
6984 2018-04-17 Jan Hubicka <jh@suse.cz>
6985
6986 PR lto/85405
6987 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
6988
6989 2018-04-17 Martin Liska <mliska@suse.cz>
6990
6991 PR ipa/85329
6992 * multiple_target.c (create_dispatcher_calls): Set apostrophes
6993 for target_clone error message. Make default implementation
6994 clone to be a local declaration.
6995 (separate_attrs): Add new argument and check for an empty
6996 string.
6997 (expand_target_clones): Handle it.
6998 (ipa_target_clone): Make redirection just for target_clones
6999 functions.
7000
7001 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
7002 Tom de Vries <tom@codesourcery.com>
7003
7004 PR middle-end/84955
7005 * omp-expand.c (expand_oacc_for): Add dummy false branch for
7006 tiled basic blocks without omp continue statements.
7007
7008 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
7009
7010 PR target/83660
7011 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
7012 vec_extract expression as having side effects to make sure it gets
7013 a cleanup point.
7014
7015 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
7016
7017 PR target/85403
7018 * config/i386/i386.c (get_builtin_code_for_version): Check
7019 error_mark_node.
7020
7021 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
7022
7023 PR target/84331
7024 * gcc/config.gcc: Support "skylake".
7025 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
7026 PROCESSOR_SKYLAKE.
7027 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
7028 (processor_target_table): Add "skylake".
7029 (ix86_option_override_internal): Add "skylake".
7030 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
7031 PROCESSOR_CANNONLAKE.
7032 (get_builtin_code_for_version): Fix priority for
7033 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
7034 PROCESSOR_SKYLAKE-AVX512.
7035 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
7036 (processor_type): Add PROCESSOR_SKYLAKE.
7037
7038 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
7039 Jason Merrill <jason@redhat.com>
7040
7041 PR c++/85112
7042 * convert.c (convert_to_integer_1): Use direct recursion for
7043 enumeral types and types with a precision less than the number
7044 of bits in their mode.
7045
7046 2018-04-16 Julia Koval <julia.koval@intel.com>
7047
7048 PR target/84413
7049 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
7050 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
7051
7052 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
7053
7054 PR target/85293
7055 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
7056 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
7057 and -mno-direct-move.
7058
7059 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
7060
7061 PR target/83402
7062 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
7063 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
7064 Ensure negative shifts result in {0}.
7065
7066 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
7067
7068 PR rtl-optimization/79916
7069 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
7070 regs (if any) to define how to gnerate SD moves when LRA is in
7071 progress.
7072
7073 2018-04-13 Jakub Jelinek <jakub@redhat.com>
7074
7075 PR rtl-optimization/85393
7076 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
7077 * except.c (expand_dw2_landing_pad_for_region): Make static.
7078 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
7079 a label and unconditional jump to old_bb, rather than
7080 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
7081 basic block.
7082
7083 PR rtl-optimization/85376
7084 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
7085 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
7086 instead of a specific value.
7087
7088 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
7089 Bin Cheng <bin.cheng@arm.com>
7090
7091 PR tree-optimization/82965
7092 PR tree-optimization/83991
7093 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
7094 by_profile_only parameter.
7095 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
7096 information if the loop was predicted to iterate too many times.
7097 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
7098
7099 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
7100
7101 PR lto/71991
7102 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
7103 always inline.
7104
7105 2018-04-13 Martin Liska <mliska@suse.cz>
7106 Jakub Jelinek <jakub@redhat.com>
7107
7108 PR middle-end/81657
7109 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
7110 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
7111 * builtins.c (expand_builtin_memory_copy_args): Use
7112 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
7113 handle dest_addr == pc_rtx.
7114
7115 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
7116
7117 PR target/85291
7118 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
7119 asked to not generate direct moves.
7120 (fix_trunc<mode>si2_stfiwx): Similar.
7121 (fix_trunc<mode>si2_internal): Similar.
7122
7123 2018-04-12 Jakub Jelinek <jakub@redhat.com>
7124
7125 PR debug/83157
7126 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
7127 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
7128 lookup if dest in some wider mode is known to be const0_rtx and
7129 if so, record permanent equivalence for it to be ZERO_EXTEND of
7130 the narrower mode destination.
7131
7132 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
7133
7134 * lto-streamer-out.c (output_function): Revert 259346.
7135 * omp-expand.c (expand_oacc_for): Likewise.
7136
7137 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
7138
7139 PR rtl-optimization/85354
7140 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
7141 * sel-sched.c (sel_global_init): ... here.
7142
7143 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
7144
7145 PR target/85238
7146 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
7147 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7148 mode for PE-COFF targets.
7149 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
7150 (i386_pe_asm_lto_end): Likewise.
7151 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
7152 (TARGET_ASM_LTO_END): Likewise.
7153 * config/i386/winnt.c (saved_debug_info_level): New static variable.
7154 (i386_pe_asm_lto_start): New function.
7155 (i386_pe_asm_lto_end): Likewise.
7156
7157 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
7158 Richard Biener <rguenther@suse.de>
7159
7160 PR middle-end/84955
7161 * lto-streamer-out.c (output_function): Fix CFG loop state before
7162 streaming out.
7163 * omp-expand.c (expand_oacc_for): Handle calls to internal
7164 functions like regular functions.
7165
7166 2018-04-12 Richard Biener <rguenther@suse.de>
7167
7168 PR lto/85371
7169 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
7170 for the early LTO debug to properly generate references to it
7171 during DIE emission. Do not re-use that for the skeleton for
7172 split-dwarf.
7173 (dwarf2out_early_finish): Likewise.
7174
7175 2018-04-12 Jakub Jelinek <jakub@redhat.com>
7176
7177 PR target/85328
7178 * config/i386/sse.md
7179 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
7180 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
7181 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
7182 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
7183 and output is a reg, avoid creating invalid lowpart subreg, but
7184 instead split into a 512-bit move. Don't split if not AVX512VL,
7185 input is xmm16+ reg and output is a mem.
7186 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
7187 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
7188 xmm16+ reg and output is a mem.
7189
7190 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
7191
7192 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
7193 also for flag_dwarf2_cfi_asm.
7194
7195 2018-04-12 Jakub Jelinek <jakub@redhat.com>
7196
7197 PR rtl-optimization/85342
7198 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
7199 a bool scalar var inside of the loop instead. Don't try to update
7200 recog_data.operand after failed apply_change_group.
7201
7202 2018-04-12 Tom de Vries <tom@codesourcery.com>
7203
7204 PR target/85296
7205 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
7206 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
7207 array with flexible array member as array without given dimension.
7208 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
7209 argument for undefined param to true.
7210
7211 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
7212
7213 PR target/85321
7214 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7215 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
7216 from PowerPC section.
7217 * config/rs6000/sysv4.opt (mcall-): Improve help text.
7218 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
7219 help text that is too long.
7220 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
7221 help text that is too long.
7222 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
7223 help text that is too long.
7224
7225 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
7226
7227 * config/alpha/alpha.md (stack_probe_internal): Rename
7228 from "probe_stack". Update all callers.
7229
7230 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
7231
7232 PR rtl-optimization/84566
7233 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
7234 sched_macro_fuse_insns.
7235
7236 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
7237
7238 PR target/84301
7239 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
7240 (compute_block_dependences): ... from here.
7241
7242 2018-04-11 Jakub Jelinek <jakub@redhat.com>
7243
7244 PR tree-optimization/85331
7245 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
7246 from int to HOST_WIDE_INT.
7247
7248 2018-04-11 Martin Jambor <mjambor@suse.cz>
7249
7250 PR ipa/84149
7251 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
7252 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
7253 not the same as the source val.
7254 (cgraph_edge_brings_value_p): New parameter.
7255 (gather_edges_for_value): Pass destination value to
7256 cgraph_edge_brings_value_p.
7257 (perhaps_add_new_callers): Likewise.
7258 (get_info_about_necessary_edges): Likewise and exclude values brought
7259 only by self-recursive edges.
7260 (create_specialized_node): Redirect only clones of self-calling edges.
7261 (+self_recursive_pass_through_p): New function.
7262 (find_more_scalar_values_for_callers_subset): Use it.
7263 (find_aggregate_values_for_callers_subset): Likewise.
7264 (known_aggs_to_agg_replacement_list): Removed.
7265 (decide_whether_version_node): Re-calculate known constants for all
7266 remaining context clones.
7267
7268 2018-04-11 Richard Biener <rguenther@suse.de>
7269
7270 PR lto/85339
7271 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
7272 from early DWARF output.
7273 (dwarf2out_early_finish): Output line info unconditionally into
7274 early DWARF and add reference to it.
7275
7276 2018-04-11 Jakub Jelinek <jakub@redhat.com>
7277
7278 PR target/85281
7279 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
7280 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
7281 other than V2DFmode using iptr mode attribute.
7282 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
7283
7284 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
7285
7286 PR rtl-optimization/84659
7287 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
7288
7289 2018-04-11 Jakub Jelinek <jakub@redhat.com>
7290
7291 PR debug/85302
7292 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
7293 SIZEP is NULL.
7294 (output_loc_list): Pass address of a dummy size variable even in the
7295 locview handling loop.
7296 (index_location_lists): Add comment on why skip_loc_list_entry can't
7297 call size_of_locs.
7298
7299 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
7300
7301 PR target/85261
7302 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
7303 into register.
7304
7305 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
7306
7307 PR target/85321
7308 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7309 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
7310 and -mstring-compare-inline-limit.
7311
7312 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
7313
7314 PR target/85287
7315 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
7316 for stack clash protection in a register whenever we need it to be in
7317 a register.
7318
7319 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
7320
7321 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
7322 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
7323
7324 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
7325
7326 PR target/85321
7327 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
7328 the help text.
7329 (mlong-double-): Ditto.
7330 * config/rs6000/sysv4.opt (msdata=): Ditto.
7331 (mtls-size=): Ditto.
7332
7333 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
7334
7335 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7336 erroneous entries for
7337 "vector int vec_ldl (int, long int *)", and
7338 "vector unsigned int vec_ldl (int, unsigned long int *)".
7339 Add comments and entries for
7340 "vector bool char vec_ldl (int, bool char *)",
7341 "vector bool short vec_ldl (int, bool short *)",
7342 "vector bool int vec_ldl (int, bool int *)",
7343 "vector bool long long vec_ldl (int, bool long long *)",
7344 "vector pixel vec_ldl (int, pixel *)",
7345 "vector long long vec_ldl (int, long long *)",
7346 "vector unsigned long long vec_ldl (int, unsigned long long *)".
7347 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
7348 type tree bool_long_long_type_node and correct definition of
7349 bool_V2DI_type_node to make reference to this new type tree.
7350 (rs6000_mangle_type): Replace erroneous reference to
7351 bool_long_type_node with bool_long_long_type_node.
7352 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
7353 comments to emphasize sign distinctions for char and int types and
7354 replace RS6000_BTI_bool_long constant with
7355 RS6000_BTI_bool_long_long constant. Also add comment to restrict
7356 use of RS6000_BTI_pixel.
7357 (bool_long_type_node): Remove this macro definition.
7358 (bool_long_long_type_node): New macro definition
7359
7360 2018-04-10 Jakub Jelinek <jakub@redhat.com>
7361
7362 PR rtl-optimization/85300
7363 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
7364 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
7365 simplify_unary_operation fails.
7366
7367 2018-04-10 Martin Liska <mliska@suse.cz>
7368
7369 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
7370 cgraph_edge and ipa_ref.
7371
7372 2018-04-10 Jakub Jelinek <jakub@redhat.com>
7373
7374 PR target/85177
7375 PR target/85255
7376 * config/i386/sse.md
7377 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
7378 computation of the VEC_MERGE selector from mask.
7379 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
7380 Fix decoding of the VEC_MERGE selector into mask.
7381
7382 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
7383
7384 PR tree-optimization/85286
7385 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
7386
7387 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
7388
7389 * final.c (final_1): Set insn_last_address as well as
7390 insn_current_address.
7391
7392 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7393
7394 PR target/85173
7395 * explow.c (emit_stack_probe): Call validize_mem on memory location
7396 before passing it to gen_probe_stack. Create address operand and
7397 legitimize it for the probe_stack_address case.
7398
7399 2018-04-09 Jan Hubicka <jh@suse.cz>
7400
7401 PR lto/85078
7402 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
7403 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
7404 * tree.c (free_lang_data_in_type): Fix handling of binfos;
7405 walk basetypes.
7406 (free_lang_data): Rebuild type inheritance graph.
7407
7408 2018-04-09 Martin Sebor <msebor@redhat.com>
7409
7410 * invoke.texi (-finline-small-functions): Mention other optimization
7411 options.
7412 (-findirect-inlining, -fpartial-inlining): Same.
7413 (-finline-functions-called-once): Same.
7414 (-freorder-blocks-and-partition): Same.
7415
7416 2018-04-09 Jan Hubicka <jh@suse.cz>
7417
7418 PR rtl/84058
7419 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
7420 jumps; choose last target that matches the criteria (i.e.
7421 no partition changes for non-crossing jumps).
7422 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
7423 support for redirecting crossing jumps to non-crossing.
7424
7425 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
7426
7427 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
7428 also for naked functions.
7429
7430 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
7431
7432 * config/arc/arc.md (add_shift): New pattern.
7433 (add_shift2): Likewise.
7434 (sub_shift): Likewise.
7435 (sub_shift_cmp0_noout): Likewise.
7436 (compare_si_ashiftsi): Likewise.
7437 (xbfu_cmp0_noout): New combine pattern.
7438 (xbfu_cmp0"): Likewise.
7439 (movsi_set_cc_insn): Place the predicable variant first.
7440 (commutative_binary_cmp0_noout): Remove clobber.
7441 (commutative_binary_cmp0): New pattern.
7442 (noncommutative_binary_cmp0): Likewise.
7443 (noncommutative_binary_cmp0_noout): Likewise.
7444 (noncommutative_binary_comparison_result_used): Removed.
7445 (rsub_cmp0): New pattern.
7446 (rsub_cmp0_noout): Likewise.
7447 (extzvsi): Changed, keep only meaningful variants.
7448 (SQH, SEZ): New iterators.
7449 (SQH_postfix): New mode attribute.
7450 (SEZ_prefix): New code attribute.
7451 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
7452 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
7453 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
7454 of numerical value.
7455 (noncommutative_operator): Check the availability of barrel
7456 shifter option.
7457
7458 2018-04-09 Richard Biener <rguenther@suse.de>
7459
7460 PR tree-optimization/85284
7461 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
7462 Only use the niter constraining form of simple_iv when the exit
7463 is always executed.
7464
7465 2018-04-09 Tom de Vries <tom@codesourcery.com>
7466
7467 PR target/84041
7468 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7469 (define_expand "*memory_barrier"): New define_expand.
7470 (define_insn "memory_barrier"): New insn.
7471
7472 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
7473
7474 PR rtl-optimization/80463
7475 PR rtl-optimization/83972
7476 PR rtl-optimization/83480
7477
7478 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
7479 correct producer for the insn.
7480 (tidy_control_flow): Fixup seqnos in case of debug insns.
7481
7482 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
7483
7484 PR rtl-optimization/83913
7485
7486 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
7487 different sched-times when merging exprs.
7488
7489 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
7490
7491 PR rtl-optimization/83962
7492
7493 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
7494 tidy_fallthru_edge and tidy_control_flow.
7495
7496 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
7497
7498 PR rtl-optimization/83530
7499
7500 * sel-sched.c (force_next_insn): New global variable.
7501 (remove_insn_for_debug): When force_next_insn is true, also leave only
7502 next insn in the ready list.
7503 (sel_sched_region): When the region wasn't scheduled, make another pass
7504 over it with force_next_insn set to 1.
7505
7506 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
7507
7508 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
7509 into tm_file.
7510 * config/nds32/constants.md (unspec_volatile_element): Add enum values
7511 for interrupt control.
7512 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7513 functions for interrupt control.
7514 * config/nds32/nds32-intrinsic.md: Likewise.
7515 * config/nds32/nds32_intrinsic.h: Likewise.
7516 * config/nds32/nds32.h (nds32_builtins): Likewise.
7517
7518 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
7519
7520 * config/nds32/nds32.c (nds32_init_machine_status,
7521 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
7522 strict_aligned_p field.
7523 (nds32_expand_to_rtl_hook): New function.
7524 (TARGET_EXPAND_TO_RTL_HOOK): Define.
7525 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
7526
7527 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
7528 Chung-Ju Wu <jasonwucj@gmail.com>
7529
7530 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
7531 * config/nds32/nds32-n7.md: New file.
7532 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
7533 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
7534 pipeline.
7535 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
7536 * config/nds32/nds32.md (pipeline_model): Add n7.
7537 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
7538 * config/nds32/pipelines.md: Include n7 settings.
7539
7540 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
7541 Chung-Ju Wu <jasonwucj@gmail.com>
7542
7543 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
7544 * config/nds32/nds32-e8.md: New file.
7545 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
7546 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
7547 pipeline.
7548 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
7549 * config/nds32/nds32.md (pipeline_model): Add e8.
7550 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
7551 * config/nds32/pipelines.md: Include e8 settings.
7552
7553 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
7554 Chung-Ju Wu <jasonwucj@gmail.com>
7555
7556 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
7557 * config/nds32/nds32-n8.md: New file.
7558 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
7559 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
7560 pipeline.
7561 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
7562 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
7563 * config/nds32/nds32.md (pipeline_model): Add n8.
7564 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
7565 * config/nds32/pipelines.md: Include n8 settings.
7566
7567 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
7568 Chung-Ju Wu <jasonwucj@gmail.com>
7569
7570 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
7571 * config/nds32/nds32-n9-2r1w.md: New file.
7572 * config/nds32/nds32-n9-3r2w.md: New file.
7573 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
7574 nds32_register_ports): New or modify for cpu n9.
7575 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
7576 pipeline.
7577 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
7578 * config/nds32/nds32-utils.c: New file.
7579 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
7580 TARGET_MUL_SLOW): Define.
7581 * config/nds32/nds32.md (pipeline_model): New attribute.
7582 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
7583 New options that support cpu n9.
7584 * config/nds32/pipelines.md: Include n9 settings.
7585 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
7586
7587 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
7588
7589 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
7590 information if necessary.
7591 (output_cond_branch_compare_zero): Likewise.
7592 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
7593 (nds32_target_alignment): Refine for alignment.
7594 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
7595 (FUNCTION_BOUNDARY): Modify.
7596 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
7597 align case.
7598 * config/nds32/nds32.opt (malways-align, malign-functions): New.
7599
7600 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
7601
7602 * config/nds32/constants.md (unspec_volatile_element): Add values for
7603 TLB operation and data prefetch.
7604 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7605 functions for TLB operation and data prefetch.
7606 * config/nds32/nds32-intrinsic.md: Likewise.
7607 * config/nds32/nds32_intrinsic.h: Likewise.
7608 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
7609 (nds32_print_operand): Likewise.
7610 * config/nds32/nds32.h (nds32_builtins): Likewise.
7611
7612 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
7613 Andrew Pinski <pinsika@gcc.gnu.org>
7614
7615 PR middle-end/82976
7616 * match.pd: Use constant_boolean_node of correct type instead of
7617 boolean_true_node or boolean_false_node for simplifying
7618 pointer comparisons to zero.
7619
7620 2018-04-07 Jakub Jelinek <jakub@redhat.com>
7621
7622 PR tree-optimization/80021
7623 * tree.c (verify_type_variant): Make error call in verify_variant_match
7624 translatable and remove final full stop.
7625
7626 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
7627
7628 * config/nds32/constants.md (unspec_volatile_element): Add
7629 UNSPEC_VOLATILE_EH_RETURN.
7630 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
7631 nds32_output_stack_pop): Support dwarf exception handling process.
7632 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
7633 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
7634 exception handling process.
7635 (nds32_compute_stack_frame): Likewise.
7636 (nds32_return_addr_rtx): Likewise.
7637 (nds32_initial_elimination_offset): Likewise.
7638 (nds32_expand_prologue): Likewise.
7639 (nds32_expand_epilogue): Likewise.
7640 (nds32_dynamic_chain_address): New function.
7641 * config/nds32/nds32.h (machine_function): Add fields for dwarf
7642 exception handling.
7643 (DYNAMIC_CHAIN_ADDRESS): Define.
7644 (EH_RETURN_DATA_REGNO): Define.
7645 (EH_RETURN_STACKADJ_RTX): Define.
7646 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
7647 patterns for dwarf exception handling.
7648
7649 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
7650
7651 * config/nds32/nds32.h: Clean up obsolete macros.
7652
7653 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7654
7655 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7656 Add enum values for particular instructions.
7657 * config/nds32/nds32-intrinsic.c: Implementation of expanding
7658 particular intrinsic functions.
7659 * config/nds32/nds32-intrinsic.md: Likewise.
7660 * config/nds32/nds32_intrinsic.h: Likewise.
7661 * config/nds32/nds32.h (nds32_builtins): Likewise.
7662 * config/nds32/nds32.md (type): Add pbsad and pbsada.
7663 (btst, ave): New patterns for particular instructions.
7664
7665 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7666
7667 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7668 Add enum values for atomic load/store and memory sync.
7669 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
7670 and memory sync.
7671 * config/nds32/nds32-intrinsic.md: Likewise.
7672 * config/nds32/nds32_intrinsic.h: Likewise.
7673 * config/nds32/nds32.h (nds32_builtins): Likewise.
7674
7675 2018-04-07 Jakub Jelinek <jakub@redhat.com>
7676
7677 PR tree-optimization/85257
7678 * fold-const.c (native_encode_vector): If not all elts could fit
7679 and off is -1, return 0 rather than offset.
7680 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
7681 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
7682 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
7683 adjust buffer in native_interpret_expr call.
7684
7685 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7686
7687 * config/nds32/constants.md (unspec_volatile_element): Add cache
7688 control enum values.
7689 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
7690 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
7691 * config/nds32/nds32.c (nds32_cctl_names): New.
7692 (nds32_print_operand): Handle cache control register names.
7693 * config/nds32/nds32.h (nds32_builtins): New enum values.
7694 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
7695 macros.
7696 * config/nds32/nds32.md (type): Add mmu.
7697 * config/nds32/pipelines.md (simple_insn): Add mmu.
7698
7699 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
7700
7701 * config/nds32/nds32.md (type): Remove call.
7702 * config/nds32/pipelines.md (simple_insn): Likewise.
7703
7704 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7705
7706 * config/nds32/constants.md (unspec_volatile_element): Add
7707 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
7708 UNSPEC_VOLATILE_FMFCFG.
7709 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
7710 description for fmfcfg and fmfcsr.
7711 (bdesc_1arg): Add fmtcsr.
7712 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
7713 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
7714 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
7715 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
7716 unspec_fmfcfg): New patterns.
7717 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
7718 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
7719 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
7720 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
7721 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
7722 __nds32__fmfcfg): Define.
7723
7724 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
7725
7726 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
7727 intrinsic register names.
7728 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
7729 intrinsic register enum values and macros.
7730
7731 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
7732
7733 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
7734 for load/store addressing form.
7735 (nds32_print_operand_address): Likewise.
7736
7737 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
7738
7739 PR target/85196
7740 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
7741 based on LABEL_REF. Remove useless assertion.
7742 (pic_address_needs_scratch): Fix formatting.
7743 (sparc_legitimize_pic_address): Minor tweaks.
7744 (sparc_delegitimize_address): Adjust assertion accordingly.
7745 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
7746 into symbolic_operand.
7747 (movsi_high_pic_label_ref): Likewise.
7748 (movsi_lo_sum_pic_label_ref): Likewise.
7749 (movdi_pic_label_ref): Likewise.
7750 (movdi_high_pic_label_ref): Likewise.
7751 (movdi_lo_sum_pic_label_ref): Likewise.
7752
7753 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
7754
7755 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
7756 custom LIB_SPEC setup.
7757
7758 2018-04-06 Ruslan Bukin <br@bsdpad.com>
7759 Kito Cheng <kito.cheng@gmail.com>
7760
7761 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
7762 * config/riscv/freebsd.h: New.
7763
7764 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
7765
7766 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
7767 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
7768 file.
7769
7770 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
7771 Kito Cheng <kito.cheng@gmail.com>
7772
7773 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
7774 nds32_output_call, nds32_symbol_binds_local_p): New functions.
7775 * config/nds32/nds32-protos.h (nds32_output_call,
7776 nds32_output_return): Declare.
7777 * config/nds32/nds32.md: Refine all the call and return patterns.
7778
7779 2018-04-06 Jakub Jelinek <jakub@redhat.com>
7780
7781 PR debug/85252
7782 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
7783 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
7784
7785 PR rtl-optimization/84872
7786 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
7787 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
7788 EDGE_CROSSING edge.
7789
7790 2018-04-06 Tamar Christina <tamar.christina@arm.com>
7791
7792 * expr.c (copy_blkmode_to_reg): Revert 254862.
7793 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
7794
7795 2018-04-06 Richard Biener <rguenther@suse.de>
7796
7797 PR middle-end/85244
7798 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
7799 after seeing a component reference with an adjacent field. Treat
7800 refs to arrays at struct end of external decls similar to
7801 refs to unconstrained commons.
7802
7803 2018-04-06 Jakub Jelinek <jakub@redhat.com>
7804
7805 PR sanitizer/85213
7806 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
7807 look through SAVE_EXPRs with non-side-effects argument. Adjust
7808 recursive calls.
7809 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
7810 save_p here.
7811
7812 2018-04-06 Richard Biener <rguenther@suse.de>
7813
7814 PR middle-end/85180
7815 * alias.c (find_base_term): New wrapper around find_base_term
7816 unwinding CSELIB_VAL_PTR changes.
7817 (find_base_term): Do not restore CSELIB_VAL_PTR during the
7818 recursion.
7819
7820 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
7821
7822 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
7823 instructions.
7824 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
7825 constant definitions.
7826 ("nop"): lr 0,0 -> nopr r0
7827 ("nop_lr0", "nop_lr1"): New insn definitions.
7828
7829 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
7830
7831 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
7832 NDS32_V3PUSH_AVAILABLE_P macro.
7833
7834 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
7835 Chung-Ju Wu <jasonwucj@gmail.com>
7836
7837 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
7838 (nds32*-*-*): Add float and fpu_config into supported_defaults.
7839 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
7840 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
7841 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
7842 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
7843 * config/nds32/constraints.md: New constraints and checking for hard
7844 float configuration.
7845 * config/nds32/iterators.md: New mode iterator and attribute for hard
7846 float configuration.
7847 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
7848 patterns.
7849 * config/nds32/nds32-fpu.md: New file.
7850 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
7851 deal with hard float code generation.
7852 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
7853 ARCH_V3S.
7854 (abi_type, float_reg_number): New enum type.
7855 * config/nds32/nds32-predicates.c: New predicates for hard float.
7856 * config/nds32/nds32-protos.h: Declare functions for hard float.
7857 * config/nds32/nds32.c: Implementation for hard float configuration.
7858 * config/nds32/nds32.h: Definitions for hard float configuration.
7859 * config/nds32/nds32.md: Include hard float machine description and
7860 modify patterns for hard float configuration.
7861 * config/nds32/nds32.opt: New options for hard float configuration.
7862 * config/nds32/predicates.md: New predicates for hard float
7863 configuration.
7864
7865 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7866
7867 * common/config/nds32/nds32-common.c
7868 (nds32_option_optimization_table): Enable -mreleax-hint by default.
7869
7870 2018-04-05 Jakub Jelinek <jakub@redhat.com>
7871
7872 PR middle-end/85195
7873 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
7874 CONSTRUCTOR_ELT (ctor, ...)->value.
7875
7876 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
7877
7878 PR target/85193
7879 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
7880
7881 2018-04-05 Tom de Vries <tom@codesourcery.com>
7882
7883 PR target/85204
7884 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
7885 cond jump.
7886
7887 2018-04-05 Shiva Chen <shiva0217@gmail.com>
7888 Kito Cheng <kito.cheng@gmail.com>
7889
7890 * config/nds32/constraints.md (U33): Fine-tune checking condition.
7891 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
7892 * config/nds32/nds32.h (nds32_16bit_address_type): Add
7893 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
7894
7895 2018-04-05 Shiva Chen <shiva0217@gmail.com>
7896 Kito Cheng <kito.cheng@gmail.com>
7897
7898 * config/nds32/constraints.md (Ufe): New memory constraint.
7899 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
7900 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
7901 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
7902 operands.
7903 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
7904 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
7905
7906 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7907
7908 * config/nds32/nds32.md: Use optimize_size in the condition for
7909 alu-shift instructions.
7910
7911 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7912
7913 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
7914
7915 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7916
7917 * config/nds32/nds32.md (negsi2): Refine pattern.
7918
7919 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
7920 Chung-Ju Wu <jasonwucj@gmail.com>
7921
7922 * config/nds32/iterators.md (shift_rotate): New code iterator.
7923 (shift): New code attribute.
7924 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
7925 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
7926 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
7927 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
7928 bit-wise operations.
7929 (andsi3, *andsi3): Ditto.
7930 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
7931 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
7932 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
7933 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
7934 nds32_ior_operand, nds32_xor_operand): New predicates.
7935
7936 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7937
7938 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
7939 (addsi3, subsi3): ... this.
7940
7941 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7942
7943 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
7944
7945 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7946
7947 * config/nds32/nds32.md: Adjust indention.
7948
7949 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
7950
7951 * config/nds32/nds32.md (feature): New attribute.
7952
7953 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
7954
7955 * config/nds32/nds32.md (subtype): New attribute.
7956
7957 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
7958
7959 PR target/85203
7960 * config/arm/arm-builtins.c (arm_expand_builtin): Change
7961 expansion to perform a bitwise AND of the argument followed by a
7962 boolean negation of the result.
7963
7964 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
7965
7966 PR rtl-optimization/84878
7967 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
7968 the basic block. Assert the use reference is not artificial and that
7969 it has an associated insn.
7970
7971 2018-04-04 Michael Matz <matz@suse.de>
7972
7973 * builtins.c (compute_objsize): Pass correct operand
7974 to array_at_struct_end_p.
7975
7976 2018-04-04 Richard Biener <rguenther@suse.de>
7977
7978 PR lto/85176
7979 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
7980 from contexts for DINFO_LEVEL_TERSE and below.
7981
7982 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
7983
7984 * config/nds32/nds32-doubleword.md (move_<mode>): Require
7985 resiter_operand condition.
7986 * config/nds32/nds32.md (*move<mode>): Ditto.
7987
7988 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
7989 Monk Chiang <sh.chiang04@gmail.com>
7990
7991 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
7992
7993 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
7994
7995 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
7996
7997 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
7998 Kito Cheng <kito.cheng@gmail.com>
7999
8000 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
8001 nds32_cond_code_str, output_cond_branch,
8002 output_cond_branch_compare_zero, nds32_expand_cbranch,
8003 nds32_expand_cstore, nds32_expand_movcc,
8004 nds32_output_cbranchsi4_equality_zero,
8005 nds32_output_cbranchsi4_equality_reg,
8006 nds32_output_cbranchsi4_equality_reg_or_const_int,
8007 nds32_output_cbranchsi4_greater_less_zero: New functions.
8008 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
8009 nds32_expand_cstore, nds32_expand_movcc,
8010 nds32_output_cbranchsi4_equality_zero,
8011 nds32_output_cbranchsi4_equality_reg,
8012 nds32_output_cbranchsi4_equality_reg_or_const_int,
8013 nds32_output_cbranchsi4_greater_less_zero): Declare.
8014 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
8015 nds32_rimm11s_operand): New predicates.
8016 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
8017 * config/nds32/nds32.md: Rewrite all the branch and conditional move
8018 patterns.
8019
8020 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
8021
8022 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
8023 * config/nds32/nds32.md: Ditto.
8024 * config/nds32/pipelines.md: Ditto.
8025
8026 2018-04-04 Richard Biener <rguenther@suse.de>
8027
8028 PR tree-optimization/85168
8029 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
8030 propagating abnormals.
8031
8032 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8033
8034 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
8035
8036 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8037 Kito Cheng <kito.cheng@gmail.com>
8038
8039 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
8040 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
8041 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
8042 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
8043 * config/nds32/nds32.md (sibcall_internal): New.
8044 (sibcall_register): Remove.
8045 (sibcall_immediate): Remove.
8046 (sibcall_value_internal): New.
8047 (sibcall_value_register): Remove.
8048 (sibcall_value_immediate): Remove.
8049 * config/nds32/predicates.md (nds32_general_register_operand): New.
8050 (nds32_call_address_operand): New.
8051
8052 2018-04-03 Jakub Jelinek <jakub@redhat.com>
8053
8054 PR rtl-optimization/85167
8055 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
8056 bb_defs if *split_p, instead preinitialize it to NULL.
8057
8058 PR tree-optimization/85156
8059 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
8060 evaluating the argument multiple times.
8061
8062 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
8063
8064 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
8065 than vector.
8066 (_mm_cvtpd_ps): Likewise.
8067 (_mm_cvttpd_epi32): Likewise.
8068 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
8069 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
8070 vector, pixel, and bool following altivec.h include.
8071
8072 2018-04-03 Martin Sebor <msebor@redhat.com>
8073
8074 * doc/extend.texi (Common Function Attributes): Clarify.
8075 (const attribute): Likewise.
8076 (pure attribute): Likewise.
8077
8078 2018-04-03 Jakub Jelinek <jakub@redhat.com>
8079
8080 PR target/85169
8081 * config/i386/i386.c (ix86_expand_vector_set): Use
8082 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
8083
8084 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
8085
8086 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
8087 instructions when changing rounding bits to preserve precision bits
8088 in the x87 control word.
8089
8090 2018-04-03 Martin Liska <mliska@suse.cz>
8091
8092 PR tree-optimization/82491
8093 * rtl.h (strip_offset_and_add): Replace += suboffset with
8094 poly_uint64 () + suboffset.
8095
8096 2018-03-29 Martin Liska <mliska@suse.cz>
8097 Martin Jambor <mjambor@suse.cz>
8098
8099 PR ipa/84947
8100 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
8101 param_type is not an integral or pointer type.
8102
8103 2018-04-03 Richard Biener <rguenther@suse.de>
8104
8105 * sese.h (recompute_all_dominators): Remove.
8106
8107 2018-04-02 Martin Sebor <msebor@redhat.com>
8108
8109 * doc/invoke.texi (-Wrestrict): Fix typos.
8110
8111 2018-04-02 Jim Wilson <jimw@sifive.com>
8112
8113 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
8114 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
8115 (<optab>di3, <optab>si3_extend): Likewise.
8116 (<optab>si3_mask, <optab>si3_mask_1): New.
8117 (<optab>di3_mask, <optab>di3_mask_1): New.
8118 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
8119 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
8120 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
8121
8122 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
8123
8124 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
8125 example.
8126
8127 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
8128
8129 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
8130 (nds32_canonicalize_comparison): New function.
8131
8132 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
8133 Kito Cheng <kito.cheng@gmail.com>
8134 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8135
8136 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
8137 * config/nds32/constants.md (unspec_volatile_element): Add
8138 UNSPEC_VOLATILE_RELAX_GROUP.
8139 * config/nds32/nds32-relax-opt.c: New file.
8140 * config/nds32/nds32-predicates.c
8141 (nds32_symbol_load_store_p): New function.
8142 * config/nds32/nds32-protos.h
8143 (nds32_symbol_load_store_p): Declare function.
8144 (make_pass_nds32_relax_opt): Declare new rtl pass function.
8145 * config/nds32/nds32.c
8146 (nds32_register_pass): New function to register pass.
8147 (nds32_register_passes): New function to register passes.
8148 * config/nds32/nds32.md (relax_group): New pattern.
8149 * config/nds32/nds32.opt (mrelax-hint): New option.
8150 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
8151
8152 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
8153
8154 * config/nds32/t-nds32: Modify files dependency.
8155
8156 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
8157
8158 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
8159 (PROFILE_HOOK): Define its implementation.
8160
8161 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
8162
8163 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
8164 type and 32-bit size.
8165
8166 2018-04-01 Jakub Jelinek <jakub@redhat.com>
8167
8168 PR middle-end/85090
8169 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
8170 (V_128_256): New mode iterator.
8171 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
8172 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
8173 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
8174 of V.
8175 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
8176 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
8177
8178 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
8179
8180 PR target/83315
8181 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
8182 NaN inputs correctly.
8183
8184 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
8185
8186 PR target/80546
8187 * config/rs6000/vsx.md (??r): New mode attribute.
8188 (*vsx_mov<mode>_64bit): Use it.
8189 (*vsx_mov<mode>_32bit): Likewise.
8190
8191 2018-03-30 Martin Sebor <msebor@redhat.com>
8192
8193 PR tree-optimization/84818
8194 * builtins.c (check_access): Use warning_n.
8195
8196 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
8197
8198 PR target/83822
8199 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
8200 condition.
8201 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
8202 condition.
8203
8204 2018-03-30 Julia Koval <julia.koval@intel.com>
8205
8206 PR target/84413
8207 * x86-tune.def (movx, partial_reg_dependency): Enable for
8208 m_SKYLAKE_AVX512.
8209
8210 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
8211
8212 PR inline-asm/84985
8213 * lra-constraints.c (process_alt_operands): Move setting
8214 this_alternative_matches below.
8215
8216 2018-03-29 Martin Liska <mliska@suse.cz>
8217
8218 PR lto/84995.
8219 * doc/invoke.texi: Document how LTO works with debug info.
8220 Describe auto-load support of binutils. Mention 'x86-64'
8221 as valid option value of -march option.
8222
8223 2018-03-29 Jakub Jelinek <jakub@redhat.com>
8224
8225 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
8226
8227 PR c/85094
8228 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
8229 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
8230 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
8231 checking.
8232
8233 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
8234
8235 PR target/84912
8236 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
8237 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
8238 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
8239 for RS6000_BTM_POWERPC64.
8240 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
8241 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
8242 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
8243 definition.
8244 (DIVDE): Use it.
8245 (DIVDEU): Likewise.
8246
8247 2018-03-28 Carl Love <cel@us.ibm.com>
8248
8249 Revert
8250 2017-09-27 Carl Love <cel@us.ibm.com>
8251
8252 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8253 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8254 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8255 fctiw instruction.
8256
8257 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8258
8259 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
8260 instead of __vector bool.
8261 (_mm_max_pu8): Likewise.
8262 (_mm_min_pi16): Likewise.
8263
8264 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
8265
8266 PR target/84912
8267 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
8268 (DIVWEUO): Likewise.
8269 (DIVDEO): Likewise.
8270 (DIVDEUO): Likewise.
8271 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
8272 DIVWEUO and DIVDEUO.
8273 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
8274 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
8275 (div_extend): Likewise.
8276 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
8277 builtin function.
8278 (__builtin_divweuo): Likewise.
8279 (__builtin_divdeo): Likewise.
8280 (__builtin_divdeuo): Likewise.
8281
8282 2018-03-28 Jakub Jelinek <jakub@redhat.com>
8283
8284 PR target/85095
8285 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
8286 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
8287
8288 PR tree-optimization/82004
8289 * gimple-match-head.c (optimize_pow_to_exp): New function.
8290 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
8291 Don't fold to exp if optimize_pow_to_exp is false.
8292
8293 2018-03-28 Martin Liska <mliska@suse.cz>
8294
8295 PR other/84819
8296 * calls.c (initialize_argument_information): Fix trailing space.
8297 * common.opt: Fix typo and provide better explanation for
8298 -fsanitize-coverage option.
8299 * config/i386/i386.opt: Fix typo.
8300
8301 2018-03-28 Jakub Jelinek <jakub@redhat.com>
8302 Martin Liska <mliska@suse.cz>
8303
8304 PR sanitizer/85081
8305 * gimplify.c (asan_poison_variable): Don't do the check for
8306 gimplify_omp_ctxp here.
8307 (gimplify_decl_expr): Do it here.
8308 (gimplify_target_expr): Likewise.
8309
8310 2018-03-28 Martin Liska <mliska@suse.cz>
8311
8312 PR target/84988
8313 * config/i386/i386.c (ix86_function_arg_advance): Do not call
8314 chkp_type_bounds_count if MPX is not enabled.
8315
8316 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
8317
8318 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
8319
8320 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
8321
8322 PR target/84914
8323 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
8324 function to create the function decl for complex long double
8325 multiply and divide for -mabi=ieeelongdouble.
8326 (init_float128_ieee): Call it.
8327
8328 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
8329
8330 PR target/85044
8331 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
8332 -fcf-protection=branch -mibt.
8333 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
8334
8335 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8336
8337 PR target/81863
8338 * config/arm/arm.c (arm_valid_symbolic_address): Handle
8339 arm_word_relocations.
8340
8341 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
8342
8343 PR target/85056
8344 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
8345 extern array declarations.
8346
8347 2018-03-27 Richard Biener <rguenther@suse.de>
8348
8349 PR middle-end/84067
8350 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
8351 explicit single_use checks.
8352
8353 2018-03-27 Richard Biener <rguenther@suse.de>
8354
8355 PR tree-optimization/85082
8356 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
8357 Valueize the VUSE.
8358
8359 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8360
8361 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
8362 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
8363 Turn on fasynchronous-unwind-tables and funwind-tables.
8364
8365 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
8366
8367 PR target/85073
8368 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
8369 (*bmi_blsr_<mode>_ccz): Ditto.
8370
8371 2018-03-26 Tom de Vries <tom@codesourcery.com>
8372
8373 PR tree-optimization/85063
8374 * omp-general.c (offloading_function_p): New function. Factor out
8375 of ...
8376 * omp-offload.c (pass_omp_target_link::gate): ... here.
8377 * omp-general.h (offloading_function_p): Declare.
8378 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
8379 with attribute omp declare target for offloading functions.
8380
8381 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
8382
8383 PR tree-optimization/84005
8384 * tree-data-ref.h (get_base_for_alignment): Declare.
8385 * tree-data-ref.c (get_base_for_alignment_1): New function.
8386 (get_base_for_alignment): Likewise.
8387 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
8388 get_base_for_alignment to find a suitable base object, instead
8389 of always using drb->base_address.
8390
8391 2018-03-23 Jakub Jelinek <jakub@redhat.com>
8392
8393 PR inline-asm/85022
8394 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
8395 known size by default.
8396
8397 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
8398
8399 PR inline-asm/85030
8400 * lra-constraints.c (process_alt_operands): Don't match BLKmode
8401 and non BLKmode operands.
8402
8403 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8404
8405 PR target/85026
8406 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
8407 Clean up attributes.
8408
8409 2018-03-23 Richard Biener <rguenther@suse.de>
8410
8411 PR debug/85020
8412 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
8413 we are going to emit early debug for LTO.
8414
8415 2018-03-23 Jakub Jelinek <jakub@redhat.com>
8416
8417 PR inline-asm/85034
8418 * function.c (match_asm_constraints_1): Don't optimize if input
8419 doesn't satisfy general_operand predicate for output's mode.
8420
8421 PR inline-asm/85022
8422 * alias.c (write_dependence_p): Don't require for x_canonicalized
8423 non-VOIDmode if x has VOIDmode.
8424
8425 PR sanitizer/85029
8426 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
8427 just don't try to optimize it rather than assert it never happens.
8428
8429 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8430
8431 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
8432 macro expansions for definition of ST_INTERNAL_<mode> and
8433 LD_INTERNAL_<mode> builtins.
8434 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
8435 Remove prototype.
8436 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
8437 function.
8438 (altivec_expand_st_builtin): Likewise.
8439 (altivec_expand_builtin): Remove calls to deleted functions.
8440 (rs6000_address_for_altivec): Delete this function.
8441 * config/rs6000/vector.md: Remove expands for
8442 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
8443
8444 2018-03-22 Sudakshina Das <sudi.das@arm.com>
8445
8446 PR target/84826
8447 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
8448 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
8449 re-computing once computed.
8450 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
8451 (arm_init_machine_status): Initialize
8452 machine->static_chain_stack_bytes.
8453
8454 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8455
8456 PR target/84760
8457 * doc/extend.texi: Add four new prototypes for vec_ld.
8458 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
8459 definitions for more logical presentation.
8460 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
8461 entries for V1TI variants of __builtin_altivec_ld builtin.
8462 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
8463 handling of V1TI variant of LVX icode pattern.
8464 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
8465 (rs6000_gimple_fold_builtin): Likewise.
8466 (altivec_init_builtins): Add code to define
8467 __builtin_altivec_lvx_v1ti function.
8468
8469 2018-03-22 Jakub Jelinek <jakub@redhat.com>
8470
8471 PR inline-asm/84941
8472 * function.c (match_asm_constraints_1): Don't do the optimization
8473 if input isn't a REG, SUBREG, MEM or constant.
8474
8475 2018-03-22 Tom de Vries <tom@codesourcery.com>
8476
8477 PR tree-optimization/84956
8478 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
8479 bb_has_abnormal_pred.
8480
8481 2018-03-22 Jakub Jelinek <jakub@redhat.com>
8482
8483 PR sanitizer/85018
8484 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
8485 DECL_INITIAL (decl) to decl at the end.
8486 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
8487 adjust the comment.
8488
8489 2018-03-21 Joseph Myers <joseph@codesourcery.com>
8490
8491 * doc/extend.texi (__builtin_tgmath): Document when complex
8492 integer types are treated as _Complex _Float64.
8493
8494 2018-03-21 Tom de Vries <tom@codesourcery.com>
8495
8496 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
8497
8498 2018-03-21 Jakub Jelinek <jakub@redhat.com>
8499
8500 PR tree-optimization/84960
8501 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
8502 if it is ENTRY block, move them into single succ of ENTRY in that case.
8503
8504 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
8505
8506 PR tree-optimization/84811
8507 * poly-int.h (poly_span_traits): Remove the T3 parameter and
8508 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
8509 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
8510 (known_subrange_p): Update accordingly. Cast each value involved
8511 in the size comparison, rather than casting the result of the
8512 subtraction.
8513
8514 2018-03-21 Jakub Jelinek <jakub@redhat.com>
8515
8516 PR tree-optimization/84982
8517 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
8518 by flipping the least significant bit rather than all bits from
8519 bitpos to bitpos + bitsize - 1.
8520
8521 2018-03-21 Nathan Sidwell <nathan@acm.org>
8522
8523 * doc/extend.texi (Deprecated Features): Remove mention of
8524 long-deleted deprecations.
8525
8526 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8527
8528 PR jit/84288
8529 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
8530 * configure: Regenerate.
8531
8532 2018-03-21 Tom de Vries <tom@codesourcery.com>
8533
8534 PR tree-optimization/83126
8535 * tree-parloops.c (num_phis): New function.
8536 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
8537
8538 2018-03-21 Nathan Sidwell <nathan@acm.org>
8539
8540 * doc/extend.texi (Deprecated Features): Update deprecated flags,
8541 mention anon-struct/union members and trailing attributes.
8542
8543 2018-03-21 Bin Cheng <bin.cheng@arm.com>
8544
8545 PR tree-optimization/84969
8546 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
8547 builtin memset partitions if they set different rhs values.
8548
8549 2018-03-21 Jakub Jelinek <jakub@redhat.com>
8550
8551 PR rtl-optimization/84989
8552 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
8553 VEC_DUPLICATE with scalar result mode.
8554
8555 2018-03-21 Martin Liska <mliska@suse.cz>
8556
8557 PR ipa/84963
8558 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
8559 not intended return statement.
8560
8561 2018-03-21 Martin Liska <mliska@suse.cz>
8562
8563 PR target/84988
8564 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
8565 (chkp_find_bound_slots_1): Limit number of iterations.
8566
8567 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
8568
8569 PR target/84838
8570 * Minor grammar fixes for x86 options.
8571
8572 2018-03-20 Jakub Jelinek <jakub@redhat.com>
8573
8574 PR debug/84875
8575 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
8576 holding REG_CFA_RESTORE notes, instead turn them into a USE.
8577
8578 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
8579
8580 PR target/83789
8581 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
8582 (altivec_lvx_<mode>_1op): Likewise.
8583 (altivec_stvx_<mode>_2op): Likewise.
8584 (altivec_stvx_<mode>_1op): Likewise.
8585 (altivec_lvx_<VM2:mode>): New define_expand.
8586 (altivec_stvx_<VM2:mode>): Likewise.
8587 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
8588 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8589 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
8590 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8591 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
8592 (rs6000_gen_lvx): Likewise.
8593 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
8594 (altivec_expand_stv_builtin): Likewise.
8595 (altivec_expand_builtin): Likewise.
8596 * config/rs6000/vector.md: Likewise.
8597
8598 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8599
8600 PR target/82518
8601 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
8602 BYTES_BIG_ENDIAN.
8603
8604 2018-03-20 Richard Biener <rguenther@suse.de>
8605
8606 PR target/84986
8607 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
8608 sign-conversions as zero, fall back to standard scalar_stmt
8609 cost for the rest.
8610
8611 2018-03-20 Martin Liska <mliska@suse.cz>
8612
8613 PR ipa/84825
8614 * predict.c (rebuild_frequencies): Handle case when we have
8615 PROFILE_ABSENT, but flag_guess_branch_prob is false.
8616
8617 2018-03-20 Jakub Jelinek <jakub@redhat.com>
8618
8619 PR target/84990
8620 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
8621 flag_section_anchors.
8622 * varasm.c (use_blocks_for_decl_p): Remove hack for
8623 dw2_force_const_mem.
8624
8625 PR target/84845
8626 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
8627 to ...
8628 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
8629 be created, use lowpart_subreg of operands[0] rather than operands[0]
8630 itself.
8631 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
8632 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
8633 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
8634 and n constraint instead of aarch64_shift_imm_di and Usd.
8635 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
8636 (*aarch64_<optab>_reg_minus<mode>3): ... this.
8637
8638 2018-03-20 Sudakshina Das <sudi.das@arm.com>
8639
8640 PR target/82989
8641 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
8642 to favor GPR over NEON registers.
8643 (<shift>di3_neon): Likewise.
8644
8645 2018-03-20 Tom de Vries <tom@codesourcery.com>
8646
8647 PR target/84952
8648 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
8649 (nvptx_process_pars): Emit bar.sync asap and alap.
8650
8651 2018-03-20 Tom de Vries <tom@codesourcery.com>
8652
8653 PR target/84954
8654 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
8655 seen_label if seen_label is already set.
8656
8657 2018-03-20 Jakub Jelinek <jakub@redhat.com>
8658
8659 PR target/84945
8660 * config/i386/i386.c (fold_builtin_cpu): For features above 31
8661 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
8662 Use 1U instead of 1. Formatting fixes.
8663
8664 PR c/84953
8665 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
8666 instead of TREE_TYPE (s1) for the return value.
8667
8668 2018-03-19 Jakub Jelinek <jakub@redhat.com>
8669
8670 PR tree-optimization/84946
8671 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
8672 bitsize + bitsize in poly_uint64 rather than poly_int64.
8673
8674 PR sanitizer/78651
8675 * dwarf2asm.c: Include fold-const.c.
8676 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
8677 of decl rather than decl itself.
8678
8679 PR rtl-optimization/84643
8680 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
8681
8682 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
8683
8684 PR sanitizer/78651
8685 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
8686 calling assemble_variable.
8687
8688 2018-03-19 Sudakshina Das <sudi.das@arm.com>
8689
8690 PR target/81647
8691 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
8692 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
8693
8694 2018-03-19 Jim Wilson <jimw@sifive.com>
8695
8696 PR bootstrap/84856
8697 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
8698 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
8699 (riscv_first_stack_step): Likewise.
8700 (riscv_option_override): Use STACK_BOUNDARY instead of
8701 MIN_STACK_BOUNDARY.
8702 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
8703 MIN_STACK_BOUNDARY.
8704 (BIGGEST_ALIGNMENT): Set to 128.
8705 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
8706 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
8707 STACK_BOUNDARY.
8708
8709 2018-03-19 Richard Biener <rguenther@suse.de>
8710
8711 PR tree-optimization/84933
8712 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
8713 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
8714
8715 2018-03-19 Richard Biener <rguenther@suse.de>
8716
8717 PR tree-optimization/84859
8718 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
8719 (cond_if_else_store_replacement): Perform sinking operation on
8720 single-store BBs regardless of MAX_STORES_TO_SINK setting.
8721 Generalize what a BB with a single eligible store is.
8722
8723 2018-03-19 Richard Biener <rguenther@suse.de>
8724
8725 PR tree-optimization/84929
8726 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
8727 chrec_is_positive against non-chrec arg.
8728
8729 2018-03-19 Tamar Christina <tamar.christina@arm.com>
8730
8731 PR target/84711
8732 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
8733
8734 2018-03-18 Martin Liska <mliska@suse.cz>
8735
8736 PR rtl-optimization/84635
8737 * regrename.c (build_def_use): Use matches_mode only when
8738 matches >= 0.
8739
8740 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
8741
8742 PR tree-optimization/84913
8743 * tree-vect-loop.c (vectorizable_reduction): Don't try to
8744 vectorize chains of COND_EXPRs.
8745
8746 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
8747
8748 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
8749
8750 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
8751
8752 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
8753
8754 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
8755
8756 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
8757
8758 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
8759 Kito Cheng <kito.cheng@gmail.com>
8760
8761 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
8762 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
8763 (nds32_adjust_reg_alloc_order): New function.
8764 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
8765
8766 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
8767
8768 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
8769 nds32_print_operand, nds32_print_operand_address): Use
8770 HOST_WIDE_INT_PRINT_DEC instead.
8771
8772 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
8773
8774 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
8775
8776 2018-03-17 Jakub Jelinek <jakub@redhat.com>
8777
8778 PR target/84902
8779 * config/i386/i386.c (initial_ix86_tune_features,
8780 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
8781 unsigned long long.
8782 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
8783 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
8784 rather than 1u << ix86_tune. Formatting fix.
8785 (ix86_option_override_internal): Change ix86_arch_mask from
8786 unsigned int to unsigned HOST_WIDE_INT, initialize to
8787 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
8788 (ix86_function_specific_restore): Likewise.
8789
8790 2018-03-16 Jakub Jelinek <jakub@redhat.com>
8791
8792 PR target/84899
8793 * postreload.c (reload_combine_recognize_pattern): Perform
8794 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
8795 truncate_int_for_mode the result for the destination's mode.
8796
8797 PR c/84909
8798 * hsa-gen.c (mem_type_for_type): Fix comment typo.
8799 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
8800 Likewise.
8801 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
8802 Likewise.
8803
8804 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
8805
8806 PR target/84876
8807 * lra-assigns.c (lra_split_hard_reg_for): Don't use
8808 regno_allocno_class_array and sorted_pseudos.
8809 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
8810 insns where regno is used.
8811
8812 2018-03-16 Martin Liska <mliska@suse.cz>
8813
8814 PR ipa/84833
8815 * multiple_target.c (create_dispatcher_calls): Redirect
8816 reference in the symbol table.
8817
8818 2018-03-16 Martin Liska <mliska@suse.cz>
8819
8820 PR ipa/84722
8821 * multiple_target.c (create_dispatcher_calls): Redirect also
8822 an alias.
8823
8824 2018-03-16 Jakub Jelinek <jakub@redhat.com>
8825
8826 PR c++/79937
8827 PR c++/82410
8828 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
8829 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
8830 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
8831
8832 2018-03-16 Julia Koval <julia.koval@intel.com>
8833
8834 * doc/invoke.texi (Skylake Server): Add CLWB.
8835 Cannonlake): Remove CLWB.
8836
8837 2018-03-16 Jakub Jelinek <jakub@redhat.com>
8838
8839 PR tree-optimization/84841
8840 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
8841 1 << 3.
8842 (FLOAT_ONE_CONST_TYPE): Define.
8843 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
8844 (sort_by_operand_rank): Put entries with higher constant_type last
8845 rather than first to match comments.
8846
8847 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
8848
8849 * config/nios2/nios2.md (movsi_internal): Fix thinko in
8850 split predicate.
8851
8852 2018-03-15 Jakub Jelinek <jakub@redhat.com>
8853
8854 PR c++/79085
8855 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
8856 check and use address of target always.
8857
8858 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
8859
8860 PR target/84574
8861 * config/i386/i386.c (indirect_thunk_needed): Update comments.
8862 (indirect_thunk_bnd_needed): Likewise.
8863 (indirect_thunks_used): Likewise.
8864 (indirect_thunks_bnd_used): Likewise.
8865 (indirect_return_needed): New.
8866 (indirect_return_bnd_needed): Likewise.
8867 (output_indirect_thunk_function): Add a bool argument for
8868 function return.
8869 (output_indirect_thunk_function): Don't generate alias for
8870 function return thunk.
8871 (ix86_code_end): Call output_indirect_thunk_function to generate
8872 function return thunks.
8873 (ix86_output_function_return): Set indirect_return_bnd_needed
8874 and indirect_return_needed instead of indirect_thunk_bnd_needed
8875 and indirect_thunk_needed.
8876
8877 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
8878
8879 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
8880 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
8881 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
8882
8883 2018-03-15 David Malcolm <dmalcolm@redhat.com>
8884 Paul Hua <paul.hua.gm@gmail.com>
8885
8886 PR c/84852
8887 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
8888
8889 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
8890
8891 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
8892 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
8893 resp. SFmode cases.
8894
8895 2018-03-15 Tamar Christina <tamar.christina@arm.com>
8896
8897 PR target/84711
8898 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8899 instead of GET_MODE_SIZE when comparing Units.
8900
8901 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8902
8903 PR target/68256
8904 * varasm.c (hash_section): Return an unchangeble hash value
8905 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
8906 Return !aarch64_can_use_per_function_literal_pools_p ().
8907
8908 2018-03-15 Jakub Jelinek <jakub@redhat.com>
8909
8910 PR target/84860
8911 * optabs.c (emit_conditional_move): Pass address of cmode's copy
8912 rather than address of cmode as last argument to prepare_cmp_insn.
8913
8914 2018-03-15 Julia Koval <julia.koval@intel.com>
8915
8916 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
8917 F_AVX512VNNI, F_AVX512BITALG): New.
8918
8919 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
8920
8921 PR target/83451
8922 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
8923 insn for floating-point loads and stores.
8924
8925 2018-03-14 Carl Love <cel@us.ibm.com>
8926
8927 * config/rs6000/rs6000-c.c: Add macro definitions for
8928 ALTIVEC_BUILTIN_VEC_PERMXOR.
8929 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
8930 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
8931 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
8932 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
8933 UNSPEC_VPERMXOR.
8934 * config/doc/extend.texi: Add prototypes for vec_permxor.
8935
8936 2018-03-14 David Malcolm <dmalcolm@redhat.com>
8937
8938 PR c/84852
8939 * diagnostic-show-locus.c (class layout_point): Convert m_line
8940 from int to linenum_type.
8941 (line_span::comparator): Use linenum "compare" function when
8942 comparing line numbers.
8943 (test_line_span): New function.
8944 (layout_range::contains_point): Convert param "row" from int to
8945 linenum_type.
8946 (layout_range::intersects_line_p): Likewise.
8947 (layout::will_show_line_p): Likewise.
8948 (layout::print_source_line): Likewise.
8949 (layout::should_print_annotation_line_p): Likewise.
8950 (layout::print_annotation_line): Likewise.
8951 (layout::print_leading_fixits): Likewise.
8952 (layout::annotation_line_showed_range_p): Likewise.
8953 (struct line_corrections): Likewise for field m_row.
8954 (line_corrections::line_corrections): Likewise for param "row".
8955 (layout::print_trailing_fixits): Likewise.
8956 (layout::get_state_at_point): Likewise.
8957 (layout::get_x_bound_for_row): Likewise.
8958 (layout::print_line): Likewise.
8959 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
8960 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
8961 * input.c (selftest::test_linenum_comparisons): New function.
8962 (selftest::input_c_tests): Call it.
8963 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
8964 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
8965 * selftest.h (ASSERT_GT): New macro.
8966 (ASSERT_GT_AT): New macro.
8967 (ASSERT_LT): New macro.
8968 (ASSERT_LT_AT): New macro.
8969
8970 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
8971
8972 PR rtl-optimization/84780
8973 * combine.c (distribute_links): Don't make a link based on pc_rtx.
8974
8975 2018-03-14 Martin Liska <mliska@suse.cz>
8976
8977 * tree.c (record_node_allocation_statistics): Use
8978 get_stats_node_kind.
8979 (get_stats_node_kind): New function extracted from
8980 record_node_allocation_statistics.
8981 (free_node): Use get_stats_node_kind.
8982
8983 2018-03-14 Richard Biener <rguenther@suse.de>
8984
8985 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
8986 that the value-set of ANTIC_IN doesn't grow.
8987
8988 Revert
8989 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
8990 member.
8991 (BB_VISITED_WITH_VISITED_SUCCS): New define.
8992 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
8993
8994 2018-03-14 Julia Koval <julia.koval@intel.com>
8995
8996 * config.gcc (icelake-client, icelake-server): New.
8997 (icelake): Remove.
8998 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
8999 (initial_ix86_arch_features): Ditto.
9000 (PTA_SKYLAKE): Add SGX.
9001 (PTA_ICELAKE): Remove.
9002 (PTA_ICELAKE_CLIENT): New.
9003 (PTA_ICELAKE_SERVER): New.
9004 (ix86_option_override_internal): Split up icelake on icelake client and
9005 icelake server.
9006 (get_builtin_code_for_version): Ditto.
9007 (fold_builtin_cpu): Ditto.
9008 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
9009 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
9010 * config/i386/i386.h (processor_type): Ditto.
9011 * doc/invoke.texi: Ditto.
9012
9013 2018-03-14 Jakub Jelinek <jakub@redhat.com>
9014
9015 PR sanitizer/83392
9016 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
9017 INTEGER_CST offset, add it together with bitpos / 8 and
9018 sign extend based on POINTER_SIZE.
9019
9020 PR target/84844
9021 Revert
9022 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
9023
9024 PR target/78090
9025 * config/i386/constraints.md (Yc): New register constraint.
9026 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
9027 Use Yc constraint for alternative 2 of operand 0. Remove
9028 preferred_for_speed attribute.
9029
9030 2018-03-14 Richard Biener <rguenther@suse.de>
9031
9032 PR tree-optimization/84830
9033 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
9034 with the old one to avoid oscillations.
9035
9036 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
9037
9038 PR target/83712
9039 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
9040 pseudos.
9041 (assign_by_spills): Return a flag of reload assignment failure.
9042 Do not process the reload assignment failures. Do not spill other
9043 reload pseudos if they has the same reg class. Update n if
9044 necessary.
9045 (lra_assign): Add a return arg. Set up from the result of
9046 assign_by_spills call.
9047 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9048 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
9049 usage_insns if it is not NULL.
9050 (spill_hard_reg_in_range): New function.
9051 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9052 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9053 function prototypes.
9054 (lra_assign): Change prototype.
9055 * lra.c (lra): Add code to deal with fails by splitting hard reg
9056 live ranges.
9057
9058 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
9059
9060 * config/riscv/riscv.opt (mrelax): New option.
9061 * config/riscv/riscv.c (riscv_file_start): Emit ".option
9062 "norelax" when riscv_mrelax is disabled.
9063 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
9064
9065 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9066
9067 PR target/84743
9068 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
9069 reassociation for int modes.
9070
9071 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
9072
9073 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
9074 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
9075 for big-endian.
9076 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
9077 * config/aarch64/aarch64-sve.md
9078 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
9079 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
9080 (*extend<mode><Vwide>2): Rename to...
9081 (aarch64_sve_extend<mode><Vwide>2): ...this.
9082 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
9083 renaming the old pattern to...
9084 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
9085 unsigned packs.
9086 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
9087 define_expand, renaming the old pattern to...
9088 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
9089 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
9090 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
9091 account when deciding which SVE instruction the optab should use.
9092 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
9093
9094 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
9095
9096 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
9097 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
9098 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
9099 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
9100 (tlsdesc_small_<mode>): Turn a define_expand and use
9101 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
9102 (tlsdesc_small_advsimd_<mode>): ...this.
9103 (tlsdesc_small_sve_<mode>): New pattern.
9104
9105 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
9106
9107 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
9108 (UNSPEC_UMUL_HIGHPART): New constants.
9109 (MUL_HIGHPART): New int iteraor.
9110 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
9111 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
9112 define_expand.
9113 (*<su>mul<mode>3_highpart): New define_insn.
9114
9115 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
9116
9117 PR lto/84805
9118 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9119 incomplete types.
9120
9121 2018-03-13 Martin Liska <mliska@suse.cz>
9122
9123 PR ipa/84658.
9124 * (sem_item_optimizer::sem_item_optimizer): Initialize new
9125 vector.
9126 (sem_item_optimizer::~sem_item_optimizer): Release it.
9127 (sem_item_optimizer::merge_classes): Register variable aliases.
9128 (sem_item_optimizer::fixup_pt_set): New function.
9129 (sem_item_optimizer::fixup_points_to_sets): Likewise.
9130 * ipa-icf.h: Declare new variables and functions.
9131
9132 2018-03-13 Jakub Jelinek <jakub@redhat.com>
9133
9134 PR middle-end/84834
9135 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
9136 integer_pow2p@2 and test integer_pow2p in condition.
9137 (A < 0 ? C : 0): Similarly for @1.
9138
9139 PR middle-end/84831
9140 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
9141 characters starting at p contain '\0' character, don't look beyond
9142 that.
9143
9144 PR target/84827
9145 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
9146 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
9147
9148 PR target/84828
9149 * reg-stack.c (change_stack): Change update_end var from int to
9150 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
9151 also call set_block_for_insn on the newly added insns and rescan.
9152
9153 PR target/84786
9154 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
9155 on the last operand.
9156
9157 PR c++/84704
9158 * tree.c (stabilize_reference_1): Return save_expr (e) for
9159 STATEMENT_LIST even if it doesn't have side-effects.
9160
9161 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
9162
9163 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
9164
9165 2018-03-12 Renlin Li <renlin.li@arm.com>
9166
9167 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
9168 aarch64_output_scalar_simd_mov_immediate.
9169
9170 2018-03-12 Martin Sebor <msebor@redhat.com>
9171
9172 PR tree-optimization/83456
9173 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
9174 for perfectly overlapping calls to memcpy.
9175 (gimple_fold_builtin_memory_chk): Same.
9176 (gimple_fold_builtin_strcpy): Handle no-warning.
9177 (gimple_fold_builtin_stxcpy_chk): Same.
9178 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
9179
9180 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
9181
9182 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
9183 parameter. Use it for SFmode.
9184 (rs6000_function_arg_advance_1): Adjust.
9185 (rs6000_function_arg): Adjust.
9186 (rs6000_gimplify_va_arg): Pass false for that new parameter.
9187
9188 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
9189
9190 PR rtl-optimization/84169
9191 PR rtl-optimization/84780
9192 * combine.c (can_combine_p): Check for a 2-insn combination whether
9193 the destination register is used between the two insns, too.
9194
9195 2018-03-12 Richard Biener <rguenther@suse.de>
9196
9197 PR tree-optimization/84803
9198 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
9199 for refs DR analysis didn't process.
9200
9201 2018-03-12 Richard Biener <rguenther@suse.de>
9202
9203 PR tree-optimization/84777
9204 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
9205 force-vectorize loops ignore whether we are optimizing for size.
9206
9207 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
9208
9209 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
9210 (TARGET_MD_ASM_ADJUST): Define.
9211
9212 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
9213 Kito Cheng <kito.cheng@gmail.com>
9214 Chung-Ju Wu <jasonwucj@gmail.com>
9215
9216 * config/nds32/nds32.c (nds32_compute_stack_frame,
9217 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
9218 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
9219 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
9220 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
9221 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
9222 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
9223 * config/nds32/nds32.md (prologue, epilogue): Use macro
9224 NDS32_V3PUSH_AVAILABLE_P to do checking.
9225
9226 2018-03-11 Jakub Jelinek <jakub@redhat.com>
9227
9228 PR debug/58150
9229 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
9230 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
9231 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
9232 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
9233 addition of most attributes on !orig_type_die or the attribute not
9234 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
9235
9236 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
9237 Chung-Ju Wu <jasonwucj@gmail.com>
9238
9239 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
9240 __NDS32_VH__ macro.
9241 * config/nds32/nds32.opt (mvh): New option.
9242
9243 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
9244 Chung-Ju Wu <jasonwucj@gmail.com>
9245
9246 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
9247 function.
9248 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
9249 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
9250 definition.
9251
9252 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
9253 Chung-Ju Wu <jasonwucj@gmail.com>
9254
9255 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
9256 function.
9257 * config/nds32/nds32-multiple.md (strlensi): New pattern.
9258 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
9259
9260 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
9261 Kito Cheng <kito.cheng@gmail.com>
9262 Chung-Ju Wu <jasonwucj@gmail.com>
9263
9264 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
9265 UNSPEC_FFMISM and UNSPEC_FLMISM.
9266 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
9267 for ffb, ffmism and flmism.
9268 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
9269 (unspec_ffmism): Ditto.
9270 (unspec_flmism): Ditto.
9271 (nds32_expand_builtin_impl): Check if string extension is available.
9272 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
9273 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
9274
9275 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
9276
9277 Reverting patch:
9278 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
9279
9280 PR target/83712
9281 * lra-assigns.c (assign_by_spills): Return a flag of reload
9282 assignment failure. Do not process the reload assignment
9283 failures. Do not spill other reload pseudos if they has the same
9284 reg class.
9285 (lra_assign): Add a return arg. Set up from the result of
9286 assign_by_spills call.
9287 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9288 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
9289 usage_insns if it is not NULL.
9290 (spill_hard_reg_in_range): New function.
9291 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9292 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9293 function prototypes.
9294 (lra_assign): Change prototype.
9295 * lra.c (lra): Add code to deal with fails by splitting hard reg
9296 live ranges.
9297
9298 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
9299
9300 PR target/84807
9301 * config/i386/i386.opt: Replace Enforcment with Enforcement.
9302
9303 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
9304
9305 PR debug/84620
9306 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
9307 (dw_val_node): Add val_symbolic_view.
9308 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
9309 (symview_upper_bound): New.
9310 (new_line_info_table): Initialize symviews_since_reset.
9311 (dwarf2out_source_line): Count symviews_since_reset and set
9312 symview_upper_bound.
9313 (dw_val_equal_p): Handle symview.
9314 (add_AT_symview): New.
9315 (print_dw_val): Handle symview.
9316 (attr_checksum, attr_checksum_ordered): Likewise.
9317 (same_dw_val_p, size_of_die): Likewise.
9318 (value_format, output_die): Likewise.
9319 (add_high_low_attributes): Use add_AT_symview for entry_view.
9320 (dwarf2out_finish): Reset symview_upper_bound, clear
9321 zero_view_p.
9322
9323 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
9324
9325 PR target/83969
9326 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
9327 Add strict argument and use it.
9328 (rs6000_split_multireg_move): Update for new strict argument.
9329 (mem_operand_gpr): Disallow all non-offsettable addresses.
9330 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
9331
9332 2018-03-09 Jakub Jelinek <jakub@redhat.com>
9333
9334 PR target/84772
9335 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
9336 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
9337 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
9338
9339 PR c++/84767
9340 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
9341 decl, use remap_type if we want to use the type.
9342
9343 2018-03-09 Martin Sebor <msebor@redhat.com>
9344
9345 PR tree-optimization/84526
9346 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9347 Remove dead code.
9348 (builtin_access::generic_overlap): Be prepared to handle non-array
9349 base objects.
9350
9351 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
9352
9353 PR rtl-optimization/84682
9354 * lra-constraints.c (process_address_1): Check is_address flag
9355 for address constraints.
9356 (process_alt_operands): Likewise.
9357 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
9358 preprocess_constraints.
9359 * recog.h (preprocess_constraints): Add oploc parameter.
9360 Adjust callers.
9361 * recog.c (preprocess_constraints): Test address_operand for
9362 CT_ADDRESS constraints.
9363
9364 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
9365
9366 PR target/83712
9367 * lra-assigns.c (assign_by_spills): Return a flag of reload
9368 assignment failure. Do not process the reload assignment
9369 failures. Do not spill other reload pseudos if they has the same
9370 reg class.
9371 (lra_assign): Add a return arg. Set up from the result of
9372 assign_by_spills call.
9373 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9374 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
9375 usage_insns if it is not NULL.
9376 (spill_hard_reg_in_range): New function.
9377 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9378 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9379 function prototypes.
9380 (lra_assign): Change prototype.
9381 * lra.c (lra): Add code to deal with fails by splitting hard reg
9382 live ranges.
9383
9384 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9385
9386 PR target/83193
9387 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
9388 Accept complain bool parameter. Only emit errors if it is true.
9389 (arm_parse_cpu_option_name): Likewise.
9390 (arm_target_thumb_only): Adjust callers of the above.
9391 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
9392 prototype to take a default true bool parameter.
9393 (arm_parse_arch_option_name): Likewise.
9394
9395 2018-03-09 David Malcolm <dmalcolm@redhat.com>
9396 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9397
9398 PR jit/64089
9399 PR jit/84288
9400 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
9401 * configure: Regenerate.
9402 * configure.ac ("linker --version-script option"): New.
9403 ("linker soname option"): New.
9404
9405 2018-03-09 Richard Biener <rguenther@suse.de>
9406
9407 PR tree-optimization/84775
9408 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
9409 immediate uses of predicate stmts and mark them modified.
9410
9411 Revert
9412 PR tree-optimization/84178
9413 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9414 to caller.
9415 (version_loop_for_if_conversion): Delay update_ssa call.
9416 (tree_if_conversion): Delay update_ssa until after predicate
9417 insertion.
9418
9419 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
9420
9421 PR target/84763
9422 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
9423 when the function accesses prior frames.
9424
9425 2018-03-08 Jakub Jelinek <jakub@redhat.com>
9426
9427 PR debug/84456
9428 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
9429 gen_llsym, otherwise call maybe_gen_llsym.
9430
9431 PR inline-asm/84742
9432 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
9433 has ',' character inside of it.
9434
9435 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9436
9437 PR target/84748
9438 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
9439 as clobbering CC_REGNUM.
9440
9441 2018-03-08 Richard Biener <rguenther@suse.de>
9442
9443 PR middle-end/84552
9444 * tree-scalar-evolution.c: Include tree-into-ssa.h.
9445 (follow_copies_to_constant): Do not follow SSA names registered
9446 for update.
9447
9448 2018-03-08 Richard Biener <rguenther@suse.de>
9449
9450 PR tree-optimization/84178
9451 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9452 to caller.
9453 (version_loop_for_if_conversion): Delay update_ssa call.
9454 (tree_if_conversion): Delay update_ssa until after predicate
9455 insertion.
9456
9457 2018-03-08 David Malcolm <dmalcolm@redhat.com>
9458
9459 PR tree-optimization/84178
9460 * tree-if-conv.c (release_bb_predicate): Remove the
9461 the assertion that the stmts have NULL use_ops.
9462 Discard the statements, asserting that they haven't
9463 yet been added to a BB.
9464
9465 2018-03-08 Richard Biener <rguenther@suse.de>
9466
9467 PR tree-optimization/84746
9468 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
9469 (phi_translate): Pass in destination ANTIC_OUT set.
9470 (phi_translate_1): Likewise. For a simplified result lookup
9471 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
9472 (phi_translate_set): Adjust.
9473 (do_pre_regular_insertion): Likewise.
9474 (do_pre_partial_partial_insertion): Likewise.
9475
9476 2018-03-08 Martin Liska <mliska@suse.cz>
9477
9478 PR gcov-profile/84735
9479 * doc/gcov.texi: Document usage of profile files.
9480 * gcov-io.h: Document changes in the format.
9481
9482 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
9483
9484 PR debug/84404
9485 PR debug/84408
9486 * dwarf2out.c (struct dw_line_info_table): Update comments for
9487 view == -1.
9488 (FORCE_RESET_NEXT_VIEW): New.
9489 (FORCE_RESETTING_VIEW_P): New.
9490 (RESETTING_VIEW_P): Check for -1 too.
9491 (ZERO_VIEW_P): Likewise.
9492 (new_line_info_table): Force-reset next view.
9493 (dwarf2out_begin_function): Likewise.
9494 (dwarf2out_source_line): Simplify zero_view_p initialization.
9495 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
9496 view directly. Omit view when omitting .loc at line 0.
9497
9498 2018-03-08 Jakub Jelinek <jakub@redhat.com>
9499
9500 PR tree-optimization/84740
9501 * tree-switch-conversion.c (process_switch): Call build_constructors
9502 only if info.phi_count is non-zero.
9503
9504 PR tree-optimization/84739
9505 * tree-tailcall.c (find_tail_calls): Check call arguments against
9506 DECL_ARGUMENTS (current_function_decl) rather than
9507 DECL_ARGUMENTS (func) when checking for tail recursion.
9508
9509 2018-03-07 Jakub Jelinek <jakub@redhat.com>
9510
9511 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
9512 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
9513 Volker Reichelt's entry and add entries for people that perform
9514 GCC fuzzy testing and report numerous bugs.
9515
9516 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
9517
9518 PR target/82411
9519 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
9520 readonly data in sdata, if that is disabled.
9521 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
9522 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
9523 -mreadonly-in-sdata option.
9524
9525 2018-03-07 Martin Sebor <msebor@redhat.com>
9526
9527 PR tree-optimization/84468
9528 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
9529 basic block when looking for nul assignment.
9530
9531 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
9532
9533 PR target/84277
9534 * except.h (output_function_exception_table): Adjust prototype.
9535 * except.c (output_function_exception_table): Remove FNNAME parameter
9536 and add SECTION parameter. Ouput one part of the table at a time.
9537 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
9538 the first part of the exception table and emit unwind directives.
9539 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
9540 (i386_pe_seh_cold_init): Likewise.
9541 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
9542 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
9543 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
9544 (ix86_output_call_insn): Emit a nop in one more case for SEH.
9545 * config/i386/winnt.c: Include except.h.
9546 (struct seh_frame_state): Add reg_offset, after_prologue and
9547 in_cold_section fields.
9548 (i386_pe_seh_end_prologue): Set seh->after_prologue.
9549 (i386_pe_seh_cold_init): New function.
9550 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
9551 to seh->in_cold_section.
9552 (seh_emit_push): Record the offset of the push.
9553 (seh_emit_save): Record the offet of the save.
9554 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
9555 Test seh->after_prologue to disregard the epilogue.
9556 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
9557 (i386_pe_end_cold_function): New function.
9558
9559 2018-03-07 Jakub Jelinek <jakub@redhat.com>
9560
9561 PR fortran/84565
9562 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
9563 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
9564
9565 PR c++/84704
9566 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
9567 on tmp_var.
9568 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
9569 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
9570
9571 PR middle-end/84723
9572 * multiple_target.c: Include tree-inline.h and intl.h.
9573 (expand_target_clones): Diagnose and fail if node->definition and
9574 !tree_versionable_function_p (node->decl).
9575
9576 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
9577
9578 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
9579 sprint_ul.
9580 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
9581 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
9582 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
9583
9584 2018-03-06 Jakub Jelinek <jakub@redhat.com>
9585
9586 PR target/84710
9587 * combine.c (try_combine): Use reg_or_subregno instead of handling
9588 just paradoxical SUBREGs and REGs.
9589
9590 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
9591
9592 * config/arc/arc.c (arc_finalize_pic): Remove function.
9593 (arc_must_save_register): We use single base PIC register, remove
9594 checks to save/restore the PIC register.
9595 (arc_expand_prologue): Likewise.
9596 * config/arc/arc-protos.h (arc_set_default_type_attributes):
9597 Remove.
9598 (arc_verify_short): Likewise.
9599 (arc_attr_type): Likewise.
9600 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
9601 (walk_stores): Likewise.
9602 (arc_address_cost): Make it static.
9603 (arc_verify_short): Likewise.
9604 (branch_dest): Likewise.
9605 (arc_attr_type): Likewise.
9606 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
9607 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
9608 (arc_final_prescan_insn): Remove inserting the nops due to
9609 hardware hazards. It is done in reorg step.
9610 (insn_length_variant_t): Remove.
9611 (insn_length_parameters_t): Likewise.
9612 (arc_insn_length_parameters): Likewise.
9613 (arc_get_insn_variants): Likewise.
9614 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
9615
9616 2018-03-06 Jakub Jelinek <jakub@redhat.com>
9617
9618 PR inline-asm/84683
9619 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
9620 assertion failure.
9621
9622 PR tree-optimization/84687
9623 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
9624 on new_node->decl.
9625 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
9626
9627 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9628
9629 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
9630 Rename to ppc_speculation_barrier.
9631 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
9632 __builtin_ppc_speculation_barrier.
9633
9634 2018-03-05 Jakub Jelinek <jakub@redhat.com>
9635
9636 PR target/84700
9637 * combine.c (combine_simplify_rtx): Don't try to simplify if
9638 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
9639 are equal to x.
9640
9641 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
9642
9643 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
9644 to 32 bytes when compiling for POWER9.
9645
9646 2018-03-05 Jakub Jelinek <jakub@redhat.com>
9647
9648 PR target/84564
9649 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
9650 regparm >= 3 with no arg reg available also for calls with
9651 flag_force_indirect_call. Pass decl to ix86_function_regparm.
9652
9653 PR target/84524
9654 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
9655 orig,vex.
9656 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
9657
9658 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
9659
9660 PR target/84264
9661 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
9662
9663 2018-03-05 Richard Biener <rguenther@suse.de>
9664
9665 PR tree-optimization/84486
9666 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
9667 When inserting a __builtin_assume_aligned call set the LHS
9668 SSA name alignment info accordingly.
9669
9670 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
9671
9672 PR tree-optimization/84114
9673 * config/aarch64/aarch64.c (aarch64_reassociation_width)
9674 Avoid reassociation of FLOAT_MODE addition.
9675
9676 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
9677
9678 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
9679 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
9680 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
9681 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
9682 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
9683 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
9684 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
9685 and -mwbnoinvd.
9686 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
9687 __builtin_ia32_wbinvd): New builtins.
9688 (SPECIAL_ARGS2): New.
9689 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
9690 (SPECIAL_ARGS2): New.
9691 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
9692 (ix86_valid_target_attribute_inner_p): Ditto.
9693 (ix86_init_mmx_sse_builtins): Add special_args2.
9694 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
9695 TARGET_WBNOINVD_P): New.
9696 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
9697 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
9698 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
9699 * config/i386/immintrin.h (_wbinvd): New intrinsic.
9700 * config/i386/pconfigintrin.h: New file.
9701 * config/i386/wbnoinvdintrin.h: Ditto.
9702 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
9703 wbnoinvdintrin.h.
9704 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
9705
9706 2018-03-05 Richard Biener <rguenther@suse.de>
9707
9708 PR tree-optimization/84670
9709 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9710 member.
9711 (BB_VISITED_WITH_VISITED_SUCCS): New define.
9712 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9713 (compute_antic_aux): Only assert the number of values in ANTIC_IN
9714 doesn't grow if all successors (recursively) were visited at least
9715 once.
9716
9717 2018-03-05 Richard Biener <rguenther@suse.de>
9718
9719 PR tree-optimization/84650
9720 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
9721 if executed in the loop pipeline.
9722
9723 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
9724
9725 * doc/configfiles.texi (Configuration Files): Move info about
9726 conditionalizing $target-protos.h to...
9727 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
9728 differs from $target-protos.h.
9729
9730 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
9731 Chung-Ju Wu <jasonwucj@gmail.com>
9732
9733 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
9734 * config/nds32/nds32-multiple.md (setmemsi): Define.
9735 * config/nds32/nds32-memory-manipulation.c
9736 (nds32_gen_dup_4_byte_to_word_value): New.
9737 (emit_setmem_word_loop): New.
9738 (emit_setmem_byte_loop): New.
9739 (nds32_expand_setmem_loop): New.
9740 (nds32_expand_setmem_loop_v3m): New.
9741 (nds32_expand_setmem_unroll): New.
9742 (nds32_expand_setmem): New.
9743
9744 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
9745 Chung-Ju Wu <jasonwucj@gmail.com>
9746
9747 * config/nds32/nds32-memory-manipulation.c
9748 (nds32_emit_load_store): New.
9749 (nds32_emit_post_inc_load_store): New.
9750 (nds32_emit_mem_move): New.
9751 (nds32_emit_mem_move_block): New.
9752 (nds32_expand_movmemsi_loop_unknown_size): New.
9753 (nds32_expand_movmemsi_loop_known_size): New.
9754 (nds32_expand_movmemsi_loop): New.
9755 (nds32_expand_movmemsi_unroll): New.
9756 (nds32_expand_movmemqi): Rename ...
9757 (nds32_expand_movmemsi): ... to this.
9758 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
9759 (movmemsi): ... to this.
9760 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
9761 (nds32_expand_movmemsi): ... to this.
9762
9763 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
9764 Monk Chiang <sh.chiang04@gmail.com>
9765 Chung-Ju Wu <jasonwucj@gmail.com>
9766
9767 * config/nds32/nds32-protos.h
9768 (nds32_expand_load_multiple): New arguments.
9769 (nds32_expand_store_multiple): Ditto.
9770 (nds32_valid_multiple_load_store): Rename ...
9771 (nds32_valid_multiple_load_store_p): ... to this.
9772 * config/nds32/nds32-memory-manipulation.c
9773 (nds32_expand_load_multiple): Refine implementation.
9774 (nds32_expand_store_multiple): Ditto.
9775 * config/nds32/nds32-multiple.md
9776 (load_multiple): Update nds32_expand_load_multiple interface.
9777 (store_multiple): Update nds32_expand_store_multiple interface.
9778 * config/nds32/nds32-predicates.c
9779 (nds32_valid_multiple_load_store): Rename ...
9780 (nds32_valid_multiple_load_store_p): ... to this and refine
9781 implementation.
9782 * config/nds32/predicates.md
9783 (nds32_load_multiple_and_update_address_operation): New predicate.
9784 (nds32_store_multiple_and_update_address_operation): New predicate.
9785
9786 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
9787 Chung-Ju Wu <jasonwucj@gmail.com>
9788
9789 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
9790 (combo): New attribute.
9791 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
9792
9793 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
9794
9795 * config/nds32/nds32.opt: Change -mcmodel= default value.
9796
9797 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
9798 Monk Chiang <sh.chiang04@gmail.com>
9799 Chung-Ju Wu <jasonwucj@gmail.com>
9800
9801 * config/nds32/constants.md (unspec_element): New enum.
9802 * config/nds32/constraints.md (Umw): New constraint.
9803 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
9804 * config/nds32/nds32-intrinsic.md: Likewise.
9805 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
9806 (nds32_valid_smw_lwm_base_p): New.
9807 (nds32_output_smw_single_word): New.
9808 (nds32_output_lmw_single_word): New.
9809 (nds32_expand_unaligned_load): New.
9810 (nds32_expand_unaligned_store): New.
9811 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
9812 (nds32_output_smw_single_word): Declare.
9813 (nds32_output_lmw_single_word): Declare.
9814 (nds32_expand_unaligned_load): Declare.
9815 (nds32_expand_unaligned_store): Declare.
9816 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
9817 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
9818 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
9819 NDS32_BUILTIN_UASTORE_DW.
9820 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
9821 predicate.
9822
9823 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
9824 Kito Cheng <kito.cheng@gmail.com>
9825 Chung-Ju Wu <jasonwucj@gmail.com>
9826
9827 * config/nds32/nds32-intrinsic.c
9828 (nds32_expand_builtin_null_ftype_reg): Delete.
9829 (nds32_expand_builtin_reg_ftype_imm): Ditto.
9830 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
9831 (nds32_read_argument): New.
9832 (nds32_legitimize_target): Ditto.
9833 (nds32_legitimize_argument): Ditto.
9834 (nds32_check_constant_argument): Ditto.
9835 (nds32_expand_unop_builtin): Ditto.
9836 (nds32_expand_unopimm_builtin): Ditto.
9837 (nds32_expand_binop_builtin): Ditto.
9838 (nds32_builtin_decl_impl): Ditto.
9839 (builtin_description): Ditto.
9840 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
9841 (nds32_init_builtins_impl): Ditto.
9842 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
9843 (nds32_builtin_decl): New.
9844 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
9845 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
9846
9847 2018-03-02 Jeff Law <law@redhat.com>
9848
9849 * reorg.c (stop_search_p): Handle DEBUG_INSN.
9850 (redundant_insn, fill_simple_delay_slots): Likewise.
9851 (fill_slots_from_thread): Likewise.
9852 * resource.c (mark_referenced_resources): Likewise.
9853 (mark_set_resources, find_dead_or_set_registers): Likewise.
9854
9855 2018-03-02 Jakub Jelinek <jakub@redhat.com>
9856
9857 * substring-locations.h (format_warning_va): Formatting fix for
9858 ATTRIBUTE_GCC_DIAG.
9859 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
9860 argument.
9861 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
9862 * substring-locations.c: Include intl.h.
9863 (format_warning_va): Turned into small wrapper around
9864 format_warning_n_va, renamed to ...
9865 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
9866 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
9867 use ngettext.
9868 (format_warning_at_substring_n): New function.
9869 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
9870 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
9871 format_warning_at_substring with just a shorter name instead of
9872 const function pointer.
9873 (fmtwarn_n): New function.
9874 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
9875 appropriate, get rid of all the fmtstr temporaries, move conditionals
9876 with G_() wrapped string literals directly into fmtwarn arguments,
9877 cast dir.len to (int), formatting fixes.
9878
9879 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
9880
9881 * doc/invoke.texi: Remove "Cilk Plus" references.
9882
9883 2018-03-02 Jakub Jelinek <jakub@redhat.com>
9884 Richard Biener <rguenther@suse.de>
9885
9886 PR ipa/84628
9887 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
9888 for error or warning attributes if CALL_FROM_THUNK_P is set.
9889 Formatting fixes.
9890
9891 2018-03-02 Jakub Jelinek <jakub@redhat.com>
9892
9893 PR target/56540
9894 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
9895 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
9896
9897 PR target/56540
9898 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
9899 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
9900
9901 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
9902 instead of -1U in last predictors element's probability member.
9903
9904 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
9905
9906 PR ipa/83983
9907 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9908 arguments if they are comparable.
9909
9910 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
9911
9912 PR tree-optimization/84634
9913 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
9914 masks and masked_loop_p with a single loop_masks, making sure it's
9915 null for bb vectorization.
9916
9917 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
9918
9919 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9920 (vect_analyze_data_ref_access): Use loop->safe_len rather than
9921 loop->force_vectorize to check whether there is no alias.
9922
9923 2018-03-02 Jakub Jelinek <jakub@redhat.com>
9924
9925 PR target/84614
9926 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
9927 prototypes.
9928 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
9929 comments.
9930 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
9931 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
9932 instead of a loop around prev_real_insn.
9933 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
9934 prev_real_insn.
9935
9936 PR inline-asm/84625
9937 * config/i386/i386.c (ix86_print_operand): Use conditional
9938 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
9939 zero vector.
9940
9941 2018-03-02 Richard Biener <rguenther@suse.de>
9942
9943 PR tree-optimization/84427
9944 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
9945 (bitmap_set_subtract_values): Rewrite to handle multiple
9946 exprs per value.
9947 (clean): Likewise.
9948 (prune_clobbered_mems): Likewise.
9949 (phi_translate): Take edge instead of pred/phiblock.
9950 (phi_translate_1): Likewise.
9951 (phi_translate_set): Likewise. Insert all translated
9952 exprs for a value into the set, keeping possibly multiple
9953 expressions per value.
9954 (compute_antic_aux): Adjust for phi_translate changes.
9955 When intersecting union the expressions and prune those
9956 not in the final value set, keeping possibly multiple
9957 expressions per value. Do not use value-insertion
9958 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
9959 all expressions. Add verification that the value-sets
9960 only shrink during iteration.
9961 (compute_partial_antic_aux): Adjust for the phi_translate changes.
9962 (do_pre_regular_insertion): Likewise.
9963 (do_pre_partial_partial_insertion): Likewise.
9964
9965 2018-03-02 Richard Biener <rguenther@suse.de>
9966
9967 PR target/82005
9968 * config/darwin.c (saved_debug_info_level): New static global.
9969 (darwin_asm_lto_start): Disable debug info generation for LTO out.
9970 (darwin_asm_lto_end): Restore debug info generation settings.
9971
9972 2018-03-01 Martin Liska <mliska@suse.cz>
9973
9974 PR sanitizer/82484
9975 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
9976 volatile arguments.
9977
9978 2018-03-01 Richard Biener <rguenther@suse.de>
9979
9980 PR debug/84645
9981 * dwarf2out.c (gen_variable_die): Properly handle late VLA
9982 type annotation with LTO when debug was disabled at compile-time.
9983
9984 2018-03-01 Matthew Fortune <mfortune@gmail.com>
9985
9986 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
9987 XINT with INTVAL.
9988 (mips_final_postscan_insn): Likewise.
9989
9990 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
9991
9992 PR rtl-optimization/84528
9993 * alias.c (init_alias_target): Add commentary.
9994 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
9995 a unique base value if the frame pointer is not eliminated
9996 to the stack pointer.
9997
9998 2018-03-01 Tom de Vries <tom@codesourcery.com>
9999
10000 PR rtl-optimization/83327
10001 * lra-int.h (hard_regs_spilled_into): Declare.
10002 * lra.c (hard_regs_spilled_into): Define.
10003 (init_reg_info): Init hard_regs_spilled_into.
10004 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
10005 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
10006 (process_bb_lives): Handle hard_regs_spilled_into.
10007 (lra_create_live_ranges_1): Before doing liveness propagation, clear
10008 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
10009
10010 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
10011
10012 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
10013 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
10014 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
10015 * config/rs6000/aix72.h: New file.
10016
10017 2018-02-28 Jakub Jelinek <jakub@redhat.com>
10018
10019 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
10020 instead of warning_at with conditional singular and plural messages
10021 where possible.
10022
10023 PR target/52991
10024 * stor-layout.c (update_alignment_for_field): For
10025 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
10026 && !DECL_PACKED (field), do the alignment update, just use
10027 only desired_align instead of MAX (type_align, desired_align)
10028 as the alignment.
10029 (place_field): Don't do known_align < desired_align handling
10030 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
10031 is non-NULL, instead do it after rli->prev_field handling and
10032 only if not within a bitfield word. For DECL_PACKED (field)
10033 use type_align of BITS_PER_UNIT.
10034
10035 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
10036
10037 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
10038 superfluous parentheses and trailing spaces.
10039
10040 2018-02-28 Richard Biener <rguenther@suse.de>
10041
10042 PR tree-optimization/84584
10043 * graphite-scop-detection.c (scop_detection::add_scop): Discard
10044 SCoPs with fake exit edge.
10045
10046 2018-02-28 Martin Liska <mliska@suse.cz>
10047
10048 PR testsuite/84597
10049 * timevar.c (timer::print): Fix format to properly print 100%
10050 values.
10051
10052 2018-02-28 Richard Biener <rguenther@suse.de>
10053
10054 PR middle-end/84607
10055 * genmatch.c (capture_info::walk_match): Do not mark
10056 captured expressions without operands as expr_p given
10057 they act more like predicates and should be subject to
10058 "lost tail" side-effect preserving.
10059
10060 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
10061
10062 PR rtl-optimization/81611
10063 * auto-inc-dec.c (attempt_change): Move dead note from
10064 mem_insn if it's the next use of regno
10065 (find_address): Take address use of reg holding
10066 non-incremented value. Add parm to limit search to the named
10067 reg only.
10068 (merge_in_block): Attempt to use a mem insn that is the next
10069 use of the original regno.
10070
10071 2018-02-27 Martin Sebor <msebor@redhat.com>
10072
10073 PR c++/83871
10074 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
10075 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
10076
10077 2018-02-27 Martin Sebor <msebor@redhat.com>
10078
10079 PR translation/84207
10080 * diagnostic-core.h (warning_n, error_n, inform_n): Change
10081 n argument to unsigned HOST_WIDE_INT.
10082 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
10083 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
10084 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
10085 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
10086
10087 2018-02-27 Richard Biener <rguenther@suse.de>
10088
10089 PR tree-optimization/84512
10090 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
10091 Do not use the estimate returned from record_stmt_cost for
10092 the scalar iteration cost but sum properly using add_stmt_cost.
10093
10094 2018-02-27 Richard Biener <rguenther@suse.de>
10095
10096 PR tree-optimization/84466
10097 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10098 Adjust last change to less strictly validate use operands.
10099
10100 2018-02-27 Martin Liska <mliska@suse.cz>
10101
10102 PR gcov-profile/84548
10103 * gcov.c (process_file): Allow partial overlap and consider it
10104 also as group functions.
10105 (output_lines): Properly calculate range of lines for a group.
10106
10107 2018-02-27 Martin Liska <mliska@suse.cz>
10108
10109 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
10110 'ggc' suffixes. Change first column width.
10111 (timer::print): Fix formatting of the column.
10112
10113 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
10114
10115 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
10116 preserve inline entry blocks for the sake of debug inline
10117 entry point markers alone.
10118 (remove_unused_locals): Suggest in comments a better place to
10119 force the preservation of inline entry blocks that are
10120 otherwise unused, but do not preserve them.
10121
10122 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
10123
10124 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
10125
10126 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
10127
10128 PR target/84039
10129 * config/i386/constraints.md (Bs): Replace
10130 ix86_indirect_branch_register with
10131 TARGET_INDIRECT_BRANCH_REGISTER.
10132 (Bw): Likewise.
10133 * config/i386/i386.md (indirect_jump): Likewise.
10134 (tablejump): Likewise.
10135 (*sibcall_memory): Likewise.
10136 (*sibcall_value_memory): Likewise.
10137 Peepholes of indirect call and jump via memory: Likewise.
10138 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
10139 (*sibcall_value_GOT_32): Likewise.
10140 * config/i386/predicates.md (indirect_branch_operand): Likewise.
10141 (GOT_memory_operand): Likewise.
10142 (call_insn_operand): Likewise.
10143 (sibcall_insn_operand): Likewise.
10144 (GOT32_symbol_operand): Likewise.
10145 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
10146
10147 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
10148
10149 PR rtl-optimization/83496
10150 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
10151 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
10152 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
10153 redundant insn, if any.
10154 (relax_delay_slots): Likewise.
10155 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
10156
10157 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
10158
10159 PR tree-optimization/83965
10160 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
10161 that grouped statements are part of a reduction chain. Return
10162 true if the statement is not marked as a reduction itself but
10163 is part of a group.
10164 (vect_recog_dot_prod_pattern): Don't check whether the statement
10165 is part of a group here.
10166 (vect_recog_sad_pattern): Likewise.
10167 (vect_recog_widen_sum_pattern): Likewise.
10168
10169 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
10170
10171 PR debug/84545
10172 * final.c (rest_of_clean_state): Also look for calls inside sequences.
10173
10174 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
10175
10176 PR target/84530
10177 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
10178 the bool argument.
10179 (ix86_output_indirect_function_return): New prototype.
10180 (ix86_split_simple_return_pop_internal): Likewise.
10181 * config/i386/i386.c (indirect_return_via_cx): New.
10182 (indirect_return_via_cx_bnd): Likewise.
10183 (indirect_thunk_name): Handle return va CX_REG.
10184 (output_indirect_thunk_function): Create alias for
10185 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
10186 (ix86_output_indirect_jmp): Remove the bool argument.
10187 (ix86_output_indirect_function_return): New function.
10188 (ix86_split_simple_return_pop_internal): Likewise.
10189 * config/i386/i386.md (*indirect_jump): Don't pass false
10190 to ix86_output_indirect_jmp.
10191 (*tablejump_1): Likewise.
10192 (simple_return_pop_internal): Change it to define_insn_and_split.
10193 Call ix86_split_simple_return_pop_internal to split it for
10194 -mfunction-return=.
10195 (simple_return_indirect_internal): Call
10196 ix86_output_indirect_function_return instead of
10197 ix86_output_indirect_jmp.
10198
10199 2018-02-26 Jakub Jelinek <jakub@redhat.com>
10200
10201 PR bootstrap/84405
10202 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
10203 memset and value initialization afterwards.
10204
10205 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
10206
10207 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
10208
10209 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10210
10211 PR target/84521
10212 * common/config/aarch64/aarch64-common.c
10213 (aarch_option_optimization_table[]): Switch
10214 off fomit-frame-pointer
10215
10216 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
10217 Chung-Ju Wu <jasonwucj@gmail.com>
10218
10219 * config/nds32/nds32-multiple.md (load_multiple): Disallow
10220 volatile memory.
10221 (store_multiple): Ditto.
10222
10223 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
10224
10225 * config.gcc: Add --with-cpu support for nds32 target.
10226 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
10227 * config/nds32/nds32.opt: Add -mcpu= option.
10228
10229 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
10230
10231 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
10232 isel=yes): Warn for these deprecated options.
10233
10234 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
10235
10236 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
10237 ISA_2_5_MASKS_EMBEDDED.
10238
10239 2018-02-23 Jakub Jelinek <jakub@redhat.com>
10240
10241 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
10242 p->max as pointers rather than using iterative_hash_expr.
10243
10244 2018-02-23 Carl Love <cel@us.ibm.com>
10245
10246 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
10247 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
10248 BU_P8V_OVERLOAD_2.
10249 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
10250 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
10251 P8V_BUILTIN_VEC_VUNSIGNED2.
10252
10253 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
10254
10255 PR target/81572
10256 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
10257 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
10258 LRA_UNKNOWN_ALT.
10259 * lra-constraints.c (curr_insn_transform): Set up
10260 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
10261 LRA_UNKNOWN_ALT.
10262 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
10263 * lra-eliminations.c (spill_pseudos): Ditto.
10264 (process_insn_for_elimination): Ditto.
10265 * lra-lives.c (reg_early_clobber_p): Use the new macros.
10266 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
10267 LRA_NON_CLOBBERED_ALT.
10268
10269 2018-02-22 Martin Sebor <msebor@redhat.com>
10270
10271 PR tree-optimization/84480
10272 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
10273 to maybe_diag_stxncpy_trunc. Call it.
10274 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
10275 from gimple_fold_builtin_strcpy. Print inlining stack.
10276 (handle_builtin_stxncpy): Print inlining stack.
10277 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
10278
10279 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
10280
10281 PR target/84176
10282 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
10283 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
10284 and -fcheck-pointer-bounds are used together.
10285 (indirect_thunk_prefix): New enum.
10286 (indirect_thunk_need_prefix): New function.
10287 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
10288 "_nt" instead of "_bnd" for NOTRACK prefix.
10289 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
10290 (output_indirect_thunk_function): Likewise.
10291 (): Likewise.
10292 (ix86_code_end): Update output_indirect_thunk_function calls.
10293 (ix86_output_indirect_branch_via_reg): Replace
10294 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
10295 (ix86_output_indirect_branch_via_push): Likewise.
10296 (ix86_output_function_return): Likewise.
10297 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
10298 incompatible with -fcf-protection=branch and
10299 -fcheck-pointer-bounds.
10300
10301 2018-02-22 Steve Ellcey <sellcey@cavium.com>
10302
10303 PR target/83335
10304 * config/aarch64/aarch64.c (aarch64_print_address_internal):
10305 Change gcc_assert call to output_operand_lossage.
10306
10307 2018-02-22 Steve Ellcey <sellcey@cavium.com>
10308
10309 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
10310
10311 2018-02-22 DJ Delorie <dj@redhat.com>
10312 Sebastian Perta <sebastian.perta@renesas.com>
10313 Oleg Endo <olegendo@gcc.gnu.org>
10314
10315 * config/rx/rx.c (rx_rtx_costs): New function.
10316 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
10317
10318 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
10319
10320 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
10321
10322 2018-02-22 Martin Liska <mliska@suse.cz>
10323
10324 PR driver/83193
10325 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
10326 Add "native" as a possible value.
10327
10328 2018-02-22 Martin Liska <mliska@suse.cz>
10329
10330 PR driver/83193
10331 * config/i386/i386.c (ix86_option_override_internal):
10332 Add "native" as a possible value for -march and -mtune.
10333
10334 2018-02-22 Jakub Jelinek <jakub@redhat.com>
10335
10336 PR target/84502
10337 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
10338 to all type variants.
10339
10340 PR tree-optimization/84503
10341 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
10342 width as info->bitpos + info->bitsize - start.
10343 (merged_store_group::merge_overlapping): Simplify width computation.
10344 (check_no_overlap): New function.
10345 (imm_store_chain_info::try_coalesce_bswap): Compute expected
10346 start + width and last_order of the group, fail if check_no_overlap
10347 fails.
10348 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
10349 to group if check_no_overlap fails.
10350
10351 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
10352
10353 * config/rs6000/altivec.md: Delete contraint arguments to
10354 define_expand, define_split, and define_peephole2, and in
10355 define_insn_and_split if always unused.
10356 * config/rs6000/darwin.md: Ditto.
10357 * config/rs6000/dfp.md: Ditto.
10358 * config/rs6000/rs6000.md: Ditto.
10359 * config/rs6000/sync.md: Ditto.
10360 * config/rs6000/vector.md: Ditto.
10361 * config/rs6000/vsx.md: Ditto.
10362
10363 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
10364
10365 * config/rs6000/altivec.md: Write output control strings as braced
10366 blocks instead of double-quoted strings.
10367 * config/rs6000/darwin.md: Ditto.
10368 * config/rs6000/rs6000.md: Ditto.
10369 * config/rs6000/vector.md: Ditto.
10370 * config/rs6000/vsx.md: Ditto.
10371
10372 2018-02-21 Jason Merrill <jason@redhat.com>
10373
10374 PR c++/84314 - ICE with templates and fastcall attribute.
10375 * attribs.c (build_type_attribute_qual_variant): Remove assert.
10376
10377 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
10378
10379 * ipa-cp.c (determine_versionability): Fix comment typos.
10380
10381 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
10382
10383 PR c/84229
10384 * ipa-cp.c (determine_versionability): Do not version functions caling
10385 va_arg_pack.
10386
10387 2018-02-21 Martin Liska <mliska@suse.cz>
10388
10389 PR driver/83193
10390 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
10391 Add "native" as a possible value.
10392 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
10393 the macro when native cpu detection is available.
10394
10395 2018-02-21 Martin Liska <mliska@suse.cz>
10396
10397 PR driver/83193
10398 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
10399 Add "native" as a possible value.
10400 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
10401 when native cpu detection is available.
10402
10403 2018-02-21 Jakub Jelinek <jakub@redhat.com>
10404 Martin Sebor <msebor@redhat.com>
10405
10406 PR tree-optimization/84478
10407 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
10408 false.
10409 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
10410 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
10411 support which is conservatively correct, for 2 only stay conservative
10412 for maxlen. Formatting and comment capitalization fixes. Add STRICT
10413 argument to the 2 argument get_range_strlen, adjust 6 arg
10414 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
10415 false.
10416 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
10417 (gimple_fold_builtin_strlen): Pass true as last argument to
10418 get_range_strlen.
10419
10420 2018-02-20 Martin Sebor <msebor@redhat.com>
10421
10422 PR middle-end/84095
10423 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
10424 (builtin_memref::set_base_and_offset): Same. Handle inner references.
10425 (builtin_memref::builtin_memref): Factor out parts into
10426 set_base_and_offset and call it.
10427
10428 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
10429
10430 PR middle-end/84406
10431 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
10432 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
10433 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
10434 search at the associated MODE_INT.
10435
10436 2018-02-20 Jeff Law <law@redhat.com>
10437
10438 PR middle-end/82123
10439 PR tree-optimization/81592
10440 PR middle-end/79257
10441 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
10442 for range data rather than using global data.
10443 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
10444 range data rather than using global data.
10445 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
10446 pass it to children as needed.
10447 (struct directive::fmtresult): Similarly.
10448 (struct directive::set_width): Similarly.
10449 (struct directive::set_precision): Similarly.
10450 (format_integer, format_directive, parse_directive): Similarly.
10451 (format_none): Accept unnamed vr_values parameter.
10452 (format_percent, format_floating, format_character): Similarly.
10453 (format_string, format_plain): Similarly.
10454 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
10455 the EVRP range analyzer for range data rather than using global data.
10456 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
10457 gimple-ssa-evrp-analyze.h
10458 (class sprintf_dom_walker): Add after_dom_children member function.
10459 Add evrp_range_analyzer member.
10460 (sprintf_dom_walker::before_dom_children): Call into the EVRP
10461 range analyzer as needed.
10462 (sprintf_dom_walker::after_dom_children): New member function.
10463 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
10464 if not optimizing.
10465 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
10466 (evrp_range_analyzer::pop_to_marker): Likewise.
10467
10468 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
10469
10470 PR tree-optimization/84419
10471 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
10472 with the required type if its current type is compatible but
10473 different.
10474
10475 2018-02-20 Jakub Jelinek <jakub@redhat.com>
10476
10477 PR middle-end/82004
10478 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
10479 after vectorization.
10480
10481 2018-02-20 Martin Liska <mliska@suse.cz>
10482
10483 PR driver/83193
10484 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
10485 possible values if we don't have a hint.
10486
10487 2018-02-20 Martin Liska <mliska@suse.cz>
10488
10489 PR c/84310
10490 PR target/79747
10491 * final.c (shorten_branches): Build align_tab array with one
10492 more element.
10493 * opts.c (finish_options): Add alignment option limit check.
10494 (MAX_CODE_ALIGN): Likewise.
10495 (MAX_CODE_ALIGN_VALUE): Likewise.
10496 * doc/invoke.texi: Document maximum allowed option value for
10497 all -falign-* options.
10498
10499 2018-02-19 Jakub Jelinek <jakub@redhat.com>
10500
10501 PR target/84146
10502 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
10503 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
10504 * var-tracking.c (emit_note_insn_var_location): Remove all references
10505 to NOTE_INSN_CALL_ARG_LOCATION.
10506 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
10507 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
10508 Use copy_rtx_if_shared.
10509 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
10510 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
10511 (dwarf2out_var_location): Remove handling of
10512 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
10513 on call_insn.
10514 * final.c (final_scan_insn): Remove all references to
10515 NOTE_INSN_CALL_ARG_LOCATION.
10516 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
10517 before dumping final insns.
10518 * except.c (emit_note_eh_region_end): Remove all references to
10519 NOTE_INSN_CALL_ARG_LOCATION.
10520 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
10521 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
10522 * config/arc/arc.c (hwloop_optimize): Likewise.
10523 * config/arm/arm.c (create_fix_barrier): Likewise.
10524 * config/s390/s390.c (s390_chunkify_start): Likewise.
10525 * config/sh/sh.c (find_barrier): Likewise.
10526 * config/i386/i386.c (rest_of_insert_endbranch,
10527 ix86_seh_fixup_eh_fallthru): Likewise.
10528 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
10529 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
10530 * config/frv/frv.c (frv_function_prologue): Likewise.
10531 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
10532 reg note.
10533 (note_outside_basic_block_p): Remove all references to
10534 NOTE_INSN_CALL_ARG_LOCATION.
10535 * gengtype.c (adjust_field_rtx_def): Likewise.
10536 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
10537 Likewise.
10538 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
10539 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
10540
10541 PR c++/84444
10542 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
10543 is ADDR_EXPR.
10544
10545 PR tree-optimization/84452
10546 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
10547 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
10548 is NULL.
10549
10550 2018-02-19 Martin Liska <mliska@suse.cz>
10551
10552 PR sanitizer/82183
10553 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
10554
10555 2018-02-19 Martin Liska <mliska@suse.cz>
10556 Richard Sandiford <richard.sandiford@linaro.org>
10557
10558 PR tree-optimization/82491
10559 * gimple-fold.c (get_base_constructor): Make earlier bail out
10560 to prevent ubsan.
10561
10562 2018-02-19 Carl Love <cel@us.ibm.com>
10563
10564 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
10565 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
10566 BU_P8V_OVERLOAD_1.
10567 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
10568 P8V_BUILTIN_VEC_NEG.
10569
10570 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
10571
10572 * config/rl78/rl78.md (movdf): New define expand.
10573
10574 2018-02-19 Martin Liska <mliska@suse.cz>
10575
10576 PR other/80589
10577 * doc/invoke.texi: Fix typo.
10578 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
10579
10580 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
10581
10582 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
10583 handle rs6000_single_float and rs6000_double_float specially for
10584 e500 family CPUs.
10585
10586 2018-02-16 Jeff Law <law@redhat.com>
10587
10588 * config/rx/rx.c (add_pop_cfi_notes): New function.;
10589 (pop_regs): Use it.
10590
10591 2018-02-16 Jakub Jelinek <jakub@redhat.com>
10592
10593 PR ipa/84425
10594 * ipa-inline.c (inline_small_functions): Fix a typo.
10595
10596 2018-02-16 Nathan Sidwell <nathan@acm.org>
10597
10598 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
10599
10600 2018-02-16 Carl Love <cel@us.ibm.com>
10601
10602 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
10603 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
10604 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
10605 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
10606 expansion to P8V_BUILTIN_VEC_FLOAT2.
10607
10608 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
10609
10610 PR rtl-optimization/70023
10611 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
10612 src_regno into account.
10613
10614 2018-02-16 Carl Love <cel@us.ibm.com>
10615
10616 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
10617 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
10618 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
10619 * config/rs6000/rs6000.c: Remove case statements for
10620 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
10621 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
10622 and P9V_BUILTIN_VEC_VINSERT4B.
10623 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
10624 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
10625 * config/rs6000/vsx.md:
10626 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
10627 vec_insert4b.
10628
10629 2018-02-16 Carl Love <cel@us.ibm.com>
10630
10631 * config/rs6000/altivec.h: Add builtin names vec_extract4b
10632 vec_insert4b.
10633 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
10634 definitions.
10635 * config/rs6000/rs6000-c.c: Add the definitions for
10636 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
10637 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
10638 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
10639 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
10640 definition for insert4b and define insn *insert3b_internal.
10641 * doc/extend.texi: Add documentation for vec_extract4b.
10642
10643 2018-02-16 Nathan Sidwell <nathan@acm.org>
10644
10645 * doc/extend.texi (Backwards Compatibility): Mention friend
10646 injection. Note for-scope is deprecated.
10647 * doc/invoke.texi (-ffriend-injection): Deprecate.
10648
10649 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
10650
10651 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
10652 that moved to I2, also allow destinations that are a paradoxical
10653 subreg (instead of a normal reg).
10654
10655 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
10656
10657 PR target/83831
10658 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
10659 to QImode.
10660
10661 2018-02-16 Richard Biener <rguenther@suse.de>
10662
10663 PR tree-optimization/84037
10664 PR tree-optimization/84016
10665 PR target/82862
10666 * config/i386/i386.c (ix86_builtin_vectorization_cost):
10667 Adjust vec_construct for the fact we need additional higher latency
10668 128bit inserts for AVX256 and AVX512 vector builds.
10669 (ix86_add_stmt_cost): Scale vector construction cost for
10670 elementwise loads.
10671
10672 2018-02-16 Richard Biener <rguenther@suse.de>
10673
10674 PR tree-optimization/84417
10675 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
10676 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
10677 (non_rewritable_lvalue_p): Likewise, use poly-ints.
10678
10679 2018-02-16 Martin Liska <mliska@suse.cz>
10680
10681 PR sanitizer/84307
10682 * internal-fn.def (ASAN_CHECK): Set proper flags.
10683 (ASAN_MARK): Likewise.
10684
10685 2018-02-16 Julia Koval <julia.koval@intel.com>
10686
10687 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
10688 from PTA_CANNONLAKE.
10689
10690 2018-02-16 Jakub Jelinek <jakub@redhat.com>
10691
10692 PR target/84272
10693 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
10694 Use ++iter rather than iter++ for std::list iterators.
10695 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
10696 defer deleting them until all nodes in the forest are processed. Do
10697 free even leaf nodes. Change to_process into auto_vec.
10698
10699 PR bootstrap/84405
10700 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
10701 * vec.h (vec_default_construct): Use memset instead of placement new
10702 if BROKEN_VALUE_INITIALIZATION is defined.
10703 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
10704 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
10705 is defined.
10706
10707 PR rtl-optimization/83723
10708 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
10709 * lra.c (lra_substitute_pseudo): Likewise. If true, use
10710 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
10711 recursive calls.
10712 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
10713 callers.
10714 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
10715
10716 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
10717
10718 PR rtl-optimization/81443
10719 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
10720 from inner REGs to paradoxical SUBREGs.
10721
10722 2018-02-16 Richard Biener <rguenther@suse.de>
10723
10724 PR tree-optimization/84399
10725 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10726 For operands we can analyze at their definition make sure we can
10727 analyze them at each use as well.
10728
10729 2018-02-16 Richard Biener <rguenther@suse.de>
10730
10731 PR tree-optimization/84190
10732 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
10733 volatile accesses if the decl isn't volatile.
10734
10735 2018-02-15 Jason Merrill <jason@redhat.com>
10736
10737 PR c++/84314 - ICE with templates and fastcall attribute.
10738 * attribs.c (build_type_attribute_qual_variant): Don't clobber
10739 TYPE_CANONICAL on an existing type.
10740
10741 2018-02-15 Jakub Jelinek <jakub@redhat.com>
10742
10743 PR tree-optimization/84383
10744 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
10745 dstoff nor call operand_equal_p if dstbase is NULL.
10746
10747 PR tree-optimization/84334
10748 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
10749 also a CONSTANT_CLASS_P, punt.
10750
10751 2018-02-14 Jim Wilson <jimw@sifive.com>
10752
10753 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
10754 first SMALL_OPERAND check. New local min_second_step. Move assert
10755 to where locals are set. Add TARGET_RVC support.
10756 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
10757
10758 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
10759
10760 * doc/invoke.texi: Correct -Wformat-overflow code sample.
10761
10762 2018-02-14 Martin Sebor <msebor@redhat.com>
10763
10764 PR tree-optimization/83698
10765 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
10766 arrays constrain the offset range to their bounds.
10767 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
10768 (builtin_access::overlap): Avoid setting the size of overlap if it's
10769 already been set.
10770 (maybe_diag_overlap): Also consider arrays when deciding what values
10771 of offsets to include in diagnostics.
10772
10773 2018-02-14 Martin Sebor <msebor@redhat.com>
10774
10775 PR c/84108
10776 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
10777 that correspond to the kind of a declaration.
10778
10779 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
10780
10781 PR target/83984
10782 * config/pa/pa.md: Load address of PIC label using the linkage table
10783 if the label is nonlocal.
10784
10785 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
10786
10787 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
10788 warning message if user requests -maltivec=be.
10789 * doc/invoke.texi: Document deprecation of -maltivec=be.
10790
10791 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
10792
10793 PR target/84220
10794 * config/rs6000/rs6000-c.c: Update definitions for
10795 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
10796 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
10797
10798 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
10799
10800 PR target/84239
10801 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
10802 add _get_ssp intrinsics. Remove argument from
10803 __builtin_ia32_rdssp[d|q].
10804 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
10805 * config/i386/i386-builtin.def: Remove argument from
10806 __builtin_ia32_rdssp[d|q].
10807 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
10808 ix86_expand_special_args_builtin for _rdssp[d|q].
10809 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
10810 Clear register before usage.
10811 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
10812 Add documentation for new _get_ssp and _inc_ssp intrinsics.
10813
10814 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
10815
10816 PR tree-optimization/84357
10817 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
10818 operand 1 of an ARRAY_REF too.
10819
10820 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
10821
10822 PR target/83831
10823 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
10824 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10825 declarations.
10826 (set_of_reg): New struct.
10827 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
10828 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
10829 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10830 functions.
10831 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
10832 Split into bitclr, bitset, bitinvert patterns if appropriate.
10833 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
10834 use rx_fuse_in_memory_bitop.
10835 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
10836 to named insn, correct maximum insn length.
10837
10838 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
10839
10840 PR target/79242
10841 * machmode.def: Define a complex mode for PARTIAL_INT.
10842 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
10843 MODE_PARTIAL_INT.
10844 * doc/rtl.texi: Document CSPImode.
10845 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
10846 handling.
10847 (msp430_hard_regno_nregs_with_padding): Likewise.
10848
10849 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
10850
10851 PR target/84279
10852 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
10853
10854 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
10855
10856 PR rtl-optimization/84169
10857 * combine.c (try_combine): New variable split_i2i3. Set it to true if
10858 we generated a parallel as new i3 and we split that to new i2 and i3
10859 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
10860 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
10861 those to i2, not i1. Partially rewrite this scan code.
10862
10863 2018-02-13 Jakub Jelinek <jakub@redhat.com>
10864
10865 PR c/82210
10866 * stor-layout.c (place_field): For variable length fields, adjust
10867 offset_align afterwards not just based on the field's alignment,
10868 but also on the size.
10869
10870 PR middle-end/84309
10871 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
10872 of exps and logs in the use_exp2 case.
10873
10874 2018-02-13 Jeff Law <law@redhat.com>
10875
10876 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
10877 entry for "vector".
10878
10879 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
10880 ARGS as unused.
10881
10882 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
10883
10884 PR debug/84342
10885 PR debug/84319
10886 * common.opt (gas-loc-support, gas-locview-support): New.
10887 (ginline-points, ginternal-reset-location-views): New.
10888 * doc/invoke.texi: Document them. Use @itemx where intended.
10889 (gvariable-location-views): Adjust.
10890 * target.def (reset_location_view): New.
10891 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
10892 (TARGET_RESET_LOCATION_VIEW): New.
10893 * doc/tm.texi: Rebuilt.
10894 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
10895 (dwarf2out_default_as_locview_support): New.
10896 (output_asm_line_debug_info): Use option variables.
10897 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
10898 (output_loc_list): Likewise.
10899 (add_high_low_attributes): Check option variables.
10900 Don't output entry view attribute in strict mode.
10901 (gen_inlined_subroutine_die): Check option variables.
10902 (dwarf2out_inline_entry): Likewise.
10903 (init_sections_and_labels): Likewise.
10904 (dwarf2out_early_finish): Likewise.
10905 (maybe_reset_location_view): New, from...
10906 (dwarf2out_var_location): ... here. Call it.
10907 * debug.h (dwarf2out_default_as_loc_support): Declare.
10908 (dwarf2out_default_as_locview_support): Declare.
10909 * hooks.c (hook_int_rtx_insn_0): New.
10910 * hooks.h (hook_int_rtx_insn_0): Declare.
10911 * toplev.c (process_options): Take -gas-loc-support and
10912 -gas-locview-support from dwarf2out. Enable
10913 -gvariable-location-views by default only with locview
10914 assembler support. Enable -ginternal-reset-location-views by
10915 default only if the target defines the corresponding hook.
10916 Enable -ginline-points by default if location views are
10917 enabled; force it disabled if statement frontiers are
10918 disabled.
10919 * tree-inline.c (expand_call_inline): Check option variables.
10920 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
10921
10922 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
10923
10924 PR tree-optimization/84321
10925 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
10926 handling. Also check whether the anti-range contains any values
10927 that satisfy the mask; switch to a VR_RANGE if not.
10928
10929 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
10930
10931 PR sanitizer/84340
10932 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
10933
10934 2018-02-13 Martin Jambor <mjambor@suse.cz>
10935
10936 PR c++/83990
10937 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
10938 of call statements, also set location of a load to a temporary.
10939
10940 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
10941
10942 * config/rl78/rl78.c (add_vector_labels): New function.
10943 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
10944 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
10945 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
10946 which checks that no arguments are passed.
10947 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
10948 * doc/extend.texi: Documentation for the new attribute.
10949
10950 2018-02-13 Andreas Schwab <schwab@suse.de>
10951
10952 * config/riscv/linux.h (CPP_SPEC): Define.
10953
10954 2018-02-13 Jakub Jelinek <jakub@redhat.com>
10955
10956 PR target/84335
10957 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
10958 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
10959 OPTION_MASK_ISA_AES as first argument to def_builtin_const
10960 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
10961 instead of OPTION_MASK_ISA_PCLMUL as first argument to
10962 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
10963 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
10964 temporarily for AES and PCLMUL builtins.
10965
10966 PR tree-optimization/84339
10967 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
10968 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
10969 Formatting fixes.
10970
10971 PR middle-end/84309
10972 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
10973 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
10974 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
10975 inline function.
10976 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
10977 inline function.
10978 * omp-simd-clone.h: New file.
10979 * omp-simd-clone.c: Include omp-simd-clone.h.
10980 (expand_simd_clones): No longer static.
10981 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
10982 cgraph.h and omp-simd-clone.h.
10983 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
10984 (vect_recog_widen_shift_pattern): Formatting fix.
10985 (vect_pattern_recog_1): Don't check optab for calls.
10986
10987 PR target/84336
10988 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
10989 operands[2] into a REG before using gen_lowpart on it.
10990
10991 2018-02-12 Jeff Law <law@redhat.com>
10992
10993 PR target/83760
10994 * config/sh/sh.c (find_barrier): Consider a sibling call
10995 a barrier as well.
10996
10997 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
10998 successfully back substituting a reg.
10999
11000 2018-02-12 Richard Biener <rguenther@suse.de>
11001
11002 PR tree-optimization/84037
11003 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
11004 parameter, move visited init to caller.
11005 (vect_slp_analyze_operations): Separate cost from validity
11006 check, initialize visited once for all instances.
11007 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
11008 for all instances.
11009 * tree-vect-stmts.c (vect_model_simple_cost): Make early
11010 out an assert.
11011 (vect_model_promotion_demotion_cost): Likewise.
11012 (vectorizable_bswap): Guard cost modeling with !slp_node
11013 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
11014 SLP stmts.
11015 (vectorizable_call): Likewise.
11016 (vectorizable_conversion): Likewise.
11017 (vectorizable_assignment): Likewise.
11018 (vectorizable_shift): Likewise.
11019 (vectorizable_operation): Likewise.
11020 (vectorizable_store): Likewise.
11021 (vectorizable_load): Likewise.
11022 (vectorizable_condition): Likewise.
11023 (vectorizable_comparison): Likewise.
11024
11025 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
11026
11027 PR sanitizer/84307
11028 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
11029 (ASAN_MARK): Fix fnspec to account for return value, change pointer
11030 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
11031
11032 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
11033
11034 PR middle-end/83665
11035 * params.def (inline-min-speedup): Increase from 8 to 15.
11036 (max-inline-insns-auto): Decrease from 40 to 30.
11037 * ipa-split.c (consider_split): Add some buffer for function to
11038 be considered inlining candidate.
11039 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
11040 default values.
11041
11042 2018-02-12 Richard Biener <rguenther@suse.de>
11043
11044 PR tree-optimization/84037
11045 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
11046 matched stmts if we cannot swap the non-matched ones.
11047
11048 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
11049
11050 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
11051 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
11052 _mm_maskz_scalef_round_ss): New intrinsics.
11053 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
11054 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
11055 __builtin_ia32_scalefss_round): Remove.
11056 (__builtin_ia32_scalefsd_mask_round,
11057 __builtin_ia32_scalefss_mask_round): New intrinsics.
11058 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
11059 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
11060 ((match_operand:VF_128 2 "<round_nimm_predicate>"
11061 "<round_constraint>")): Changed to ...
11062 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
11063 "<round_scalar_constraint>")): ... this.
11064 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
11065 %0, %1, %2<round_op3>}"): Changed to ...
11066 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
11067 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
11068 %2<round_scalar_mask_op3>}"): ... this.
11069 * config/i386/subst.md (round_scalar_nimm_predicate): New.
11070
11071 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
11072
11073 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
11074 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
11075 (_mm_maskz_sqrt_round_ss): New intrinsics.
11076 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
11077 (__builtin_ia32_sqrtsd_mask_round)
11078 (__builtin_ia32_sqrtss_mask_round): New builtins.
11079 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
11080 (__builtin_ia32_sqrtss_round): Remove.
11081 (__builtin_ia32_sqrtsd_mask_round)
11082 (__builtin_ia32_sqrtss_mask_round): New builtins.
11083 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
11084 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
11085 ((match_operand:VF_128 1 "vector_operand"
11086 "xBm,<round_constraint>")): Changed to ...
11087 ((match_operand:VF_128 1 "vector_operand"
11088 "xBm,<round_scalar_constraint>")): ... this.
11089 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
11090 %0, %2, %<iptr>1<round_op3>}): Changed to ...
11091 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
11092 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
11093 %<iptr>1<round_scalar_mask_op3>}): ... this.
11094 ((set_attr "prefix" "<round_prefix>")): Changed to ...
11095 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
11096
11097 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
11098
11099 PR target/84266
11100 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
11101 Cast vec_cmpeq result to correct type.
11102 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
11103 Cast vec_cmpgt result to correct type.
11104
11105 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
11106
11107 * final.c (final_scan_insn_1): Renamed from...
11108 (final_scan_insn): ... this. New wrapper, to recover
11109 seen from the outermost call in recursive ones.
11110 * config/sparc/sparc.c (output_return): Drop seen from call.
11111 (output_sibcall): Likewise.
11112 * config/visium/visium.c (output_branch): Likewise.
11113
11114 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
11115
11116 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
11117 function label.
11118
11119 2018-02-10 Alan Modra <amodra@gmail.com>
11120
11121 PR target/84300
11122 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
11123 Specify LR as an input.
11124
11125 2018-02-10 Jakub Jelinek <jakub@redhat.com>
11126
11127 PR sanitizer/83987
11128 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
11129 remove_member_access_dummy_vars): New functions.
11130 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
11131 lower_omp_1, execute_lower_omp): Use them.
11132
11133 PR rtl-optimization/84308
11134 * shrink-wrap.c (spread_components): Release todo vector.
11135
11136 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
11137
11138 PR rtl-optimization/57193
11139 * ira-color.c (struct allocno_color_data): Add member
11140 conflict_allocno_hard_prefs.
11141 (update_conflict_allocno_hard_prefs): New.
11142 (bucket_allocno_compare_func): Add a preference based on
11143 conflict_allocno_hard_prefs.
11144 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
11145 (color_allocnos): Remove a dead code. Initiate
11146 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
11147
11148 2018-02-09 Jakub Jelinek <jakub@redhat.com>
11149
11150 PR target/84226
11151 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
11152 constraint from =wa to wa. Avoid a subreg on the output operand,
11153 instead use a pseudo and subreg it in a move.
11154 (p9_xxbrd_<mode>): Changed to ...
11155 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
11156 (p9_xxbrd_v2df): New expander.
11157 (p9_xxbrw_<mode>): Changed to ...
11158 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
11159 (p9_xxbrw_v4sf): New expander.
11160
11161 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
11162
11163 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
11164
11165 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
11166
11167 PR target/83926
11168 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
11169 multiply in 32-bit mode.
11170 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
11171 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
11172 mode.
11173
11174 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
11175
11176 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
11177 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
11178 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
11179 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
11180
11181 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
11182
11183 PR lto/84213
11184 * dwarf2out.c (is_trivial_indirect_ref): New function.
11185 (dwarf2out_late_global_decl): Do not generate a location
11186 attribute for variables that have a non-trivial DECL_VALUE_EXPR
11187 and that are not defined in the current unit.
11188
11189 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
11190
11191 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
11192 instead of a libcall for UNORDERED.
11193
11194 2018-02-09 Tamar Christina <tamar.christina@arm.com>
11195
11196 PR target/82641
11197 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
11198 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
11199
11200 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11201
11202 PR target/PR84295
11203 * config/s390/s390.c (s390_set_current_function): Invoke
11204 s390_indirect_branch_settings also if fndecl didn't change.
11205
11206 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
11207
11208 * config/rs6000/rs6000.md (blockage): Set length to zero.
11209
11210 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
11211
11212 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
11213
11214 2018-02-09 Jakub Jelinek <jakub@redhat.com>
11215
11216 PR sanitizer/84285
11217 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
11218 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
11219 -static-lib*san.
11220
11221 PR debug/84252
11222 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
11223 PARALLEL incoming that failed vt_get_decl_and_offset check.
11224
11225 PR middle-end/84237
11226 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
11227 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
11228 TREE_READONLY bit.
11229 (get_variable_section): For decls in named .bss* sections pass true as
11230 second argument to bss_initializer_p.
11231
11232 2018-02-09 Marek Polacek <polacek@redhat.com>
11233 Jakub Jelinek <jakub@redhat.com>
11234
11235 PR c++/83659
11236 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
11237 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
11238 Sync some changes from cxx_fold_indirect_ref.
11239
11240 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
11241
11242 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
11243 markers.
11244 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
11245 (BLOCK_INLINE_ENTRY_LABEL): New.
11246 (dwarf2out_var_location): Disregard inline entry markers.
11247 (inline_entry_data): New struct.
11248 (inline_entry_data_hasher): New hashtable type.
11249 (inline_entry_data_hasher::hash): New.
11250 (inline_entry_data_hasher::equal): New.
11251 (inline_entry_data_table): New variable.
11252 (add_high_low_attributes): Add DW_AT_entry_pc and
11253 DW_AT_GNU_entry_view attributes if a pending entry is found
11254 in inline_entry_data_table. Add old entry_pc attribute only
11255 if debug nonbinding markers are disabled.
11256 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
11257 markers are enabled.
11258 (block_within_block_p, dwarf2out_inline_entry): New.
11259 (dwarf2out_finish): Check that no entries remained in
11260 inline_entry_data_table.
11261 * final.c (reemit_insn_block_notes): Handle inline entry notes.
11262 (final_scan_insn, notice_source_line): Likewise.
11263 (rest_of_clean_state): Skip inline entry markers.
11264 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
11265 markers.
11266 * gimple.c (gimple_build_debug_inline_entry): New.
11267 * gimple.h (enum gimple_debug_subcode): Add
11268 GIMPLE_DEBUG_INLINE_ENTRY.
11269 (gimple_build_debug_inline_entry): Declare.
11270 (gimple_debug_inline_entry_p): New.
11271 (gimple_debug_nonbind_marker_p): Adjust.
11272 * insn-notes.def (INLINE_ENTRY): New.
11273 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
11274 inline entry marker notes.
11275 (print_insn): Likewise.
11276 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
11277 (INSN_DEBUG_MARKER_KIND): Likewise.
11278 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
11279 * tree-inline.c (expand_call_inline): Build and insert
11280 debug_inline_entry stmt.
11281 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
11282 inline entry blocks early, if nonbind markers are enabled.
11283 (dump_scope_block): Dump fragment info.
11284 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
11285 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
11286 (gimple_build_debug_inline_entry): New.
11287 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
11288 Enable/disable inline entry points too.
11289 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
11290 (DEBUG_INSN): Describe inline entry markers.
11291
11292 * common.opt (gvariable-location-views): New.
11293 (gvariable-location-views=incompat5): New.
11294 * config.in: Rebuilt.
11295 * configure: Rebuilt.
11296 * configure.ac: Test assembler for view support.
11297 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
11298 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
11299 * dwarf2out.c (var_loc_view): New typedef.
11300 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
11301 (dwarf2out_locviews_in_attribute): New.
11302 (dwarf2out_locviews_in_loclist): New.
11303 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
11304 (enum dw_line_info_opcode): Add LI_adv_address.
11305 (struct dw_line_info_table): Add view.
11306 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
11307 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
11308 (zero_view_p): New variable.
11309 (ZERO_VIEW_P): New macro.
11310 (output_asm_line_debug_info): New.
11311 (struct var_loc_node): Add view.
11312 (add_AT_view_list, AT_loc_list): New.
11313 (add_var_loc_to_decl): Add view param. Test it against last.
11314 (new_loc_list): Add view params. Record them.
11315 (AT_loc_list_ptr): Handle loc and view lists.
11316 (view_list_to_loc_list_val_node): New.
11317 (print_dw_val): Handle dw_val_class_view_list.
11318 (size_of_die): Likewise.
11319 (value_format): Likewise.
11320 (loc_list_has_views): New.
11321 (gen_llsym): Set vl_symbol too.
11322 (maybe_gen_llsym, skip_loc_list_entry): New.
11323 (dwarf2out_maybe_output_loclist_view_pair): New.
11324 (output_loc_list): Output view list or entries too.
11325 (output_view_list_offset): New.
11326 (output_die): Handle dw_val_class_view_list.
11327 (output_dwarf_version): New.
11328 (output_compilation_unit_header): Use it.
11329 (output_skeleton_debug_sections): Likewise.
11330 (output_rnglists, output_line_info): Likewise.
11331 (output_pubnames, output_aranges): Update version comments.
11332 (output_one_line_info_table): Output view numbers in asm comments.
11333 (dw_loc_list): Determine current endview, pass it to new_loc_list.
11334 Call maybe_gen_llsym.
11335 (loc_list_from_tree_1): Adjust.
11336 (add_AT_location_description): Create view list attribute if
11337 needed, check it's absent otherwise.
11338 (convert_cfa_to_fb_loc_list): Adjust.
11339 (maybe_emit_file): Call output_asm_line_debug_info for test.
11340 (dwarf2out_var_location): Reset views as needed. Precompute
11341 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
11342 attribute. Set view.
11343 (new_line_info_table): Reset next view.
11344 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
11345 (dwarf2out_source_line): Likewise. Output view resets and labels to
11346 the assembler, or select appropriate line info opcodes.
11347 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
11348 (optimize_string_length): Catch it. Adjust.
11349 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
11350 dw_val_class_view_list, and remove it if no longer needed.
11351 (hash_loc_list): Hash view numbers.
11352 (loc_list_hasher::equal): Compare them.
11353 (optimize_location_lists): Check whether a view list symbol is
11354 needed, and whether the locview attribute is present, and
11355 whether they match. Remove the locview attribute if no longer
11356 needed.
11357 (index_location_lists): Call skip_loc_list_entry for test.
11358 (dwarf2out_finish): Call output_asm_line_debug_info for test.
11359 Use output_dwarf_version.
11360 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
11361 (struct dw_val_node): Add val_view_list.
11362 * final.c (SEEN_NEXT_VIEW): New.
11363 (set_next_view_needed): New.
11364 (clear_next_view_needed): New.
11365 (maybe_output_next_view): New.
11366 (final_start_function): Rename to...
11367 (final_start_function_1): ... this. Take pointer to FIRST,
11368 add SEEN parameter. Emit param bindings in the initial view.
11369 (final_start_function): Reintroduce SEEN-less interface.
11370 (final): Rename to...
11371 (final_1): ... this. Take SEEN parameter. Output final pending
11372 next view at the end.
11373 (final): Reintroduce seen-less interface.
11374 (final_scan_insn): Output pending next view before switching
11375 sections or ending a block. Mark the next view as needed when
11376 outputting variable locations. Notify debug backend of section
11377 changes, and of location view changes.
11378 (rest_of_handle_final): Adjust.
11379 * toplev.c (process_options): Autodetect value for debug variable
11380 location views option. Warn on incompat5 without -gdwarf-5.
11381 * doc/invoke.texi (gvariable-location-views): New.
11382 (gvariable-location-views=incompat5): New.
11383 (gno-variable-location-views): New.
11384
11385 2018-02-08 David Malcolm <dmalcolm@redhat.com>
11386
11387 PR tree-optimization/84136
11388 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
11389 that the result of find_edge is non-NULL.
11390
11391 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
11392
11393 PR target/83008
11394 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
11395 storing integer register in SImode. Fix cost of 256 and 512
11396 byte aligned SSE register store.
11397
11398 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
11399
11400 * config/i386/i386.c (ix86_multiplication_cost): Fix
11401 multiplication cost for TARGET_AVX512DQ.
11402
11403 2018-02-08 Marek Polacek <polacek@redhat.com>
11404
11405 PR tree-optimization/84238
11406 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
11407 get_range_strlen.
11408
11409 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
11410
11411 PR tree-optimization/84265
11412 * tree-vect-stmts.c (vectorizable_store): Don't treat
11413 VMAT_CONTIGUOUS accesses as grouped.
11414 (vectorizable_load): Likewise.
11415
11416 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
11417
11418 PR tree-optimization/81635
11419 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
11420 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
11421 (test_round_for_mask): New functions.
11422 (wide_int_cc_tests): Call test_round_for_mask.
11423 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
11424 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
11425 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
11426 range returned by get_range_info.
11427
11428 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
11429
11430 PR ipa/81360
11431 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
11432 * symtab.c: Include builtins.h
11433 (symtab_node::output_to_lto_symbol_table_p): Move here
11434 from lto-streamer-out.c:output_symbol_p.
11435 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
11436 (output_symbol_p): Move all logic to symtab.c
11437 (produce_symtab): Update.
11438
11439 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11440
11441 * config/s390/s390-opts.h (enum indirect_branch): Define.
11442 * config/s390/s390-protos.h (s390_return_addr_from_memory)
11443 (s390_indirect_branch_via_thunk)
11444 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
11445 (enum s390_indirect_branch_type): Define.
11446 * config/s390/s390.c (struct s390_frame_layout, struct
11447 machine_function): Remove.
11448 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
11449 (indirect_branch_table_label_no, indirect_branch_table_name):
11450 Define variables.
11451 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
11452 (enum s390_indirect_branch_option): Define.
11453 (s390_return_addr_from_memory): New function.
11454 (s390_handle_string_attribute): New function.
11455 (s390_attribute_table): Add new attribute handler.
11456 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
11457 (s390_indirect_branch_via_thunk): New function.
11458 (s390_indirect_branch_via_inline_thunk): New function.
11459 (s390_function_ok_for_sibcall): When jumping via thunk disallow
11460 sibling call optimization for non z10 compiles.
11461 (s390_emit_call): Force indirect branch target to be a single
11462 register. Add r1 clobber for non-z10 compiles.
11463 (s390_emit_epilogue): Emit return jump via return_use expander.
11464 (s390_reorg): Handle JUMP_INSNs as execute targets.
11465 (s390_option_override_internal): Perform validity checks for the
11466 new command line options.
11467 (s390_indirect_branch_attrvalue): New function.
11468 (s390_indirect_branch_settings): New function.
11469 (s390_set_current_function): Invoke s390_indirect_branch_settings.
11470 (s390_output_indirect_thunk_function): New function.
11471 (s390_code_end): Implement target hook.
11472 (s390_case_values_threshold): Implement target hook.
11473 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
11474 macros.
11475 * config/s390/s390.h (struct s390_frame_layout)
11476 (struct machine_function): Move here from s390.c.
11477 (TARGET_INDIRECT_BRANCH_NOBP_RET)
11478 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
11479 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
11480 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
11481 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
11482 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
11483 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
11484 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
11485 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
11486 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
11487 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
11488 (mnemonic attribute): Add values which aren't recognized
11489 automatically.
11490 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
11491 pattern for branch conversion. Fix mnemonic attribute.
11492 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
11493 indirect branch via thunk if requested.
11494 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
11495 ("*indirect_jump"): Disable for branch conversion using out of
11496 line thunks.
11497 ("indirect_jump_via_thunk<mode>_z10")
11498 ("indirect_jump_via_thunk<mode>")
11499 ("indirect_jump_via_inlinethunk<mode>_z10")
11500 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
11501 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
11502 ("casesi_jump_via_inlinethunk<mode>_z10")
11503 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
11504 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
11505 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
11506 ("*indirect2_jump"): Disable for branch conversion.
11507 ("casesi_jump"): Turn into expander and expand patterns for branch
11508 conversion.
11509 ("return_use"): New expander.
11510 ("*return"): Emit return via thunk and rename it to ...
11511 ("*return<mode>"): ... this one.
11512 * config/s390/s390.opt: Add new options and and enum for the
11513 option values.
11514
11515 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
11516
11517 * lra-constraints.c (match_reload): Unconditionally use
11518 gen_lowpart_SUBREG, rather than selecting between that
11519 and equivalent gen_rtx_SUBREG code.
11520
11521 2018-02-08 Richard Biener <rguenther@suse.de>
11522
11523 PR tree-optimization/84233
11524 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
11525 changed flag instead of boguously re-using phi_inserted.
11526
11527 2018-02-08 Martin Jambor <mjambor@suse.cz>
11528
11529 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
11530 static local variables.
11531
11532 2018-02-08 Richard Biener <rguenther@suse.de>
11533
11534 PR tree-optimization/84278
11535 * tree-vect-stmts.c (vectorizable_store): When looking for
11536 smaller vector types to perform grouped strided loads/stores
11537 make sure the mode is supported by the target.
11538 (vectorizable_load): Likewise.
11539
11540 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
11541
11542 * config/aarch64/aarch64.c (aarch64_components_for_bb):
11543 Increase LDP/STP opportunities by adding adjacent callee-saves.
11544
11545 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
11546
11547 PR rtl-optimization/84068
11548 PR rtl-optimization/83459
11549 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
11550
11551 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
11552
11553 PR tree-optimization/84224
11554 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
11555 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
11556 non-zero arguments.
11557
11558 2018-02-07 Iain Sandoe <iain@codesourcery.com>
11559
11560 PR target/84113
11561 * config/rs6000/altivec.md (*restore_world): Remove LR use.
11562 * config/rs6000/predicates.md (restore_world_operation): Adjust op
11563 count, remove one USE.
11564
11565 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
11566
11567 * doc/install.texi (Configuration): Document the
11568 --with-long-double-format={ibm,ieee} PowerPC configuration
11569 options.
11570
11571 PR target/84154
11572 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
11573 Convert from define_expand to be define_insn_and_split. Rework
11574 float/double/_Float128 conversions to QI/HI/SImode to work with
11575 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
11576 conversions to QI/HImode types did a store and then a load to
11577 truncate the value. For conversions to VSX registers, don't split
11578 the insn, instead emit the code directly. Use the code iterator
11579 any_fix to combine signed and unsigned conversions.
11580 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
11581 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
11582 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11583 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
11584 (fix_<mode>di2_hw): Likewise.
11585 (fixuns_<mode>di2_hw): Likewise.
11586 (fix_<mode>si2_hw): Likewise.
11587 (fixuns_<mode>si2_hw): Likewise.
11588 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
11589 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11590 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
11591 fix<uns>_trunc<SFDF:mode>si2_p8.
11592 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
11593 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11594 (fix<uns>_<mode>_mem): Likewise.
11595 (fctiw<u>z_<mode>_mem): Likewise.
11596 (fix<uns>_<mode>_mem): Likewise.
11597 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
11598 the register allocator from doing a direct move to the GPRs to do
11599 a store, and instead use the ISA 3.0 store byte/half-word from
11600 vector register instruction. For IEEE 128-bit floating point,
11601 also optimize stores of 32-bit ints.
11602 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
11603
11604 2018-02-07 Alan Hayward <alan.hayward@arm.com>
11605
11606 * genextract.c (push_pathstr_operand): New function to support
11607 [a-zA-Z].
11608 (walk_rtx): Call push_pathstr_operand.
11609 (print_path): Support [a-zA-Z].
11610
11611 2018-02-07 Richard Biener <rguenther@suse.de>
11612
11613 PR tree-optimization/84037
11614 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
11615 (cse_and_gimplify_to_preheader): Declare.
11616 (vect_get_place_in_interleaving_chain): Likewise.
11617 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11618 ivexpr_map.
11619 (_loop_vec_info::~_loop_vec_info): Delete it.
11620 (cse_and_gimplify_to_preheader): New function.
11621 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
11622 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
11623 (vectorizable_load): Likewise. For grouped stores always base
11624 the IV on the first element.
11625 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
11626 condition before gimplifying.
11627
11628 2018-02-07 Jakub Jelinek <jakub@redhat.com>
11629
11630 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
11631 *DIV_EXPR and *MOD_EXPR.
11632
11633 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
11634
11635 PR target/84248
11636 * config/i386/i386.c (ix86_option_override_internal): Mask out
11637 the CF_SET bit when checking -fcf-protection.
11638
11639 2018-02-07 Tom de Vries <tom@codesourcery.com>
11640
11641 PR libgomp/84217
11642 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
11643 enough.
11644
11645 2018-02-07 Richard Biener <rguenther@suse.de>
11646
11647 PR tree-optimization/84204
11648 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
11649 this place.
11650
11651 PR tree-optimization/84205
11652 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
11653 special-case isl_ast_op_zdiv_r.
11654
11655 PR tree-optimization/84223
11656 * graphite-scop-detection.c (gather_bbs::before_dom_children):
11657 Only add conditions from within the region.
11658 (gather_bbs::after_dom_children): Adjust.
11659
11660 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
11661
11662 PR target/84209
11663 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
11664 * config/avr/avr.md: Only post-reload split REG-REG moves if
11665 either register is GENERAL_REG_P.
11666
11667 2018-02-07 Jakub Jelinek <jakub@redhat.com>
11668
11669 PR tree-optimization/84235
11670 * tree-ssa-scopedtables.c
11671 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
11672 if the subtraction is performed in floating point type where NaNs are
11673 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
11674 build 1. Formatting fix.
11675
11676 2018-02-06 Jakub Jelinek <jakub@redhat.com>
11677
11678 PR target/84146
11679 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
11680 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
11681 and skip it regardless of bb boundaries. Use CALL_P macro,
11682 don't test INSN_P (insn) together with CALL_P or JUMP_P check
11683 unnecessarily, formatting fix.
11684
11685 2018-02-06 Michael Collison <michael.collison@arm.com>
11686
11687 * config/arm/thumb2.md:
11688 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
11689 (*thumb_mov_notscc): Ditto.
11690
11691 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
11692
11693 PR target/84154
11694 * config/rs6000/rs6000.md (su code attribute): Use "u" for
11695 unsigned_fix, not "s".
11696
11697 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11698
11699 * configure.ac (gcc_fn_eh_frame_ro): New function.
11700 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
11701 correct .eh_frame permissions.
11702 * configure: Regenerate.
11703
11704 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
11705
11706 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
11707 irrelevant options.
11708
11709 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11710
11711 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11712 Display warning message for -mno-speculate-indirect-jumps.
11713
11714 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
11715
11716 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
11717 Undocumented.
11718 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
11719
11720 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
11721
11722 PR tree-optimization/84225
11723 * tree-eh.c (find_trapping_overflow): Only call
11724 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
11725
11726 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
11727
11728 PR target/84145
11729 * config/i386/i386.c: Reimplement the check of possible options
11730 -mibt/-mshstk conbination. Change error messages.
11731 * doc/invoke.texi: Fix a typo: remove extra '='.
11732
11733 2018-02-06 Marek Polacek <polacek@redhat.com>
11734
11735 PR tree-optimization/84228
11736 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
11737
11738 2018-02-06 Tamar Christina <tamar.christina@arm.com>
11739
11740 PR target/82641
11741 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
11742 emitted arch directives.
11743 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
11744 __ARM_FEATURE_COPROC before changing architectures.
11745
11746 2018-02-06 Richard Biener <rguenther@suse.de>
11747
11748 * config/i386/i386.c (print_reg): Fix typo.
11749 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
11750
11751 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
11752
11753 * configure: Regenerate.
11754
11755 2018-02-05 Martin Sebor <msebor@redhat.com>
11756
11757 PR tree-optimization/83369
11758 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
11759 inlining context.
11760
11761 2018-02-05 Martin Liska <mliska@suse.cz>
11762
11763 * doc/invoke.texi: Cherry-pick upstream r323995.
11764
11765 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
11766
11767 * ira.c (ira_init_register_move_cost): Adjust comment.
11768
11769 2018-02-05 Martin Liska <mliska@suse.cz>
11770
11771 PR gcov-profile/84137
11772 * doc/gcov.texi: Fix typo in documentation.
11773
11774 2018-02-05 Martin Liska <mliska@suse.cz>
11775
11776 PR gcov-profile/83879
11777 * doc/gcov.texi: Document necessity of --dynamic-list-data when
11778 using dlopen functionality.
11779
11780 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
11781
11782 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
11783 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
11784 _mm_maskz_range_ss, _mm_mask_range_round_ss,
11785 _mm_maskz_range_round_ss): New intrinsics.
11786 (__builtin_ia32_rangesd128_round)
11787 (__builtin_ia32_rangess128_round): Remove.
11788 (__builtin_ia32_rangesd128_mask_round,
11789 __builtin_ia32_rangess128_mask_round): New builtins.
11790 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
11791 __builtin_ia32_rangess128_round): Remove.
11792 (__builtin_ia32_rangesd128_mask_round,
11793 __builtin_ia32_rangess128_mask_round): New builtins.
11794 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
11795 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
11796 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
11797 "<round_saeonly_constraint>")): Changed to ...
11798 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
11799 "<round_saeonly_scalar_constraint>")): ... this.
11800 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
11801 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
11802 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
11803 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
11804 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
11805
11806 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
11807
11808 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
11809 options.
11810 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
11811 Remove all values except native, 8540 and 8548.
11812
11813 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
11814
11815 * config/i386/i386.c (ix86_output_function_return): Pass
11816 INVALID_REGNUM, instead of -1, as invalid register number to
11817 indirect_thunk_name and output_indirect_thunk.
11818
11819 2018-02-02 Julia Koval <julia.koval@intel.com>
11820
11821 * config.gcc: Add -march=icelake.
11822 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
11823 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
11824 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
11825 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
11826 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
11827 (processor_target_table): Add icelake.
11828 (ix86_option_override_internal): Handle new PTAs.
11829 (get_builtin_code_for_version): Handle icelake.
11830 (M_INTEL_COREI7_ICELAKE): New.
11831 (fold_builtin_cpu): Handle icelake.
11832 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
11833 * doc/invoke.texi: Add -march=icelake.
11834
11835 2018-02-02 Julia Koval <julia.koval@intel.com>
11836
11837 * config/i386/i386.c (ix86_option_override_internal): Change flags type
11838 to wide_int_bitmask.
11839 * wide-int-bitmask.h: New.
11840
11841 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
11842
11843 PR target/84066
11844 * config/i386/i386.md: Replace Pmode with word_mode in
11845 builtin_setjmp_setup and builtin_longjmp to support x32.
11846
11847 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
11848
11849 PR target/56010
11850 PR target/83743
11851 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
11852 #include "opts.h".
11853 (rs6000_supported_cpu_names): New static variable.
11854 (linux_cpu_translation_table): Likewise.
11855 (elf_platform) <cpu>: Define new static variable and use it.
11856 Translate kernel AT_PLATFORM name to canonical name if needed.
11857 Error if platform name is unknown.
11858
11859 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
11860
11861 PR target/84089
11862 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
11863
11864 2018-02-01 Jeff Law <law@redhat.com>
11865
11866 PR target/84128
11867 * config/i386/i386.c (release_scratch_register_on_entry): Add new
11868 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
11869 the scratch if RELEASE_VIA_POP is false.
11870 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
11871 If we have to save a temporary register, decrement SIZE appropriately.
11872 Pass new arguments to release_scratch_register_on_entry.
11873 (ix86_adjust_stack_and_probe): Likewise.
11874 (ix86_emit_probe_stack_range): Pass new arguments to
11875 release_scratch_register_on_entry.
11876
11877 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
11878
11879 PR rtl-optimization/84157
11880 * combine.c (change_zero_ext): Use REG_P predicate in
11881 front of HARD_REGISTER_P predicate.
11882
11883 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
11884
11885 * config/avr/avr.c (avr_option_override): Move disabling of
11886 -fdelete-null-pointer-checks to...
11887 * common/config/avr/avr-common.c (avr_option_optimization_table):
11888 ...here.
11889
11890 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11891
11892 PR tree-optimization/81635
11893 * tree-data-ref.c (split_constant_offset_1): For types that
11894 wrap on overflow, try to use range info to prove that wrapping
11895 cannot occur.
11896
11897 2018-02-01 Renlin Li <renlin.li@arm.com>
11898
11899 PR target/83370
11900 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
11901 TAILCALL_ADDR_REGS.
11902 (aarch64_register_move_cost): Likewise.
11903 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
11904 TAILCALL_ADDR_REGS.
11905 (REG_CLASS_NAMES): Likewise.
11906 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
11907 TAILCALL_ADDR_REGS. Remove IP registers.
11908 * config/aarch64/aarch64.md (Ucs): Update register constraint.
11909
11910 2018-02-01 Richard Biener <rguenther@suse.de>
11911
11912 * domwalk.h (dom_walker::dom_walker): Add additional constructor
11913 for specifying RPO order and allow NULL for that.
11914 * domwalk.c (dom_walker::dom_walker): Likewise.
11915 (dom_walker::walk): Handle NULL RPO order.
11916 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
11917 in RPO order.
11918 (rewrite_update_dom_walker): Likewise.
11919 (mark_def_dom_walker): Likewise.
11920
11921 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11922
11923 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
11924 (aarch64_maybe_expand_sve_subreg_move): Declare.
11925 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
11926 * config/aarch64/predicates.md (aarch64_any_register_operand): New
11927 predicate.
11928 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
11929 that are semantically a reverse operation.
11930 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
11931 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
11932 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
11933 functions.
11934 (aarch64_can_change_mode_class): For big-endian, forbid changes
11935 between two SVE modes if they have different element sizes.
11936
11937 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11938
11939 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
11940 the TImode handling for big-endian targets.
11941
11942 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11943
11944 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
11945 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
11946 not just bytes.
11947 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
11948 Remove BSWAP handing for big-endian targets and use the form of
11949 LD1RQ appropariate for the mode.
11950
11951 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11952
11953 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
11954 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
11955 duplicated element.
11956
11957 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
11958
11959 PR tearget/83845
11960 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
11961 check for operands that need to go through aarch64_sve_reload_be.
11962
11963 2018-02-01 Jakub Jelinek <jakub@redhat.com>
11964
11965 PR tree-optimization/81661
11966 PR tree-optimization/84117
11967 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
11968 * tree-eh.c: Include gimplify.h.
11969 (find_trapping_overflow, replace_trapping_overflow,
11970 rewrite_to_non_trapping_overflow): New functions.
11971 * tree-vect-loop.c: Include tree-eh.h.
11972 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
11973 * tree-data-ref.c: Include tree-eh.h.
11974 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
11975
11976 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
11977
11978 PR rtl-optimization/84123
11979 * combine.c (change_zero_ext): Check if hard register satisfies
11980 can_change_dest_mode before calling gen_lowpart_SUBREG.
11981
11982 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
11983
11984 PR target/82444
11985 * ira.c (ira_init_register_move_cost): Remove assert.
11986
11987 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
11988
11989 PR rtl-optimization/84071
11990 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
11991 * doc/tm.texi: Regenerate.
11992
11993 2018-01-31 Richard Biener <rguenther@suse.de>
11994
11995 PR tree-optimization/84132
11996 * tree-data-ref.c (analyze_miv_subscript): Properly
11997 check whether evolution_function_is_affine_multivariate_p
11998 before calling gcd_of_steps_may_divide_p.
11999
12000 2018-01-31 Julia Koval <julia.koval@intel.com>
12001
12002 PR target/83618
12003 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
12004 * config/i386/i386.md (rdpid_rex64) New.
12005 (rdpid): Make 32bit only.
12006
12007 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
12008
12009 PR lto/84105
12010 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
12011 an IDENTIFIER_NODE for FUNCTION_TYPE's.
12012
12013 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
12014
12015 Revert
12016 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
12017
12018 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12019
12020 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
12021
12022 PR rtl-optimization/84071
12023 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
12024 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
12025
12026 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
12027
12028 * config/arc/arc.c (arc_handle_aux_attribute): New function.
12029 (arc_attribute_table): Add 'aux' attribute.
12030 (arc_in_small_data_p): Consider aux like variables.
12031 (arc_is_aux_reg_p): New function.
12032 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
12033 (arc_get_aux_arg): New function.
12034 (prepare_move_operands): Handle aux-register access.
12035 (arc_handle_aux_attribute): New function.
12036 * doc/extend.texi (ARC Variable attributes): Add subsection.
12037
12038 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
12039
12040 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
12041 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
12042 (arc_attribute_table): Add 'uncached' attribute.
12043 (arc_print_operand): Print '.di' flag for uncached memory
12044 accesses.
12045 (arc_in_small_data_p): Do not consider for small data the uncached
12046 types.
12047 (arc_is_uncached_mem_p): New function.
12048 * config/arc/predicates.md (compact_store_memory_operand): Check
12049 for uncached memory accesses.
12050 (nonvol_nonimm_operand): Likewise.
12051 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
12052
12053 2018-01-31 Jakub Jelinek <jakub@redhat.com>
12054
12055 PR c/84100
12056 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
12057 falign-loops=): Add Optimization flag.
12058
12059 2018-01-30 Jeff Law <law@redhat.com>
12060
12061 PR target/84064
12062 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
12063 INT_REGISTERS_SAVED. Check it prior to calling
12064 get_scratch_register_on_entry.
12065 (ix86_adjust_stack_and_probe): Similarly.
12066 (ix86_emit_probe_stack_range): Similarly.
12067 (ix86_expand_prologue): Corresponding changes.
12068
12069 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12070
12071 PR target/40411
12072 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
12073 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
12074
12075 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
12076
12077 PR target/84112
12078 * lra-constraints.c (curr_insn_transform): Process AND in the
12079 address.
12080
12081 2018-01-30 Jakub Jelinek <jakub@redhat.com>
12082
12083 PR rtl-optimization/83986
12084 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
12085 dependence against last_pending_memory_flush in addition to
12086 pending_jump_insns.
12087
12088 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
12089
12090 PR tree-optimization/81611
12091 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
12092 copies.
12093
12094 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12095
12096 PR target/83758
12097 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
12098 a reg rtx.
12099
12100 2018-01-30 Richard Biener <rguenther@suse.de>
12101 Jakub Jelinek <jakub@redhat.com>
12102
12103 PR tree-optimization/84111
12104 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
12105 inner loops added during recursion, as they don't have up-to-date
12106 SSA form.
12107
12108 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
12109
12110 PR ipa/81360
12111 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
12112 (can_inline_edge_by_limits_p): ... here.
12113 (can_early_inline_edge_p, check_callers,
12114 update_caller_keys, update_callee_keys, recursive_inlining,
12115 add_new_edges_to_heap, speculation_useful_p,
12116 inline_small_functions,
12117 inline_small_functions, flatten_function,
12118 inline_to_all_callers_1): Update.
12119
12120 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
12121
12122 * profile-count.c (profile_count::combine_with_ipa_count): Handle
12123 zeros correctly.
12124
12125 2018-01-30 Richard Biener <rguenther@suse.de>
12126
12127 PR tree-optimization/83008
12128 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
12129 invariant and constant vector uses in stmts when they need
12130 more than one stmt.
12131
12132 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12133
12134 PR bootstrap/84017
12135 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
12136 * configure: Regenerate.
12137
12138 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
12139
12140 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
12141 pattern.
12142 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
12143 Use gen_rtx_REG rather than gen_lowpart.
12144
12145 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
12146
12147 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
12148 rather than 0 when creating partial subregs.
12149
12150 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
12151
12152 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
12153 of usage.
12154
12155 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
12156
12157 PR target/81550
12158 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
12159 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
12160 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
12161 flags. This restores the settings used before the 2017-07-24.
12162 Turning off pre increment/decrement/modify allows IVOPTS to
12163 optimize DF/SF loops where the index is an int.
12164
12165 2018-01-29 Richard Biener <rguenther@suse.de>
12166 Kelvin Nilsen <kelvin@gcc.gnu.org>
12167
12168 PR bootstrap/80867
12169 * tree-vect-stmts.c (vectorizable_call): Don't call
12170 targetm.vectorize_builtin_md_vectorized_function if callee is
12171 NULL.
12172
12173 2018-01-22 Carl Love <cel@us.ibm.com>
12174
12175 * doc/extend.tex: Fix typo in second arg in
12176 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
12177
12178 2018-01-29 Richard Biener <rguenther@suse.de>
12179
12180 PR tree-optimization/84086
12181 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
12182 (flush_ssaname_freelist): When SSA names were released reset
12183 the SCEV hash table.
12184
12185 2018-01-29 Richard Biener <rguenther@suse.de>
12186
12187 PR tree-optimization/84057
12188 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
12189 removed paths when removing edges.
12190
12191 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
12192
12193 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
12194 -mfunction-return=@var{choice}.
12195
12196 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
12197
12198 PR diagnostic/84034
12199 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
12200 Handle CR like TAB.
12201 (layout::print_source_line): Likewise.
12202 (test_get_line_width_without_trailing_whitespace): Add test cases.
12203
12204 2018-01-27 Jakub Jelinek <jakub@redhat.com>
12205
12206 PR middle-end/84040
12207 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
12208 debug insns.
12209
12210 2018-01-26 Jim Wilson <jimw@sifive.com>
12211
12212 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
12213
12214 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
12215 specified.
12216
12217 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12218
12219 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
12220 and CMP + SUB-immediate -> SUBS.
12221
12222 2018-01-26 Martin Sebor <msebor@redhat.com>
12223
12224 PR tree-optimization/83896
12225 * tree-ssa-strlen.c (get_string_len): Rename...
12226 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
12227 Avoid assuming length is constant.
12228 (handle_char_store): Use HOST_WIDE_INT for string length.
12229
12230 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
12231
12232 PR target/81763
12233 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
12234 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
12235
12236 2018-01-26 Richard Biener <rguenther@suse.de>
12237
12238 PR rtl-optimization/84003
12239 * dse.c (record_store): Only record redundant stores when
12240 the earlier store aliases at least all accesses the later one does.
12241
12242 2018-01-26 Jakub Jelinek <jakub@redhat.com>
12243
12244 PR rtl-optimization/83985
12245 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
12246 REG_CFA_RESTORE insns.
12247 (delete_unmarked_insns): Don't ignore separate shrink wrapping
12248 REG_CFA_RESTORE insns here.
12249
12250 PR c/83989
12251 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
12252 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
12253
12254 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12255
12256 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
12257 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
12258 (arc_init): Likewise.
12259 (arc_override_options): Likewise.
12260 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
12261 value.
12262 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
12263 support.
12264 * config/arc/arc.h (TARGET_DBNZ): Define.
12265 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
12266 properly set the tune attribute.
12267 (dbnz): Use TARGET_DBNZ guard.
12268 * config/arc/arc.opt (mtune): Add core3 option.
12269
12270 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12271
12272 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
12273 recognize new pic like addresses.
12274 (arc_delegitimize_address): Clean up.
12275
12276 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12277
12278 * config/arc/arc-arches.def: Option mrf16 valid for all
12279 architectures.
12280 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
12281 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
12282 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
12283 * config/arc/arc-tables.opt: Regenerate.
12284 * config/arc/arc.c (arc_conditional_register_usage): Handle
12285 reduced register file case.
12286 (arc_file_start): Set must have build attributes.
12287 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
12288 mrf16 option value.
12289 * config/arc/arc.opt (mrf16): Add new option.
12290 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
12291 * config/arc/genmultilib.awk: Handle new mrf16 option.
12292 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
12293 * config/arc/t-multilib: Regenerate.
12294 * doc/invoke.texi (ARC Options): Document mrf16 option.
12295
12296 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12297
12298 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
12299 * config/arc/arc.c (arc_handle_secure_attribute): New function.
12300 (arc_attribute_table): Add 'secure_call' attribute.
12301 (arc_print_operand): Print secure call operand.
12302 (arc_function_ok_for_sibcall): Don't optimize tail calls when
12303 secure.
12304 (arc_is_secure_call_p): New function. * config/arc/arc.md
12305 (call_i): Add support for sjli instruction.
12306 (call_value_i): Likewise.
12307 * config/arc/constraints.md (Csc): New constraint.
12308
12309 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12310 John Eric Martin <John.Martin@emmicro-us.com>
12311
12312 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
12313 * config/arc/arc.c (_arc_jli_section): New struct.
12314 (arc_jli_section): New type.
12315 (rc_jli_sections): New static variable.
12316 (arc_handle_jli_attribute): New function.
12317 (arc_attribute_table): Add jli_always and jli_fixed attribute.
12318 (arc_file_end): New function.
12319 (TARGET_ASM_FILE_END): Define.
12320 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
12321 (arc_add_jli_section): New function.
12322 (jli_call_scan): Likewise.
12323 (arc_reorg): Call jli_call_scan.
12324 (arc_output_addsi): Remove 'S' from printing asm operand.
12325 (arc_is_jli_call_p): New function.
12326 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
12327 operand.
12328 (movhi_insn): Likewise.
12329 (movsi_insn): Likewise.
12330 (movsi_set_cc_insn): Likewise.
12331 (loadqi_update): Likewise.
12332 (load_zeroextendqisi_update): Likewise.
12333 (load_signextendqisi_update): Likewise.
12334 (loadhi_update): Likewise.
12335 (load_zeroextendhisi_update): Likewise.
12336 (load_signextendhisi_update): Likewise.
12337 (loadsi_update): Likewise.
12338 (loadsf_update): Likewise.
12339 (movsicc_insn): Likewise.
12340 (bset_insn): Likewise.
12341 (bxor_insn): Likewise.
12342 (bclr_insn): Likewise.
12343 (bmsk_insn): Likewise.
12344 (bicsi3_insn): Likewise.
12345 (cmpsi_cc_c_insn): Likewise.
12346 (movsi_ne): Likewise.
12347 (movsi_cond_exec): Likewise.
12348 (clrsbsi2): Likewise.
12349 (norm_f): Likewise.
12350 (normw): Likewise.
12351 (swap): Likewise.
12352 (divaw): Likewise.
12353 (flag): Likewise.
12354 (sr): Likewise.
12355 (kflag): Likewise.
12356 (ffs): Likewise.
12357 (ffs_f): Likewise.
12358 (fls): Likewise.
12359 (call_i): Remove 'S' asm letter, add jli instruction.
12360 (call_value_i): Likewise.
12361 * config/arc/arc.op (mjli-always): New option.
12362 * config/arc/constraints.md (Cji): New constraint.
12363 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
12364 operand.
12365 (subsf3_fpx): Likewise.
12366 (mulsf3_fpx): Likewise.
12367 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
12368 asm operand.
12369 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
12370 function attrbutes.
12371 * doc/invoke.texi (ARC): Document mjli-always option.
12372
12373 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
12374
12375 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
12376 avoid addition with 0 and use incw and decw where possible.
12377
12378 2018-01-26 Richard Biener <rguenther@suse.de>
12379
12380 PR tree-optimization/81082
12381 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
12382 association if it requires casting to unsigned.
12383 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
12384 from fold_plusminus_mult_expr to catch important cases late when
12385 range info is available.
12386
12387 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12388
12389 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
12390 * configure.ac (hidden_linkonce): New test.
12391 * configure: Regenerate.
12392 * config.in: Regenerate.
12393
12394 2018-01-26 Julia Koval <julia.koval@intel.com>
12395
12396 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
12397 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
12398 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
12399 _mm_mask_bitshuffle_epi64_mask): Fix type.
12400 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
12401 USI_FTYPE_V4DI_V4DI_USI): Remove.
12402 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
12403 __builtin_ia32_vpshufbitqmb256_mask,
12404 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
12405 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
12406 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
12407
12408 2018-01-26 Alan Modra <amodra@gmail.com>
12409
12410 PR target/84033
12411 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
12412 UNSPEC_VBPERMQ. Sort other unspecs.
12413
12414 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
12415
12416 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
12417
12418 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
12419
12420 PR middle-end/83055
12421 * predict.c (drop_profile): Do not push/pop cfun; update also
12422 node->count.
12423 (handle_missing_profiles): Fix logic looking for zero profiles.
12424
12425 2018-01-25 Jakub Jelinek <jakub@redhat.com>
12426
12427 PR middle-end/83977
12428 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
12429 on functions with #pragma omp declare simd or functions with simd
12430 attribute.
12431 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
12432 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
12433 Remove trailing \n from warning_at calls.
12434
12435 2018-01-25 Tom de Vries <tom@codesourcery.com>
12436
12437 PR target/84028
12438 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12439 for neutered workers.
12440
12441 2018-01-24 Joseph Myers <joseph@codesourcery.com>
12442
12443 PR target/68467
12444 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
12445 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
12446
12447 2018-01-24 Jeff Law <law@redhat.com>
12448
12449 PR target/83994
12450 * i386.c (get_probe_interval): Move to earlier point.
12451 (ix86_compute_frame_layout): If -fstack-clash-protection and
12452 the frame is larger than the probe interval, then use pushes
12453 to save registers rather than reg->mem moves.
12454 (ix86_expand_prologue): Remove conditional for int_registers_saved
12455 assertion.
12456
12457 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
12458
12459 PR target/84014
12460 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
12461 min/max for never referenced object.
12462
12463 2018-01-24 Jakub Jelinek <jakub@redhat.com>
12464
12465 PR middle-end/83977
12466 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
12467 here.
12468 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
12469 attributes from DECL_ATTRIBUTES (decl) without affecting
12470 DECL_ATTRIBUTES (current_function_decl).
12471 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
12472 functions with non-NULL DECL_ABSTRACT_ORIGIN.
12473
12474 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
12475
12476 PR tree-optimization/83979
12477 * fold-const.c (fold_comparison): Use constant_boolean_node
12478 instead of boolean_{true,false}_node.
12479
12480 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
12481
12482 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
12483 with zero counts.
12484
12485 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12486
12487 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12488 Simplify the clause that sets the length attribute.
12489 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12490 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
12491 clause that sets the length attribute.
12492 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12493
12494 2018-01-24 Tom de Vries <tom@codesourcery.com>
12495
12496 PR target/83589
12497 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
12498 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
12499 Add strict parameter.
12500 (prevent_branch_around_nothing): Insert dummy insn between branch to
12501 label and label with no ptx insn inbetween.
12502 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
12503
12504 2018-01-24 Tom de Vries <tom@codesourcery.com>
12505
12506 PR target/81352
12507 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12508 for neutered threads in warp.
12509 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
12510
12511 2018-01-24 Richard Biener <rguenther@suse.de>
12512
12513 PR tree-optimization/83176
12514 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
12515 operands.
12516
12517 2018-01-24 Richard Biener <rguenther@suse.de>
12518
12519 PR tree-optimization/82819
12520 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
12521 code generating pluses that are no-ops in the target precision.
12522
12523 2018-01-24 Richard Biener <rguenther@suse.de>
12524
12525 PR middle-end/84000
12526 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
12527
12528 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
12529
12530 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
12531 to merge probabilities.
12532 * predict.c (probably_never_executed): Also mark as cold functions
12533 with global 0 profile and guessed local profile.
12534 * profile-count.c (profile_probability::combine_with_count): New
12535 member function.
12536 * profile-count.h (profile_probability::operator*,
12537 profile_probability::operator*=, profile_probability::operator/,
12538 profile_probability::operator/=): Reduce precision to adjusted
12539 and set value to guessed on contradictory divisions.
12540 (profile_probability::combine_with_freq): Remove.
12541 (profile_probability::combine_wiht_count): Declare.
12542 (profile_count::force_nonzero):: Set to adjusted.
12543 (profile_count::probability_in):: Set quality to adjusted.
12544 * tree-ssa-tail-merge.c (replace_block_by): Use
12545 combine_with_count.
12546
12547 2018-01-23 Andrew Waterman <andrew@sifive.com>
12548 Jim Wilson <jimw@sifive.com>
12549
12550 * config/riscv/riscv.c (riscv_stack_boundary): New.
12551 (riscv_option_override): Set riscv_stack_boundary. Handle
12552 riscv_preferred_stack_boundary_arg.
12553 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
12554 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
12555 (STACK_BOUNDARY): Set to riscv_stack_boundary.
12556 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
12557 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
12558 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
12559
12560 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
12561
12562 PR target/83905
12563 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
12564 of struct ix86_frame.
12565 (ix86_expand_epilogue): Likewise. Add a local variable for
12566 the reg_save_offset field in struct ix86_frame.
12567
12568 2018-01-23 Bin Cheng <bin.cheng@arm.com>
12569
12570 PR tree-optimization/82604
12571 * tree-loop-distribution.c (enum partition_kind): New enum item
12572 PKIND_PARTIAL_MEMSET.
12573 (partition_builtin_p): Support above new enum item.
12574 (generate_code_for_partition): Ditto.
12575 (compute_access_range): Differentiate cases that equality can be
12576 proven at all loops, the innermost loops or no loops.
12577 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
12578 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
12579 (finalize_partitions, distribute_loop): Don't fuse partition of
12580 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
12581 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
12582 parloop is enabled.
12583
12584 2018-01-23 Martin Liska <mliska@suse.cz>
12585
12586 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
12587 order to ignore the predictor.
12588 (PRED_POLYMORPHIC_CALL): Likewise.
12589 (PRED_RECURSIVE_CALL): Likewise.
12590
12591 2018-01-23 Martin Liska <mliska@suse.cz>
12592
12593 * tree-profile.c (tree_profiling): Print function header to
12594 aware reader which function we are working on.
12595 * value-prof.c (gimple_find_values_to_profile): Do not print
12596 not interesting value histograms.
12597
12598 2018-01-23 Martin Liska <mliska@suse.cz>
12599
12600 * profile-count.h (enum profile_quality): Add
12601 profile_uninitialized as the first value. Do not number values
12602 as they are zero based.
12603 (profile_count::verify): Update sanity check.
12604 (profile_probability::verify): Likewise.
12605
12606 2018-01-23 Nathan Sidwell <nathan@acm.org>
12607
12608 * doc/invoke.texi (ffor-scope): Deprecate.
12609
12610 2018-01-23 David Malcolm <dmalcolm@redhat.com>
12611
12612 PR tree-optimization/83510
12613 * domwalk.c (set_all_edges_as_executable): New function.
12614 (dom_walker::dom_walker): Convert bool param
12615 "skip_unreachable_blocks" to enum reachability. Move setup of
12616 edge flags to set_all_edges_as_executable and only do it when
12617 reachability is REACHABLE_BLOCKS.
12618 * domwalk.h (enum dom_walker::reachability): New enum.
12619 (dom_walker::dom_walker): Convert bool param
12620 "skip_unreachable_blocks" to enum reachability.
12621 (set_all_edges_as_executable): New decl.
12622 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
12623 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
12624 "reachability".
12625 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
12626 but converting true to REACHABLE_BLOCKS.
12627 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
12628 * tree-vrp.c
12629 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
12630 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
12631 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
12632 REACHABLE_BLOCKS.
12633 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
12634 if check_all_array_refs will be called.
12635
12636 2018-01-23 David Malcolm <dmalcolm@redhat.com>
12637
12638 * tree.c (selftest::test_location_wrappers): Add more test
12639 coverage.
12640
12641 2018-01-23 David Malcolm <dmalcolm@redhat.com>
12642
12643 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
12644 (selftest::test_bit_in_range): Likewise.
12645
12646 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
12647
12648 PR testsuite/83888
12649 * doc/sourcebuild.texi (vect_float): Say that the selector
12650 only describes the situation when -funsafe-math-optimizations is on.
12651 (vect_float_strict): Document.
12652
12653 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
12654
12655 PR tree-optimization/83965
12656 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12657 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
12658 instead of checking only for a reduction.
12659 (vect_recog_widen_sum_pattern): Likewise.
12660
12661 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
12662
12663 * predict.c (probably_never_executed): Only use precise profile info.
12664 (compute_function_frequency): Skip after inlining hack since we now
12665 have quality checking.
12666
12667 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
12668
12669 * profile-count.h (profile_probability::very_unlikely,
12670 profile_probability::unlikely, profile_probability::even): Set
12671 precision to guessed.
12672
12673 2018-01-23 Richard Biener <rguenther@suse.de>
12674
12675 PR tree-optimization/83963
12676 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
12677 Properly terminate dominator walk when crossing the exit edge not
12678 when visiting its source block.
12679
12680 2018-01-23 Jakub Jelinek <jakub@redhat.com>
12681
12682 PR c++/83918
12683 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
12684 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
12685
12686 2018-01-22 Jakub Jelinek <jakub@redhat.com>
12687
12688 PR tree-optimization/83957
12689 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
12690 semicolon after for body surrounded by braces.
12691
12692 PR tree-optimization/83081
12693 * profile-count.h (profile_probability::split): New method.
12694 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
12695 Use profile_probability::split.
12696 (do_compare_rtx_and_jump): Fix adjustment of probabilities
12697 when splitting a single conditional jump into 2.
12698
12699 2018-01-22 David Malcolm <dmalcolm@redhat.com>
12700
12701 PR tree-optimization/69452
12702 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
12703 decl.
12704
12705 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12706
12707 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
12708 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
12709 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
12710
12711 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12712
12713 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
12714 declaration.
12715 * config/rl78/rl78.md (movdi): New define_expand.
12716 * config/rl78/rl78.c (rl78_split_movdi): New function.
12717
12718 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
12719
12720 PR target/83862
12721 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
12722 no longer used.
12723 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
12724 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
12725 128-bit to produce an UNSPEC move to get the double word with the
12726 signbit and then a shift directly to do signbit.
12727 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
12728 implementation with a new version that just does either a direct
12729 move or a regular move. Move memory interface to separate insns.
12730 Move insns so they are next to the expander.
12731 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
12732 with signbit move. Split big and little endian case.
12733 (signbit<mode>2_dm_mem_le): Likewise.
12734 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
12735 (signbit<mode>2_dm2): Likewise.
12736
12737 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12738
12739 * config/rl78/rl78.md (anddi3): New define_expand.
12740
12741 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12742
12743 * config/rl78/rl78.md (umindi3): New define_expand.
12744
12745 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12746
12747 * config/rl78/rl78.md (smindi3): New define_expand.
12748
12749 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12750
12751 * config/rl78/rl78.md (smaxdi3): New define_expand.
12752
12753 2018-01-22 Carl Love <cel@us.ibm.com>
12754
12755 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
12756 LVX_V1TI): Add macro expansion.
12757 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
12758 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
12759 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
12760 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
12761 Change check to determine if the instruction is a byte reversing
12762 entry. Fix typo in comment.
12763 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
12764 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
12765 Add def_builtin calls for new builtins.
12766 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
12767 Add define_insn expansion.
12768
12769 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12770
12771 * config/rl78/rl78.md (umaxdi3): New define_expand.
12772
12773 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
12774
12775 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
12776 for non-QImode registers.
12777
12778 2018-01-22 Richard Biener <rguenther@suse.de>
12779
12780 PR tree-optimization/83963
12781 * graphite-scop-detection.c (scop_detection::get_sese): Delay
12782 including the loop exit block.
12783 (scop_detection::merge_sese): Likewise.
12784 (scop_detection::add_scop): Do it here instead.
12785
12786 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12787
12788 * doc/sourcebuild.texi (arm_softfloat): Document.
12789
12790 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
12791
12792 PR gcc/77734
12793 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
12794 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
12795 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
12796
12797 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12798 David Edelsohn <dje.gcc@gmail.com>
12799
12800 PR target/83946
12801 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12802 Change "crset eq" to "crset 2".
12803 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12804 (*call_indirect_aix<mode>_nospec): Likewise.
12805 (*call_value_indirect_aix<mode>_nospec): Likewise.
12806 (*call_indirect_elfv2<mode>_nospec): Likewise.
12807 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
12808 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
12809 change assembly output from . to $.
12810 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12811 (indirect_jump<mode>_nospec): Change assembly output from . to $.
12812 (*tablejump<mode>_internal1_nospec): Likewise.
12813
12814 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
12815
12816 PR target/80870
12817 * config/sh/sh_optimize_sett_clrt.cc:
12818 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
12819
12820 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
12821
12822 PR tree-optimization/83940
12823 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
12824 offset_dt to vect_constant_def rather than vect_unknown_def_type.
12825 (vect_check_load_store_mask): Add a mask_dt_out parameter and
12826 use it to pass back the definition type.
12827 (vect_check_store_rhs): Likewise rhs_dt_out.
12828 (vect_build_gather_load_calls): Add a mask_dt argument and use
12829 it instead of a call to vect_is_simple_use.
12830 (vectorizable_store): Update calls to vect_check_load_store_mask
12831 and vect_check_store_rhs. Use the dt returned by the latter instead
12832 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
12833 instead of calls to vect_is_simple_use. Pass the scalar rather
12834 than the vector operand to vect_is_simple_use when handling
12835 second and subsequent copies of an rhs value.
12836 (vectorizable_load): Update calls to vect_check_load_store_mask
12837 and vect_build_gather_load_calls. Use the cached mask_dt and
12838 gs_info.offset_dt instead of calls to vect_is_simple_use.
12839
12840 2018-01-20 Jakub Jelinek <jakub@redhat.com>
12841
12842 PR middle-end/83945
12843 * tree-emutls.c: Include gimplify.h.
12844 (lower_emutls_2): New function.
12845 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
12846 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
12847 it before further processing.
12848
12849 PR target/83930
12850 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
12851 UINTVAL (trueop1) instead of INTVAL (op1).
12852
12853 2018-01-19 Jakub Jelinek <jakub@redhat.com>
12854
12855 PR debug/81570
12856 PR debug/83728
12857 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
12858 INCOMING_FRAME_SP_OFFSET if not defined.
12859 (scan_trace): Add ENTRY argument. If true and
12860 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
12861 emit a note to adjust the CFA offset.
12862 (create_cfi_notes): Adjust scan_trace callers.
12863 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
12864 INCOMING_FRAME_SP_OFFSET in the CIE.
12865 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
12866 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
12867 Likewise.
12868 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
12869 * doc/tm.texi: Regenerated.
12870
12871 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12872
12873 PR rtl-optimization/83147
12874 * lra-constraints.c (remove_inheritance_pseudos): Use
12875 lra_substitute_pseudo_within_insn.
12876
12877 2018-01-19 Tom de Vries <tom@codesourcery.com>
12878 Cesar Philippidis <cesar@codesourcery.com>
12879
12880 PR target/83920
12881 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
12882
12883 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
12884
12885 PR target/83790
12886 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
12887 spaces for function labels.
12888
12889 2018-01-19 Martin Liska <mliska@suse.cz>
12890
12891 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
12892 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
12893 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
12894 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
12895 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
12896 (PRED_CONST_RETURN): Change from 69 to 65.
12897 (PRED_NULL_RETURN): Change from 91 to 71.
12898 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
12899 (PRED_LOOP_GUARD): Change from 66 to 73.
12900
12901 2018-01-19 Martin Liska <mliska@suse.cz>
12902
12903 * predict.c (predict_insn_def): Add new assert.
12904 (struct branch_predictor): Change type to signed integer.
12905 (test_prediction_value_range): Amend test to cover
12906 PROB_UNINITIALIZED.
12907 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
12908 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
12909 (PRED_LOOP_ITERATIONS_MAX): Likewise.
12910 (PRED_LOOP_IV_COMPARE): Likewise.
12911 * predict.h (PROB_UNINITIALIZED): Define new constant.
12912
12913 2018-01-19 Martin Liska <mliska@suse.cz>
12914
12915 * predict.c (dump_prediction): Add new format for
12916 analyze_brprob.py script which is enabled with -details
12917 suboption.
12918 * profile-count.h (precise_p): New function.
12919
12920 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
12921
12922 PR tree-optimization/83922
12923 * tree-vect-loop.c (vect_verify_full_masking): Return false if
12924 there are no statements that need masking.
12925 (vect_active_double_reduction_p): New function.
12926 (vect_analyze_loop_operations): Use it when handling phis that
12927 are not in the loop header.
12928
12929 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
12930
12931 PR tree-optimization/83914
12932 * tree-vect-loop.c (vectorizable_induction): Don't convert
12933 init_expr or apply the peeling adjustment for inductions
12934 that are nested within the vectorized loop.
12935
12936 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12937
12938 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
12939 instead of NEG.
12940
12941 2018-01-18 Jakub Jelinek <jakub@redhat.com>
12942
12943 PR sanitizer/81715
12944 PR testsuite/83882
12945 * function.h (gimplify_parameters): Add gimple_seq * argument.
12946 * function.c: Include gimple.h and options.h.
12947 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
12948 for the added local temporaries if needed.
12949 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
12950 if there are any parameter cleanups, wrap whole body into a
12951 try/finally with the cleanups.
12952
12953 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
12954
12955 PR target/82964
12956 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
12957 Use GET_MODE_CLASS for scalar floating point.
12958
12959 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
12960
12961 PR ipa/82256
12962 patch by PaX Team
12963 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
12964 Fix call of call_cgraph_insertion_hooks.
12965
12966 2018-01-18 Martin Sebor <msebor@redhat.com>
12967
12968 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
12969
12970 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
12971
12972 PR ipa/83619
12973 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
12974 frequencies.
12975
12976 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
12977
12978 PR other/70268
12979 * common.opt: (-ffile-prefix-map): New option.
12980 * opts.c (common_handle_option): Defer it.
12981 * opts-global.c (handle_common_deferred_options): Handle it.
12982 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
12983 * file-prefix-map.h: New file.
12984 (remap_debug_filename, add_debug_prefix_map): ...here.
12985 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
12986 * final.c (debug_prefix_map, add_debug_prefix_map
12987 remap_debug_filename): Move to...
12988 * file-prefix-map.c: New file.
12989 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
12990 generalize, get rid of alloca(), use strrchr() instead of strchr().
12991 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
12992 Implement in terms of add_prefix_map().
12993 (remap_macro_filename, remap_debug_filename): Implement in term of
12994 remap_filename().
12995 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
12996 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
12997 * dbxout.c: Include file-prefix-map.h.
12998 * varasm.c: Likewise.
12999 * vmsdbgout.c: Likewise.
13000 * xcoffout.c: Likewise.
13001 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
13002 * doc/cppopts.texi (-fmacro-prefix-map): Document.
13003 * doc/invoke.texi (-ffile-prefix-map): Document.
13004 (-fdebug-prefix-map): Update description.
13005
13006 2018-01-18 Martin Liska <mliska@suse.cz>
13007
13008 * config/i386/i386.c (indirect_thunk_name): Document that also
13009 lfence is emitted.
13010 (output_indirect_thunk): Document why both instructions
13011 (pause and lfence) are generated.
13012
13013 2018-01-18 Richard Biener <rguenther@suse.de>
13014
13015 PR tree-optimization/83887
13016 * graphite-scop-detection.c
13017 (scop_detection::get_nearest_dom_with_single_entry): Remove.
13018 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
13019 (scop_detection::merge_sese): Re-implement with a flood-fill
13020 algorithm that properly finds a SESE region if it exists.
13021
13022 2018-01-18 Jakub Jelinek <jakub@redhat.com>
13023
13024 PR c/61240
13025 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
13026 pointer_diff optimizations use view_convert instead of convert.
13027
13028 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13029
13030 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13031 Generate different code for -mno-speculate-indirect-jumps.
13032 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13033 (*call_indirect_aix<mode>): Disable for
13034 -mno-speculate-indirect-jumps.
13035 (*call_indirect_aix<mode>_nospec): New define_insn.
13036 (*call_value_indirect_aix<mode>): Disable for
13037 -mno-speculate-indirect-jumps.
13038 (*call_value_indirect_aix<mode>_nospec): New define_insn.
13039 (*sibcall_nonlocal_sysv<mode>): Generate different code for
13040 -mno-speculate-indirect-jumps.
13041 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13042
13043 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13044
13045 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
13046 long double type, set the flags for noting the default long double
13047 type, even if we don't pass or return a long double type.
13048
13049 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
13050
13051 PR ipa/83051
13052 * ipa-inline.c (flatten_function): Do not overwrite final inlining
13053 failure.
13054
13055 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
13056
13057 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
13058 support for merge[hl].
13059 (fold_mergehl_helper): New helper function.
13060 (tree-vector-builder.h): New #include for tree_vector_builder usage.
13061 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
13062 (altivec_vmrglw_direct): Add xxmrglw insn.
13063
13064 2018-01-17 Andrew Waterman <andrew@sifive.com>
13065
13066 * config/riscv/riscv.c (riscv_conditional_register_usage): If
13067 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
13068
13069 2018-01-17 David Malcolm <dmalcolm@redhat.com>
13070
13071 PR lto/83121
13072 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
13073 call the lto_location_cache before reading the
13074 DECL_SOURCE_LOCATION of the types.
13075
13076 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
13077 Richard Sandiford <richard.sandiford@linaro.org>
13078
13079 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
13080 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
13081 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
13082 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
13083 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
13084 Add declaration.
13085 * config/aarch64/constraints.md (aarch64_movti_operand):
13086 Limit immediates.
13087 * config/aarch64/predicates.md (Uti): Add new constraint.
13088
13089 2018-01-17 Carl Love <cel@us.ibm.com>
13090
13091 * config/rs6000/vsx.md (define_expand xl_len_r,
13092 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
13093 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
13094 lxvll.
13095 (define_expand, define_insn): Move the shift left from the
13096 define_insn to the define_expand for lxvl and stxvl instructions.
13097 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
13098 and XL_LEN_R definitions to PURE.
13099
13100 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
13101
13102 * config/i386/i386.c (indirect_thunk_name): Declare regno
13103 as unsigned int. Compare regno with INVALID_REGNUM.
13104 (output_indirect_thunk): Ditto.
13105 (output_indirect_thunk_function): Ditto.
13106 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
13107 in the call to output_indirect_thunk_function.
13108
13109 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
13110
13111 PR middle-end/83884
13112 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
13113 rather than the size of inner_type to determine the stack slot size
13114 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
13115
13116 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
13117
13118 PR target/83546
13119 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
13120 to PTA_SILVERMONT.
13121
13122 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
13123
13124 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
13125 endian Linux systems to optionally enable multilibs for selecting
13126 the long double type if the user configured an explicit type.
13127 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
13128 have no long double multilibs if not defined.
13129 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
13130 warn if the user used -mabi={ieee,ibm}longdouble and we built
13131 multilibs for long double.
13132 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
13133 appropriate multilib option.
13134 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
13135 multilib options.
13136 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
13137 for building long double multilibs.
13138 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
13139
13140 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
13141
13142 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
13143 copies.
13144
13145 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
13146 64 bits.
13147 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
13148 128 bits.
13149
13150 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
13151 variables.
13152
13153 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
13154 return value.
13155
13156 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
13157
13158 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
13159 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
13160
13161 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
13162
13163 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
13164 different rtl trees depending on TARGET_64BIT.
13165 (rs6000_gen_lvx): Likewise.
13166
13167 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
13168
13169 * config/visium/visium.md (nop): Tweak comment.
13170 (hazard_nop): Likewise.
13171
13172 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13173
13174 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
13175 -mspeculate-indirect-jumps.
13176 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
13177 for -mno-speculate-indirect-jumps.
13178 (*call_indirect_elfv2<mode>_nospec): New define_insn.
13179 (*call_value_indirect_elfv2<mode>): Disable for
13180 -mno-speculate-indirect-jumps.
13181 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
13182 (indirect_jump): Emit different RTL for
13183 -mno-speculate-indirect-jumps.
13184 (*indirect_jump<mode>): Disable for
13185 -mno-speculate-indirect-jumps.
13186 (*indirect_jump<mode>_nospec): New define_insn.
13187 (tablejump): Emit different RTL for
13188 -mno-speculate-indirect-jumps.
13189 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
13190 (tablejumpsi_nospec): New define_expand.
13191 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
13192 (tablejumpdi_nospec): New define_expand.
13193 (*tablejump<mode>_internal1): Disable for
13194 -mno-speculate-indirect-jumps.
13195 (*tablejump<mode>_internal1_nospec): New define_insn.
13196 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
13197 option.
13198
13199 2018-01-16 Artyom Skrobov tyomitch@gmail.com
13200
13201 * caller-save.c (insert_save): Drop unnecessary parameter. All
13202 callers updated.
13203
13204 2018-01-16 Jakub Jelinek <jakub@redhat.com>
13205 Richard Biener <rguenth@suse.de>
13206
13207 PR libgomp/83590
13208 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
13209 return early, inline manually is_gimple_sizepos. Make sure if we
13210 call gimplify_expr we don't end up with a gimple constant.
13211 * tree.c (variably_modified_type_p): Don't return true for
13212 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
13213 * gimplify.h (is_gimple_sizepos): Remove.
13214
13215 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
13216
13217 PR tree-optimization/83857
13218 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
13219 vectorizable_live_operation for pure SLP statements.
13220 (vectorizable_live_operation): Handle PHIs.
13221
13222 2018-01-16 Richard Biener <rguenther@suse.de>
13223
13224 PR tree-optimization/83867
13225 * tree-vect-stmts.c (vect_transform_stmt): Precompute
13226 nested_in_vect_loop_p since the scalar stmt may get invalidated.
13227
13228 2018-01-16 Jakub Jelinek <jakub@redhat.com>
13229
13230 PR c/83844
13231 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
13232 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
13233 If off is not INTEGER_CST, issue a may not be aligned warning
13234 rather than isn't aligned. Use isn%'t rather than isn't.
13235 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
13236 into MULT_EXPR.
13237 <case MULT_EXPR>: Improve the case when bottom and one of the
13238 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
13239 operand, in that case check if the other operand is multiple of
13240 bottom divided by the INTEGER_CST operand.
13241
13242 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
13243
13244 PR target/83858
13245 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
13246 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
13247 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
13248 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
13249 * config/pa/pa.c (pa_function_arg_advance): Likewise.
13250 (pa_function_arg, pa_arg_partial_bytes): Likewise.
13251 (pa_function_arg_size): New function.
13252
13253 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
13254
13255 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
13256 in a separate statement.
13257
13258 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
13259
13260 PR tree-optimization/83847
13261 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
13262 group gathers and scatters.
13263
13264 2018-01-16 Jakub Jelinek <jakub@redhat.com>
13265
13266 PR rtl-optimization/86620
13267 * params.def (max-sched-ready-insns): Bump minimum value to 1.
13268
13269 PR rtl-optimization/83213
13270 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
13271 to last if both are JUMP_INSNs.
13272
13273 PR tree-optimization/83843
13274 * gimple-ssa-store-merging.c
13275 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
13276 store_immediate_info for bswap/nop orig_stores.
13277
13278 2018-01-15 Andrew Waterman <andrew@sifive.com>
13279
13280 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
13281 !TARGET_MUL.
13282 <UDIV>: Increase cost if !TARGET_DIV.
13283
13284 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
13285
13286 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
13287 (define_attr "cr_logical_3op"): New.
13288 (cceq_ior_compare): Adjust.
13289 (cceq_ior_compare_complement): Adjust.
13290 (*cceq_rev_compare): Adjust.
13291 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
13292 (is_cracked_insn): Adjust.
13293 (insn_must_be_first_in_group): Adjust.
13294 * config/rs6000/40x.md: Adjust.
13295 * config/rs6000/440.md: Adjust.
13296 * config/rs6000/476.md: Adjust.
13297 * config/rs6000/601.md: Adjust.
13298 * config/rs6000/603.md: Adjust.
13299 * config/rs6000/6xx.md: Adjust.
13300 * config/rs6000/7450.md: Adjust.
13301 * config/rs6000/7xx.md: Adjust.
13302 * config/rs6000/8540.md: Adjust.
13303 * config/rs6000/cell.md: Adjust.
13304 * config/rs6000/e300c2c3.md: Adjust.
13305 * config/rs6000/e500mc.md: Adjust.
13306 * config/rs6000/e500mc64.md: Adjust.
13307 * config/rs6000/e5500.md: Adjust.
13308 * config/rs6000/e6500.md: Adjust.
13309 * config/rs6000/mpc.md: Adjust.
13310 * config/rs6000/power4.md: Adjust.
13311 * config/rs6000/power5.md: Adjust.
13312 * config/rs6000/power6.md: Adjust.
13313 * config/rs6000/power7.md: Adjust.
13314 * config/rs6000/power8.md: Adjust.
13315 * config/rs6000/power9.md: Adjust.
13316 * config/rs6000/rs64.md: Adjust.
13317 * config/rs6000/titan.md: Adjust.
13318
13319 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
13320
13321 * config/i386/predicates.md (indirect_branch_operand): Rewrite
13322 ix86_indirect_branch_register logic.
13323
13324 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
13325
13326 * config/i386/constraints.md (Bs): Update
13327 ix86_indirect_branch_register check. Don't check
13328 ix86_indirect_branch_register with GOT_memory_operand.
13329 (Bw): Likewise.
13330 * config/i386/predicates.md (GOT_memory_operand): Don't check
13331 ix86_indirect_branch_register here.
13332 (GOT32_symbol_operand): Likewise.
13333
13334 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
13335
13336 * config/i386/predicates.md (constant_call_address_operand):
13337 Rewrite ix86_indirect_branch_register logic.
13338 (sibcall_insn_operand): Likewise.
13339
13340 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
13341
13342 * config/i386/constraints.md (Bs): Replace
13343 ix86_indirect_branch_thunk_register with
13344 ix86_indirect_branch_register.
13345 (Bw): Likewise.
13346 * config/i386/i386.md (indirect_jump): Likewise.
13347 (tablejump): Likewise.
13348 (*sibcall_memory): Likewise.
13349 (*sibcall_value_memory): Likewise.
13350 Peepholes of indirect call and jump via memory: Likewise.
13351 * config/i386/i386.opt: Likewise.
13352 * config/i386/predicates.md (indirect_branch_operand): Likewise.
13353 (GOT_memory_operand): Likewise.
13354 (call_insn_operand): Likewise.
13355 (sibcall_insn_operand): Likewise.
13356 (GOT32_symbol_operand): Likewise.
13357
13358 2018-01-15 Jakub Jelinek <jakub@redhat.com>
13359
13360 PR middle-end/83837
13361 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
13362 type rather than type addr's type points to.
13363 (expand_omp_atomic_mutex): Likewise.
13364 (expand_omp_atomic): Likewise.
13365
13366 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
13367
13368 PR target/83839
13369 * config/i386/i386.c (output_indirect_thunk_function): Use
13370 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
13371 for __x86_return_thunk.
13372
13373 2018-01-15 Richard Biener <rguenther@suse.de>
13374
13375 PR middle-end/83850
13376 * expmed.c (extract_bit_field_1): Fix typo.
13377
13378 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13379
13380 PR target/83687
13381 * config/arm/iterators.md (VF): New mode iterator.
13382 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
13383 Remove integer-related logic from pattern.
13384 (neon_vabd<mode>_3): Likewise.
13385
13386 2018-01-15 Jakub Jelinek <jakub@redhat.com>
13387
13388 PR middle-end/82694
13389 * common.opt (fstrict-overflow): No longer an alias.
13390 (fwrapv-pointer): New option.
13391 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
13392 also for pointer types based on flag_wrapv_pointer.
13393 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
13394 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
13395 opts->x_flag_wrapv got set.
13396 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
13397 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
13398 POINTER_TYPE_OVERFLOW_UNDEFINED.
13399 * match.pd: Likewise in address comparison pattern.
13400 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
13401
13402 2018-01-15 Richard Biener <rguenther@suse.de>
13403
13404 PR lto/83804
13405 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
13406 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
13407 Reset type names to their identifier if their TYPE_DECL doesn't
13408 have linkage (and thus is used for ODR and devirt).
13409 (save_debug_info_for_decl): Remove.
13410 (save_debug_info_for_type): Likewise.
13411 (add_tree_to_fld_list): Adjust.
13412 * tree-pretty-print.c (dump_generic_node): Make dumping of
13413 type names more robust.
13414
13415 2018-01-15 Richard Biener <rguenther@suse.de>
13416
13417 * BASE-VER: Bump to 8.0.1.
13418
13419 2018-01-14 Martin Sebor <msebor@redhat.com>
13420
13421 PR other/83508
13422 * builtins.c (check_access): Avoid warning when the no-warning bit
13423 is set.
13424
13425 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
13426
13427 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
13428 * ira-color (allocno_hard_regs_compare): Likewise.
13429
13430 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
13431
13432 PR target/83013
13433 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
13434 Use .pushsection/.popsection.
13435
13436 2018-01-14 Martin Sebor <msebor@redhat.com>
13437
13438 PR c++/81327
13439 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
13440
13441 2018-01-14 Jakub Jelinek <jakub@redhat.com>
13442
13443 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
13444 entry from extra_headers.
13445 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
13446 extra_headers, make the list bitwise identical to the i?86-*-* one.
13447
13448 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
13449
13450 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
13451 -mcmodel=large with -mindirect-branch=thunk,
13452 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
13453 -mfunction-return=thunk-extern.
13454 * doc/invoke.texi: Document -mcmodel=large is incompatible with
13455 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
13456 -mfunction-return=thunk and -mfunction-return=thunk-extern.
13457
13458 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
13459
13460 * config/i386/i386.c (print_reg): Print the name of the full
13461 integer register without '%'.
13462 (ix86_print_operand): Handle 'V'.
13463 * doc/extend.texi: Document 'V' modifier.
13464
13465 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
13466
13467 * config/i386/constraints.md (Bs): Disallow memory operand for
13468 -mindirect-branch-register.
13469 (Bw): Likewise.
13470 * config/i386/predicates.md (indirect_branch_operand): Likewise.
13471 (GOT_memory_operand): Likewise.
13472 (call_insn_operand): Likewise.
13473 (sibcall_insn_operand): Likewise.
13474 (GOT32_symbol_operand): Likewise.
13475 * config/i386/i386.md (indirect_jump): Call convert_memory_address
13476 for -mindirect-branch-register.
13477 (tablejump): Likewise.
13478 (*sibcall_memory): Likewise.
13479 (*sibcall_value_memory): Likewise.
13480 Disallow peepholes of indirect call and jump via memory for
13481 -mindirect-branch-register.
13482 (*call_pop): Replace m with Bw.
13483 (*call_value_pop): Likewise.
13484 (*sibcall_pop_memory): Replace m with Bs.
13485 * config/i386/i386.opt (mindirect-branch-register): New option.
13486 * doc/invoke.texi: Document -mindirect-branch-register option.
13487
13488 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
13489
13490 * config/i386/i386-protos.h (ix86_output_function_return): New.
13491 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
13492 set function_return_type.
13493 (indirect_thunk_name): Add ret_p to indicate thunk for function
13494 return.
13495 (output_indirect_thunk_function): Pass false to
13496 indirect_thunk_name.
13497 (ix86_output_indirect_branch_via_reg): Likewise.
13498 (ix86_output_indirect_branch_via_push): Likewise.
13499 (output_indirect_thunk_function): Create alias for function
13500 return thunk if regno < 0.
13501 (ix86_output_function_return): New function.
13502 (ix86_handle_fndecl_attribute): Handle function_return.
13503 (ix86_attribute_table): Add function_return.
13504 * config/i386/i386.h (machine_function): Add
13505 function_return_type.
13506 * config/i386/i386.md (simple_return_internal): Use
13507 ix86_output_function_return.
13508 (simple_return_internal_long): Likewise.
13509 * config/i386/i386.opt (mfunction-return=): New option.
13510 (indirect_branch): Mention -mfunction-return=.
13511 * doc/extend.texi: Document function_return function attribute.
13512 * doc/invoke.texi: Document -mfunction-return= option.
13513
13514 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
13515
13516 * config/i386/i386-opts.h (indirect_branch): New.
13517 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
13518 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
13519 with local indirect jump when converting indirect call and jump.
13520 (ix86_set_indirect_branch_type): New.
13521 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
13522 (indirectlabelno): New.
13523 (indirect_thunk_needed): Likewise.
13524 (indirect_thunk_bnd_needed): Likewise.
13525 (indirect_thunks_used): Likewise.
13526 (indirect_thunks_bnd_used): Likewise.
13527 (INDIRECT_LABEL): Likewise.
13528 (indirect_thunk_name): Likewise.
13529 (output_indirect_thunk): Likewise.
13530 (output_indirect_thunk_function): Likewise.
13531 (ix86_output_indirect_branch_via_reg): Likewise.
13532 (ix86_output_indirect_branch_via_push): Likewise.
13533 (ix86_output_indirect_branch): Likewise.
13534 (ix86_output_indirect_jmp): Likewise.
13535 (ix86_code_end): Call output_indirect_thunk_function if needed.
13536 (ix86_output_call_insn): Call ix86_output_indirect_branch if
13537 needed.
13538 (ix86_handle_fndecl_attribute): Handle indirect_branch.
13539 (ix86_attribute_table): Add indirect_branch.
13540 * config/i386/i386.h (machine_function): Add indirect_branch_type
13541 and has_local_indirect_jump.
13542 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
13543 to true.
13544 (tablejump): Likewise.
13545 (*indirect_jump): Use ix86_output_indirect_jmp.
13546 (*tablejump_1): Likewise.
13547 (simple_return_indirect_internal): Likewise.
13548 * config/i386/i386.opt (mindirect-branch=): New option.
13549 (indirect_branch): New.
13550 (keep): Likewise.
13551 (thunk): Likewise.
13552 (thunk-inline): Likewise.
13553 (thunk-extern): Likewise.
13554 * doc/extend.texi: Document indirect_branch function attribute.
13555 * doc/invoke.texi: Document -mindirect-branch= option.
13556
13557 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
13558
13559 PR ipa/83051
13560 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
13561
13562 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
13563
13564 * ipa-inline.c (want_inline_small_function_p): Return false if
13565 inlining has already failed with CIF_FINAL_ERROR.
13566 (update_caller_keys): Call want_inline_small_function_p before
13567 can_inline_edge_p.
13568 (update_callee_keys): Likewise.
13569
13570 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
13571
13572 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
13573 New function.
13574 (rs6000_quadword_masked_address_p): Likewise.
13575 (quad_aligned_load_p): Likewise.
13576 (quad_aligned_store_p): Likewise.
13577 (const_load_sequence_p): Add comment to describe the outer-most loop.
13578 (mimic_memory_attributes_and_flags): New function.
13579 (rs6000_gen_stvx): Likewise.
13580 (replace_swapped_aligned_store): Likewise.
13581 (rs6000_gen_lvx): Likewise.
13582 (replace_swapped_aligned_load): Likewise.
13583 (replace_swapped_load_constant): Capitalize argument name in
13584 comment describing this function.
13585 (rs6000_analyze_swaps): Add a third pass to search for vector loads
13586 and stores that access quad-word aligned addresses and replace
13587 with stvx or lvx instructions when appropriate.
13588 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
13589 New function prototype.
13590 (rs6000_quadword_masked_address_p): Likewise.
13591 (rs6000_gen_lvx): Likewise.
13592 (rs6000_gen_stvx): Likewise.
13593 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
13594 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
13595 when memory address is aligned.
13596 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
13597 this split to select lvx instruction when memory address is aligned.
13598 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
13599 instruction when memory address is aligned.
13600 (*vsx_le_perm_load_v16qi): Likewise.
13601 (four unnamed splitters): Modify to select the stvx instruction
13602 when memory is aligned.
13603
13604 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
13605
13606 * predict.c (determine_unlikely_bbs): Handle correctly BBs
13607 which appears in the queue multiple times.
13608
13609 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13610 Alan Hayward <alan.hayward@arm.com>
13611 David Sherwood <david.sherwood@arm.com>
13612
13613 * tree-vectorizer.h (vec_lower_bound): New structure.
13614 (_loop_vec_info): Add check_nonzero and lower_bounds.
13615 (LOOP_VINFO_CHECK_NONZERO): New macro.
13616 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
13617 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
13618 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
13619 fields. Make seg_len the distance travelled, not including the
13620 access size.
13621 (dr_direction_indicator): Declare.
13622 (dr_zero_step_indicator): Likewise.
13623 (dr_known_forward_stride_p): Likewise.
13624 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
13625 tree-ssanames.h.
13626 (runtime_alias_check_p): Allow runtime alias checks with
13627 variable strides.
13628 (operator ==): Compare access_size and align.
13629 (prune_runtime_alias_test_list): Rework for new distinction between
13630 the access_size and seg_len.
13631 (create_intersect_range_checks_index): Likewise. Cope with polynomial
13632 segment lengths.
13633 (get_segment_min_max): New function.
13634 (create_intersect_range_checks): Use it.
13635 (dr_step_indicator): New function.
13636 (dr_direction_indicator): Likewise.
13637 (dr_zero_step_indicator): Likewise.
13638 (dr_known_forward_stride_p): Likewise.
13639 * tree-loop-distribution.c (data_ref_segment_size): Return
13640 DR_STEP * (niters - 1).
13641 (compute_alias_check_pairs): Update call to the dr_with_seg_len
13642 constructor.
13643 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
13644 (vect_preserves_scalar_order_p): New function, split out from...
13645 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
13646 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
13647 (vect_vfa_access_size): New function.
13648 (vect_vfa_align): Likewise.
13649 (vect_compile_time_alias): Take access_size_a and access_b arguments.
13650 (dump_lower_bound): New function.
13651 (vect_check_lower_bound): Likewise.
13652 (vect_small_gap_p): Likewise.
13653 (vectorizable_with_step_bound_p): Likewise.
13654 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
13655 depencies if the vectorization factor is 1. Convert the checks
13656 for nonzero steps into checks on the bounds of DR_STEP. Try using
13657 a bunds check for variable steps if the minimum required step is
13658 relatively small. Update calls to the dr_with_seg_len
13659 constructor and to vect_compile_time_alias.
13660 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
13661 function.
13662 (vect_loop_versioning): Call it.
13663 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
13664 when retrying.
13665 (vect_estimate_min_profitable_iters): Account for any bounds checks.
13666
13667 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13668 Alan Hayward <alan.hayward@arm.com>
13669 David Sherwood <david.sherwood@arm.com>
13670
13671 * doc/sourcebuild.texi (vect_scatter_store): Document.
13672 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
13673 optabs.
13674 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
13675 Document.
13676 * genopinit.c (main): Add supports_vec_scatter_store and
13677 supports_vec_scatter_store_cached to target_optabs.
13678 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
13679 IFN_MASK_SCATTER_STORE.
13680 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
13681 functions.
13682 * internal-fn.h (internal_store_fn_p): Declare.
13683 (internal_fn_stored_value_index): Likewise.
13684 * internal-fn.c (scatter_store_direct): New macro.
13685 (expand_scatter_store_optab_fn): New function.
13686 (direct_scatter_store_optab_supported_p): New macro.
13687 (internal_store_fn_p): New function.
13688 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
13689 IFN_MASK_SCATTER_STORE.
13690 (internal_fn_mask_index): Likewise.
13691 (internal_fn_stored_value_index): New function.
13692 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
13693 for scatter stores.
13694 * optabs-query.h (supports_vec_scatter_store_p): Declare.
13695 * optabs-query.c (supports_vec_scatter_store_p): New function.
13696 * tree-vectorizer.h (vect_get_store_rhs): Declare.
13697 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
13698 true for scatter stores.
13699 (vect_gather_scatter_fn_p): Handle scatter stores too.
13700 (vect_check_gather_scatter): Consider using scatter stores if
13701 supports_vec_scatter_store_p.
13702 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
13703 scatter stores too.
13704 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13705 internal_fn_stored_value_index.
13706 (check_load_store_masking): Handle scatter stores too.
13707 (vect_get_store_rhs): Make public.
13708 (vectorizable_call): Use internal_store_fn_p.
13709 (vectorizable_store): Handle scatter store internal functions.
13710 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
13711 when deciding whether the end of the group has been reached.
13712 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
13713 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
13714 (mask_scatter_store<mode>): New insns.
13715
13716 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13717 Alan Hayward <alan.hayward@arm.com>
13718 David Sherwood <david.sherwood@arm.com>
13719
13720 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
13721 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
13722 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
13723 function.
13724 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
13725 Use vect_truncate_gather_scatter_offset if we can't treat the
13726 operation as a normal gather load or scatter store.
13727 (get_group_load_store_type): Take the gather_scatter_info
13728 as argument. Try using a gather load or scatter store for
13729 single-element groups.
13730 (get_load_store_type): Update calls to get_group_load_store_type
13731 and vect_use_strided_gather_scatters_p.
13732
13733 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13734 Alan Hayward <alan.hayward@arm.com>
13735 David Sherwood <david.sherwood@arm.com>
13736
13737 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
13738 optional tree argument.
13739 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
13740 null target hooks.
13741 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
13742 but continue to use the current value as a fallback.
13743 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
13744 to compare the updates.
13745 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
13746 (get_load_store_type): Use it when handling a strided access.
13747 (vect_get_strided_load_store_ops): New function.
13748 (vect_get_data_ptr_increment): Likewise.
13749 (vectorizable_load): Handle strided gather loads. Always pass
13750 a step to vect_create_data_ref_ptr and bump_vector_ptr.
13751
13752 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13753 Alan Hayward <alan.hayward@arm.com>
13754 David Sherwood <david.sherwood@arm.com>
13755
13756 * doc/md.texi (gather_load@var{m}): Document.
13757 (mask_gather_load@var{m}): Likewise.
13758 * genopinit.c (main): Add supports_vec_gather_load and
13759 supports_vec_gather_load_cached to target_optabs.
13760 * optabs-tree.c (init_tree_optimization_optabs): Use
13761 ggc_cleared_alloc to allocate target_optabs.
13762 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
13763 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
13764 functions.
13765 * internal-fn.h (internal_load_fn_p): Declare.
13766 (internal_gather_scatter_fn_p): Likewise.
13767 (internal_fn_mask_index): Likewise.
13768 (internal_gather_scatter_fn_supported_p): Likewise.
13769 * internal-fn.c (gather_load_direct): New macro.
13770 (expand_gather_load_optab_fn): New function.
13771 (direct_gather_load_optab_supported_p): New macro.
13772 (direct_internal_fn_optab): New function.
13773 (internal_load_fn_p): Likewise.
13774 (internal_gather_scatter_fn_p): Likewise.
13775 (internal_fn_mask_index): Likewise.
13776 (internal_gather_scatter_fn_supported_p): Likewise.
13777 * optabs-query.c (supports_at_least_one_mode_p): New function.
13778 (supports_vec_gather_load_p): Likewise.
13779 * optabs-query.h (supports_vec_gather_load_p): Declare.
13780 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
13781 and memory_type field.
13782 (NUM_PATTERNS): Bump to 15.
13783 * tree-vect-data-refs.c: Include internal-fn.h.
13784 (vect_gather_scatter_fn_p): New function.
13785 (vect_describe_gather_scatter_call): Likewise.
13786 (vect_check_gather_scatter): Try using internal functions for
13787 gather loads. Recognize existing calls to a gather load function.
13788 (vect_analyze_data_refs): Consider using gather loads if
13789 supports_vec_gather_load_p.
13790 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
13791 (vect_get_gather_scatter_offset_type): Likewise.
13792 (vect_convert_mask_for_vectype): Likewise.
13793 (vect_add_conversion_to_patterm): Likewise.
13794 (vect_try_gather_scatter_pattern): Likewise.
13795 (vect_recog_gather_scatter_pattern): New pattern recognizer.
13796 (vect_vect_recog_func_ptrs): Add it.
13797 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13798 internal_fn_mask_index and internal_gather_scatter_fn_p.
13799 (check_load_store_masking): Take the gather_scatter_info as an
13800 argument and handle gather loads.
13801 (vect_get_gather_scatter_ops): New function.
13802 (vectorizable_call): Check internal_load_fn_p.
13803 (vectorizable_load): Likewise. Handle gather load internal
13804 functions.
13805 (vectorizable_store): Update call to check_load_store_masking.
13806 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
13807 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
13808 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
13809 (aarch64_gather_scale_operand_d): New predicates.
13810 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
13811 (mask_gather_load<mode>): New insns.
13812
13813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13814 Alan Hayward <alan.hayward@arm.com>
13815 David Sherwood <david.sherwood@arm.com>
13816
13817 * optabs.def (fold_left_plus_optab): New optab.
13818 * doc/md.texi (fold_left_plus_@var{m}): Document.
13819 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
13820 * internal-fn.c (fold_left_direct): Define.
13821 (expand_fold_left_optab_fn): Likewise.
13822 (direct_fold_left_optab_supported_p): Likewise.
13823 * fold-const-call.c (fold_const_fold_left): New function.
13824 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
13825 * tree-parloops.c (valid_reduction_p): New function.
13826 (gather_scalar_reductions): Use it.
13827 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
13828 (vect_finish_replace_stmt): Declare.
13829 * tree-vect-loop.c (fold_left_reduction_fn): New function.
13830 (needs_fold_left_reduction_p): New function, split out from...
13831 (vect_is_simple_reduction): ...here. Accept reductions that
13832 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
13833 (vect_force_simple_reduction): Also store the reduction type in
13834 the assignment's STMT_VINFO_REDUC_TYPE.
13835 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
13836 (merge_with_identity): New function.
13837 (vect_expand_fold_left): Likewise.
13838 (vectorize_fold_left_reduction): Likewise.
13839 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
13840 scalar phi in place for it. Check for target support and reject
13841 cases that would reassociate the operation. Defer the transform
13842 phase to vectorize_fold_left_reduction.
13843 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
13844 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
13845 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
13846
13847 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13848
13849 * tree-if-conv.c (predicate_mem_writes): Remove redundant
13850 call to ifc_temp_var.
13851
13852 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13853 Alan Hayward <alan.hayward@arm.com>
13854 David Sherwood <david.sherwood@arm.com>
13855
13856 * target.def (legitimize_address_displacement): Take the original
13857 offset as a poly_int.
13858 * targhooks.h (default_legitimize_address_displacement): Update
13859 accordingly.
13860 * targhooks.c (default_legitimize_address_displacement): Likewise.
13861 * doc/tm.texi: Regenerate.
13862 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
13863 as an argument, moving assert of ad->disp == ad->disp_term to...
13864 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
13865 Try calling targetm.legitimize_address_displacement before expanding
13866 the address rather than afterwards, and adjust for the new interface.
13867 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
13868 Match the new hook interface. Handle SVE addresses.
13869 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
13870 new hook interface.
13871
13872 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13873
13874 * Makefile.in (OBJS): Add early-remat.o.
13875 * target.def (select_early_remat_modes): New hook.
13876 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
13877 * doc/tm.texi: Regenerate.
13878 * targhooks.h (default_select_early_remat_modes): Declare.
13879 * targhooks.c (default_select_early_remat_modes): New function.
13880 * timevar.def (TV_EARLY_REMAT): New timevar.
13881 * passes.def (pass_early_remat): New pass.
13882 * tree-pass.h (make_pass_early_remat): Declare.
13883 * early-remat.c: New file.
13884 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
13885 function.
13886 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
13887
13888 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13889 Alan Hayward <alan.hayward@arm.com>
13890 David Sherwood <david.sherwood@arm.com>
13891
13892 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
13893 vfm1 with a bound_epilog parameter.
13894 (vect_do_peeling): Update calls accordingly, and move the prologue
13895 call earlier in the function. Treat the base bound_epilog as 0 for
13896 fully-masked loops and retain vf - 1 for other loops. Add 1 to
13897 this base when peeling for gaps.
13898 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
13899 with fully-masked loops.
13900 (vect_estimate_min_profitable_iters): Handle the single peeled
13901 iteration in that case.
13902
13903 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13904 Alan Hayward <alan.hayward@arm.com>
13905 David Sherwood <david.sherwood@arm.com>
13906
13907 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
13908 single-element interleaving even if the size is not a power of 2.
13909 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
13910 accesses for single-element interleaving if the group size is
13911 not a power of 2.
13912
13913 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13914 Alan Hayward <alan.hayward@arm.com>
13915 David Sherwood <david.sherwood@arm.com>
13916
13917 * doc/md.texi (fold_extract_last_@var{m}): Document.
13918 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
13919 * optabs.def (fold_extract_last_optab): New optab.
13920 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
13921 * internal-fn.c (fold_extract_direct): New macro.
13922 (expand_fold_extract_optab_fn): Likewise.
13923 (direct_fold_extract_optab_supported_p): Likewise.
13924 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
13925 * tree-vect-loop.c (vect_model_reduction_cost): Handle
13926 EXTRACT_LAST_REDUCTION.
13927 (get_initial_def_for_reduction): Do not create an initial vector
13928 for EXTRACT_LAST_REDUCTION reductions.
13929 (vectorizable_reduction): Leave the scalar phi in place for
13930 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
13931 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
13932 epilogue code for EXTRACT_LAST_REDUCTION and defer the
13933 transform phase to vectorizable_condition.
13934 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
13935 split out from...
13936 (vect_finish_stmt_generation): ...here.
13937 (vect_finish_replace_stmt): New function.
13938 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
13939 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
13940 pattern.
13941 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
13942
13943 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13944 Alan Hayward <alan.hayward@arm.com>
13945 David Sherwood <david.sherwood@arm.com>
13946
13947 * doc/md.texi (extract_last_@var{m}): Document.
13948 * optabs.def (extract_last_optab): New optab.
13949 * internal-fn.def (EXTRACT_LAST): New internal function.
13950 * internal-fn.c (cond_unary_direct): New macro.
13951 (expand_cond_unary_optab_fn): Likewise.
13952 (direct_cond_unary_optab_supported_p): Likewise.
13953 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
13954 loops using EXTRACT_LAST.
13955 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
13956 (extract_last_<mode>): ...this optab.
13957 (vec_extract<mode><Vel>): Update accordingly.
13958
13959 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13960 Alan Hayward <alan.hayward@arm.com>
13961 David Sherwood <david.sherwood@arm.com>
13962
13963 * target.def (empty_mask_is_expensive): New hook.
13964 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
13965 * doc/tm.texi: Regenerate.
13966 * targhooks.h (default_empty_mask_is_expensive): Declare.
13967 * targhooks.c (default_empty_mask_is_expensive): New function.
13968 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
13969 if the target says that empty masks are expensive.
13970 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
13971 New function.
13972 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
13973
13974 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
13975 Alan Hayward <alan.hayward@arm.com>
13976 David Sherwood <david.sherwood@arm.com>
13977
13978 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
13979 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
13980 (vect_use_loop_mask_for_alignment_p): New function.
13981 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
13982 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
13983 niters_skip argument. Make sure that the first niters_skip elements
13984 of the first iteration are inactive.
13985 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
13986 Update call to vect_set_loop_masks_directly.
13987 (get_misalign_in_elems): New function, split out from...
13988 (vect_gen_prolog_loop_niters): ...here.
13989 (vect_update_init_of_dr): Take a code argument that specifies whether
13990 the adjustment should be added or subtracted.
13991 (vect_update_init_of_drs): Likewise.
13992 (vect_prepare_for_masked_peels): New function.
13993 (vect_do_peeling): Skip prologue peeling if we're using a mask
13994 instead. Update call to vect_update_inits_of_drs.
13995 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13996 mask_skip_niters.
13997 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
13998 alignment. Do not include the number of peeled iterations in
13999 the minimum threshold in that case.
14000 (vectorizable_induction): Adjust the start value down by
14001 LOOP_VINFO_MASK_SKIP_NITERS iterations.
14002 (vect_transform_loop): Call vect_prepare_for_masked_peels.
14003 Take the number of skipped iterations into account when calculating
14004 the loop bounds.
14005 * tree-vect-stmts.c (vect_gen_while_not): New function.
14006
14007 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14008 Alan Hayward <alan.hayward@arm.com>
14009 David Sherwood <david.sherwood@arm.com>
14010
14011 * doc/sourcebuild.texi (vect_fully_masked): Document.
14012 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
14013 default value to 0.
14014 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
14015 split out from...
14016 (vect_analyze_loop_2): ...here. Don't check the vectorization
14017 factor against the number of loop iterations if the loop is
14018 fully-masked.
14019
14020 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14021 Alan Hayward <alan.hayward@arm.com>
14022 David Sherwood <david.sherwood@arm.com>
14023
14024 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
14025 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
14026 (dump_groups): Update accordingly.
14027 (iv_use::mem_type): New member variable.
14028 (address_p): New function.
14029 (record_use): Add a mem_type argument and initialize the new
14030 mem_type field.
14031 (record_group_use): Add a mem_type argument. Use address_p.
14032 Remove obsolete null checks of base_object. Update call to record_use.
14033 (find_interesting_uses_op): Update call to record_group_use.
14034 (find_interesting_uses_cond): Likewise.
14035 (find_interesting_uses_address): Likewise.
14036 (get_mem_type_for_internal_fn): New function.
14037 (find_address_like_use): Likewise.
14038 (find_interesting_uses_stmt): Try find_address_like_use before
14039 calling find_interesting_uses_op.
14040 (addr_offset_valid_p): Use the iv mem_type field as the type
14041 of the addressed memory.
14042 (add_autoinc_candidates): Likewise.
14043 (get_address_cost): Likewise.
14044 (split_small_address_groups_p): Use address_p.
14045 (split_address_groups): Likewise.
14046 (add_iv_candidate_for_use): Likewise.
14047 (autoinc_possible_for_pair): Likewise.
14048 (rewrite_groups): Likewise.
14049 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
14050 (determine_group_iv_cost): Update after split of USE_ADDRESS.
14051 (get_alias_ptr_type_for_ptr_address): New function.
14052 (rewrite_use_address): Rewrite address uses in calls that were
14053 identified by find_address_like_use.
14054
14055 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14056 Alan Hayward <alan.hayward@arm.com>
14057 David Sherwood <david.sherwood@arm.com>
14058
14059 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
14060 TARGET_MEM_REFs.
14061 * gimple-expr.h (is_gimple_addressable: Likewise.
14062 * gimple-expr.c (is_gimple_address): Likewise.
14063 * internal-fn.c (expand_call_mem_ref): New function.
14064 (expand_mask_load_optab_fn): Use it.
14065 (expand_mask_store_optab_fn): Likewise.
14066
14067 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14068 Alan Hayward <alan.hayward@arm.com>
14069 David Sherwood <david.sherwood@arm.com>
14070
14071 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
14072 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
14073 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
14074 (cond_umax@var{mode}): Document.
14075 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
14076 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
14077 (cond_umin_optab, cond_umax_optab): New optabs.
14078 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
14079 (COND_IOR, COND_XOR): New internal functions.
14080 * internal-fn.h (get_conditional_internal_fn): Declare.
14081 * internal-fn.c (cond_binary_direct): New macro.
14082 (expand_cond_binary_optab_fn): Likewise.
14083 (direct_cond_binary_optab_supported_p): Likewise.
14084 (get_conditional_internal_fn): New function.
14085 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
14086 Cope with reduction statements that are vectorized as calls rather
14087 than assignments.
14088 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
14089 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
14090 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
14091 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14092 (UNSPEC_COND_EOR): New unspecs.
14093 (optab): Add mappings for them.
14094 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
14095 (sve_int_op, sve_fp_op): New int attributes.
14096
14097 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14098 Alan Hayward <alan.hayward@arm.com>
14099 David Sherwood <david.sherwood@arm.com>
14100
14101 * optabs.def (while_ult_optab): New optab.
14102 * doc/md.texi (while_ult@var{m}@var{n}): Document.
14103 * internal-fn.def (WHILE_ULT): New internal function.
14104 * internal-fn.h (direct_internal_fn_supported_p): New override
14105 that takes two types as argument.
14106 * internal-fn.c (while_direct): New macro.
14107 (expand_while_optab_fn): New function.
14108 (convert_optab_supported_p): Likewise.
14109 (direct_while_optab_supported_p): New macro.
14110 * wide-int.h (wi::udiv_ceil): New function.
14111 * tree-vectorizer.h (rgroup_masks): New structure.
14112 (vec_loop_masks): New typedef.
14113 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
14114 and fully_masked_p.
14115 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
14116 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
14117 (vect_max_vf): New function.
14118 (slpeel_make_loop_iterate_ntimes): Delete.
14119 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
14120 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
14121 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
14122 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
14123 internal-fn.h, stor-layout.h and optabs-query.h.
14124 (vect_set_loop_mask): New function.
14125 (add_preheader_seq): Likewise.
14126 (add_header_seq): Likewise.
14127 (interleave_supported_p): Likewise.
14128 (vect_maybe_permute_loop_masks): Likewise.
14129 (vect_set_loop_masks_directly): Likewise.
14130 (vect_set_loop_condition_masked): Likewise.
14131 (vect_set_loop_condition_unmasked): New function, split out from
14132 slpeel_make_loop_iterate_ntimes.
14133 (slpeel_make_loop_iterate_ntimes): Rename to..
14134 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
14135 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
14136 (vect_do_peeling): Update call accordingly.
14137 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
14138 loops.
14139 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14140 mask_compare_type, can_fully_mask_p and fully_masked_p.
14141 (release_vec_loop_masks): New function.
14142 (_loop_vec_info): Use it to free the loop masks.
14143 (can_produce_all_loop_masks_p): New function.
14144 (vect_get_max_nscalars_per_iter): Likewise.
14145 (vect_verify_full_masking): Likewise.
14146 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
14147 retries, and free the mask rgroups before retrying. Check loop-wide
14148 reasons for disallowing fully-masked loops. Make the final decision
14149 about whether use a fully-masked loop or not.
14150 (vect_estimate_min_profitable_iters): Do not assume that peeling
14151 for the number of iterations will be needed for fully-masked loops.
14152 (vectorizable_reduction): Disable fully-masked loops.
14153 (vectorizable_live_operation): Likewise.
14154 (vect_halve_mask_nunits): New function.
14155 (vect_double_mask_nunits): Likewise.
14156 (vect_record_loop_mask): Likewise.
14157 (vect_get_loop_mask): Likewise.
14158 (vect_transform_loop): Handle the case in which the final loop
14159 iteration might handle a partial vector. Call vect_set_loop_condition
14160 instead of slpeel_make_loop_iterate_ntimes.
14161 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
14162 (check_load_store_masking): New function.
14163 (prepare_load_store_mask): Likewise.
14164 (vectorizable_store): Handle fully-masked loops.
14165 (vectorizable_load): Likewise.
14166 (supportable_widening_operation): Use vect_halve_mask_nunits for
14167 booleans.
14168 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
14169 (vect_gen_while): New function.
14170 * config/aarch64/aarch64.md (umax<mode>3): New expander.
14171 (aarch64_uqdec<mode>): New insn.
14172
14173 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14174 Alan Hayward <alan.hayward@arm.com>
14175 David Sherwood <david.sherwood@arm.com>
14176
14177 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
14178 (reduc_xor_scal_optab): New optabs.
14179 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
14180 (reduc_xor_scal_@var{m}): Document.
14181 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
14182 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
14183 internal functions.
14184 * fold-const-call.c (fold_const_call): Handle them.
14185 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
14186 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
14187 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
14188 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
14189 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
14190 (UNSPEC_XORV): New unspecs.
14191 (optab): Add entries for them.
14192 (BITWISEV): New int iterator.
14193 (bit_reduc_op): New int attributes.
14194
14195 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14196 Alan Hayward <alan.hayward@arm.com>
14197 David Sherwood <david.sherwood@arm.com>
14198
14199 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
14200 * internal-fn.def (VEC_SHL_INSERT): New internal function.
14201 * optabs.def (vec_shl_insert_optab): New optab.
14202 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
14203 (duplicate_and_interleave): Likewise.
14204 * tree-vect-loop.c: Include internal-fn.h.
14205 (neutral_op_for_slp_reduction): New function, split out from
14206 get_initial_defs_for_reduction.
14207 (get_initial_def_for_reduction): Handle option 2 for variable-length
14208 vectors by loading the neutral value into a vector and then shifting
14209 the initial value into element 0.
14210 (get_initial_defs_for_reduction): Replace the code argument with
14211 the neutral value calculated by neutral_op_for_slp_reduction.
14212 Use gimple_build_vector for constant-length vectors.
14213 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
14214 but the first group_size elements have a neutral value.
14215 Use duplicate_and_interleave otherwise.
14216 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
14217 Update call to get_initial_defs_for_reduction. Handle SLP
14218 reductions for variable-length vectors by creating one vector
14219 result for each scalar result, with the elements associated
14220 with other scalar results stubbed out with the neutral value.
14221 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
14222 Require IFN_VEC_SHL_INSERT for double reductions on
14223 variable-length vectors, or SLP reductions that have
14224 a neutral value. Require can_duplicate_and_interleave_p
14225 support for variable-length unchained SLP reductions if there
14226 is no neutral value, such as for MIN/MAX reductions. Also require
14227 the number of vector elements to be a multiple of the number of
14228 SLP statements when doing variable-length unchained SLP reductions.
14229 Update call to vect_create_epilog_for_reduction.
14230 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
14231 and remove initial values.
14232 (duplicate_and_interleave): Make public.
14233 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
14234 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
14235
14236 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14237 Alan Hayward <alan.hayward@arm.com>
14238 David Sherwood <david.sherwood@arm.com>
14239
14240 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
14241 (can_duplicate_and_interleave_p): New function.
14242 (vect_get_and_check_slp_defs): Take the vector of statements
14243 rather than just the current one. Remove excess parentheses.
14244 Restriction rejectinon of vect_constant_def and vect_external_def
14245 for variable-length vectors to boolean types, or types for which
14246 can_duplicate_and_interleave_p is false.
14247 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
14248 (duplicate_and_interleave): New function.
14249 (vect_get_constant_vectors): Use gimple_build_vector for
14250 constant-length vectors and suitable variable-length constant
14251 vectors. Use duplicate_and_interleave for other variable-length
14252 vectors. Don't defer the update when inserting new statements.
14253
14254 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14255 Alan Hayward <alan.hayward@arm.com>
14256 David Sherwood <david.sherwood@arm.com>
14257
14258 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
14259 min_profitable_iters doesn't go negative.
14260
14261 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14262 Alan Hayward <alan.hayward@arm.com>
14263 David Sherwood <david.sherwood@arm.com>
14264
14265 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
14266 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
14267 * optabs.def (vec_mask_load_lanes_optab): New optab.
14268 (vec_mask_store_lanes_optab): Likewise.
14269 * internal-fn.def (MASK_LOAD_LANES): New internal function.
14270 (MASK_STORE_LANES): Likewise.
14271 * internal-fn.c (mask_load_lanes_direct): New macro.
14272 (mask_store_lanes_direct): Likewise.
14273 (expand_mask_load_optab_fn): Handle masked operations.
14274 (expand_mask_load_lanes_optab_fn): New macro.
14275 (expand_mask_store_optab_fn): Handle masked operations.
14276 (expand_mask_store_lanes_optab_fn): New macro.
14277 (direct_mask_load_lanes_optab_supported_p): Likewise.
14278 (direct_mask_store_lanes_optab_supported_p): Likewise.
14279 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
14280 parameter.
14281 (vect_load_lanes_supported): Likewise.
14282 * tree-vect-data-refs.c (strip_conversion): New function.
14283 (can_group_stmts_p): Likewise.
14284 (vect_analyze_data_ref_accesses): Use it instead of checking
14285 for a pair of assignments.
14286 (vect_store_lanes_supported): Take a masked_p parameter.
14287 (vect_load_lanes_supported): Likewise.
14288 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
14289 vect_store_lanes_supported and vect_load_lanes_supported.
14290 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14291 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
14292 parameter. Don't allow gaps for masked accesses.
14293 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
14294 and vect_load_lanes_supported.
14295 (get_load_store_type): Take a masked_p parameter and update
14296 call to get_group_load_store_type.
14297 (vectorizable_store): Update call to get_load_store_type.
14298 Handle IFN_MASK_STORE_LANES.
14299 (vectorizable_load): Update call to get_load_store_type.
14300 Handle IFN_MASK_LOAD_LANES.
14301
14302 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14303 Alan Hayward <alan.hayward@arm.com>
14304 David Sherwood <david.sherwood@arm.com>
14305
14306 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
14307 modes for SVE.
14308 * config/aarch64/aarch64-protos.h
14309 (aarch64_sve_struct_memory_operand_p): Declare.
14310 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
14311 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
14312 (VPRED, vpred): Handle SVE structure modes.
14313 * config/aarch64/constraints.md (Utx): New constraint.
14314 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
14315 (aarch64_sve_struct_nonimmediate_operand): New predicates.
14316 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
14317 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
14318 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
14319 structure modes. Split into pieces after RA.
14320 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
14321 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
14322 New patterns.
14323 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
14324 SVE structure modes.
14325 (aarch64_classify_address): Likewise.
14326 (sizetochar): Move earlier in file.
14327 (aarch64_print_operand): Handle SVE register lists.
14328 (aarch64_array_mode): New function.
14329 (aarch64_sve_struct_memory_operand_p): Likewise.
14330 (TARGET_ARRAY_MODE): Redefine.
14331
14332 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14333 Alan Hayward <alan.hayward@arm.com>
14334 David Sherwood <david.sherwood@arm.com>
14335
14336 * target.def (array_mode): New target hook.
14337 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
14338 * doc/tm.texi: Regenerate.
14339 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
14340 * hooks.c (hook_optmode_mode_uhwi_none): New function.
14341 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
14342 targetm.array_mode.
14343 * stor-layout.c (mode_for_array): Likewise. Support polynomial
14344 type sizes.
14345
14346 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14347 Alan Hayward <alan.hayward@arm.com>
14348 David Sherwood <david.sherwood@arm.com>
14349
14350 * fold-const.c (fold_binary_loc): Check the argument types
14351 rather than the result type when testing for a vector operation.
14352
14353 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14354
14355 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
14356 * doc/tm.texi: Regenerate.
14357
14358 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14359 Alan Hayward <alan.hayward@arm.com>
14360 David Sherwood <david.sherwood@arm.com>
14361
14362 * doc/invoke.texi (-msve-vector-bits=): Document new option.
14363 (sve): Document new AArch64 extension.
14364 * doc/md.texi (w): Extend the description of the AArch64
14365 constraint to include SVE vectors.
14366 (Upl, Upa): Document new AArch64 predicate constraints.
14367 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
14368 enum.
14369 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
14370 (msve-vector-bits=): New option.
14371 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
14372 SVE when these are disabled.
14373 (sve): New extension.
14374 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
14375 modes. Adjust their number of units based on aarch64_sve_vg.
14376 (MAX_BITSIZE_MODE_ANY_MODE): Define.
14377 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
14378 aarch64_addr_query_type.
14379 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
14380 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
14381 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
14382 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
14383 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
14384 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
14385 (aarch64_simd_imm_zero_p): Delete.
14386 (aarch64_check_zero_based_sve_index_immediate): Declare.
14387 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14388 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14389 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14390 (aarch64_sve_float_mul_immediate_p): Likewise.
14391 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14392 rather than an rtx.
14393 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
14394 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
14395 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
14396 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
14397 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
14398 (aarch64_regmode_natural_size): Likewise.
14399 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
14400 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
14401 left one place.
14402 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
14403 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
14404 for VG and the SVE predicate registers.
14405 (V_ALIASES): Add a "z"-prefixed alias.
14406 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
14407 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
14408 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
14409 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
14410 (REG_CLASS_NAMES): Add entries for them.
14411 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
14412 and the predicate registers.
14413 (aarch64_sve_vg): Declare.
14414 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
14415 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
14416 (REGMODE_NATURAL_SIZE): Define.
14417 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14418 SVE macros.
14419 * config/aarch64/aarch64.c: Include cfgrtl.h.
14420 (simd_immediate_info): Add a constructor for series vectors,
14421 and an associated step field.
14422 (aarch64_sve_vg): New variable.
14423 (aarch64_dbx_register_number): Handle VG and the predicate registers.
14424 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
14425 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
14426 (VEC_ANY_DATA, VEC_STRUCT): New constants.
14427 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
14428 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
14429 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
14430 (aarch64_get_mask_mode): New functions.
14431 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
14432 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
14433 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
14434 predicate modes and predicate registers. Explicitly restrict
14435 GPRs to modes of 16 bytes or smaller. Only allow FP registers
14436 to store a vector mode if it is recognized by
14437 aarch64_classify_vector_mode.
14438 (aarch64_regmode_natural_size): New function.
14439 (aarch64_hard_regno_caller_save_mode): Return the original mode
14440 for predicates.
14441 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
14442 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
14443 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
14444 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
14445 functions.
14446 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
14447 does not overlap dest if the function is frame-related. Handle
14448 SVE constants.
14449 (aarch64_split_add_offset): New function.
14450 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
14451 them aarch64_add_offset.
14452 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
14453 and update call to aarch64_sub_sp.
14454 (aarch64_add_cfa_expression): New function.
14455 (aarch64_expand_prologue): Pass extra temporary registers to the
14456 functions above. Handle the case in which we need to emit new
14457 DW_CFA_expressions for registers that were originally saved
14458 relative to the stack pointer, but now have to be expressed
14459 relative to the frame pointer.
14460 (aarch64_output_mi_thunk): Pass extra temporary registers to the
14461 functions above.
14462 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
14463 IP0 and IP1 values for SVE frames.
14464 (aarch64_expand_vec_series): New function.
14465 (aarch64_expand_sve_widened_duplicate): Likewise.
14466 (aarch64_expand_sve_const_vector): Likewise.
14467 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
14468 Handle SVE constants. Use emit_move_insn to move a force_const_mem
14469 into the register, rather than emitting a SET directly.
14470 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
14471 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
14472 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
14473 (offset_9bit_signed_scaled_p): New functions.
14474 (aarch64_replicate_bitmask_imm): New function.
14475 (aarch64_bitmask_imm): Use it.
14476 (aarch64_cannot_force_const_mem): Reject expressions involving
14477 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
14478 (aarch64_classify_index): Handle SVE indices, by requiring
14479 a plain register index with a scale that matches the element size.
14480 (aarch64_classify_address): Handle SVE addresses. Assert that
14481 the mode of the address is VOIDmode or an integer mode.
14482 Update call to aarch64_classify_symbol.
14483 (aarch64_classify_symbolic_expression): Update call to
14484 aarch64_classify_symbol.
14485 (aarch64_const_vec_all_in_range_p): New function.
14486 (aarch64_print_vector_float_operand): Likewise.
14487 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
14488 "vN" for FP registers with SVE modes. Handle (const ...) vectors
14489 and the FP immediates 1.0 and 0.5.
14490 (aarch64_print_address_internal): Handle SVE addresses.
14491 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
14492 (aarch64_regno_regclass): Handle predicate registers.
14493 (aarch64_secondary_reload): Handle big-endian reloads of SVE
14494 data modes.
14495 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
14496 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
14497 (aarch64_convert_sve_vector_bits): New function.
14498 (aarch64_override_options): Use it to handle -msve-vector-bits=.
14499 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14500 rather than an rtx.
14501 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
14502 Handle SVE vector and predicate modes. Accept VL-based constants
14503 that need only one temporary register, and VL offsets that require
14504 no temporary registers.
14505 (aarch64_conditional_register_usage): Mark the predicate registers
14506 as fixed if SVE isn't available.
14507 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
14508 Return true for SVE vector and predicate modes.
14509 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
14510 rather than an unsigned int. Handle SVE modes.
14511 (aarch64_preferred_simd_mode): Update call accordingly. Handle
14512 SVE modes.
14513 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
14514 if SVE is enabled.
14515 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14516 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14517 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14518 (aarch64_sve_float_mul_immediate_p): New functions.
14519 (aarch64_sve_valid_immediate): New function.
14520 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
14521 Explicitly reject structure modes. Check for INDEX constants.
14522 Handle PTRUE and PFALSE constants.
14523 (aarch64_check_zero_based_sve_index_immediate): New function.
14524 (aarch64_simd_imm_zero_p): Delete.
14525 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
14526 vector modes. Accept constants in the range of CNT[BHWD].
14527 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
14528 ask for an Advanced SIMD mode.
14529 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
14530 (aarch64_simd_vector_alignment): Handle SVE predicates.
14531 (aarch64_vectorize_preferred_vector_alignment): New function.
14532 (aarch64_simd_vector_alignment_reachable): Use it instead of
14533 the vector size.
14534 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
14535 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
14536 functions.
14537 (MAX_VECT_LEN): Delete.
14538 (expand_vec_perm_d): Add a vec_flags field.
14539 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
14540 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
14541 (aarch64_evpc_ext): Don't apply a big-endian lane correction
14542 for SVE modes.
14543 (aarch64_evpc_rev): Rename to...
14544 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
14545 (aarch64_evpc_rev_global): New function.
14546 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
14547 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
14548 MAX_VECT_LEN.
14549 (aarch64_evpc_sve_tbl): New function.
14550 (aarch64_expand_vec_perm_const_1): Update after rename of
14551 aarch64_evpc_rev. Handle SVE permutes too, trying
14552 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
14553 than aarch64_evpc_tbl.
14554 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
14555 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
14556 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
14557 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
14558 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
14559 (aarch64_expand_sve_vcond): New functions.
14560 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
14561 of aarch64_vector_mode_p.
14562 (aarch64_dwarf_poly_indeterminate_value): New function.
14563 (aarch64_compute_pressure_classes): Likewise.
14564 (aarch64_can_change_mode_class): Likewise.
14565 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
14566 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
14567 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
14568 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
14569 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
14570 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
14571 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
14572 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
14573 constraints.
14574 (Dn, Dl, Dr): Accept const as well as const_vector.
14575 (Dz): Likewise. Compare against CONST0_RTX.
14576 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
14577 of "vector" where appropriate.
14578 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
14579 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
14580 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
14581 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
14582 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
14583 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
14584 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
14585 (v_int_equiv): Extend to SVE modes.
14586 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
14587 mode attributes.
14588 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
14589 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
14590 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
14591 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
14592 (SVE_COND_FP_CMP): New int iterators.
14593 (perm_hilo): Handle the new unpack unspecs.
14594 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
14595 attributes.
14596 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
14597 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
14598 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
14599 (aarch64_equality_operator, aarch64_constant_vector_operand)
14600 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
14601 (aarch64_sve_nonimmediate_operand): Likewise.
14602 (aarch64_sve_general_operand): Likewise.
14603 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
14604 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
14605 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
14606 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
14607 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
14608 (aarch64_sve_float_arith_immediate): Likewise.
14609 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
14610 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
14611 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
14612 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
14613 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
14614 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
14615 (aarch64_sve_float_arith_operand): Likewise.
14616 (aarch64_sve_float_arith_with_sub_operand): Likewise.
14617 (aarch64_sve_float_mul_operand): Likewise.
14618 (aarch64_sve_vec_perm_operand): Likewise.
14619 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
14620 (aarch64_mov_operand): Accept const_poly_int and const_vector.
14621 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
14622 as well as const_vector.
14623 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
14624 in file. Use CONST0_RTX and CONSTM1_RTX.
14625 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
14626 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
14627 Use aarch64_simd_imm_zero.
14628 * config/aarch64/aarch64-sve.md: New file.
14629 * config/aarch64/aarch64.md: Include it.
14630 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
14631 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
14632 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
14633 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
14634 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
14635 (sve): New attribute.
14636 (enabled): Disable instructions with the sve attribute unless
14637 TARGET_SVE.
14638 (movqi, movhi): Pass CONST_POLY_INT operaneds through
14639 aarch64_expand_mov_immediate.
14640 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
14641 CNT[BHSD] immediates.
14642 (movti): Split CONST_POLY_INT moves into two halves.
14643 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
14644 Split additions that need a temporary here if the destination
14645 is the stack pointer.
14646 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
14647 (*add<mode>3_poly_1): New instruction.
14648 (set_clobber_cc): New expander.
14649
14650 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14651
14652 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
14653 parameter and use it instead of GET_MODE_SIZE (innermode). Use
14654 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
14655 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
14656 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
14657 Change innermode from fixed_mode_size to machine_mode.
14658 (simplify_subreg): Update call accordingly. Handle a constant-sized
14659 subreg of a variable-length CONST_VECTOR.
14660
14661 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14662 Alan Hayward <alan.hayward@arm.com>
14663 David Sherwood <david.sherwood@arm.com>
14664
14665 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
14666 (add_offset_to_base): New function, split out from...
14667 (create_mem_ref): ...here. When handling a scale other than 1,
14668 check first whether the address is valid without the offset.
14669 Add it into the base if so, leaving the index and scale as-is.
14670
14671 2018-01-12 Jakub Jelinek <jakub@redhat.com>
14672
14673 PR c++/83778
14674 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
14675 fold_for_warn before checking if arg2 is INTEGER_CST.
14676
14677 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
14678
14679 * config/rs6000/predicates.md (load_multiple_operation): Delete.
14680 (store_multiple_operation): Delete.
14681 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
14682 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
14683 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
14684 guarded by TARGET_STRING.
14685 (rs6000_output_load_multiple): Delete.
14686 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
14687 OPTION_MASK_STRING / TARGET_STRING handling.
14688 (print_operand) <'N', 'O'>: Add comment that these are unused now.
14689 (const rs6000_opt_masks) <"string">: Change mask to 0.
14690 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
14691 (MASK_STRING): Delete.
14692 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
14693 parts. Simplify.
14694 (load_multiple): Delete.
14695 (*ldmsi8): Delete.
14696 (*ldmsi7): Delete.
14697 (*ldmsi6): Delete.
14698 (*ldmsi5): Delete.
14699 (*ldmsi4): Delete.
14700 (*ldmsi3): Delete.
14701 (store_multiple): Delete.
14702 (*stmsi8): Delete.
14703 (*stmsi7): Delete.
14704 (*stmsi6): Delete.
14705 (*stmsi5): Delete.
14706 (*stmsi4): Delete.
14707 (*stmsi3): Delete.
14708 (movmemsi_8reg): Delete.
14709 (corresponding unnamed define_insn): Delete.
14710 (movmemsi_6reg): Delete.
14711 (corresponding unnamed define_insn): Delete.
14712 (movmemsi_4reg): Delete.
14713 (corresponding unnamed define_insn): Delete.
14714 (movmemsi_2reg): Delete.
14715 (corresponding unnamed define_insn): Delete.
14716 (movmemsi_1reg): Delete.
14717 (corresponding unnamed define_insn): Delete.
14718 * config/rs6000/rs6000.opt (mno-string): New.
14719 (mstring): Replace by deprecation warning stub.
14720 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
14721
14722 2018-01-12 Jakub Jelinek <jakub@redhat.com>
14723
14724 * regrename.c (regrename_do_replace): If replacing the same
14725 reg multiple times, try to reuse last created gen_raw_REG.
14726
14727 PR debug/81155
14728 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
14729 main to workaround a bug in GDB.
14730
14731 2018-01-12 Tom de Vries <tom@codesourcery.com>
14732
14733 PR target/83737
14734 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
14735
14736 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
14737
14738 PR rtl-optimization/80481
14739 * ira-color.c (get_cap_member): New function.
14740 (allocnos_conflict_by_live_ranges_p): Use it.
14741 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
14742 (setup_slot_coalesced_allocno_live_ranges): Ditto.
14743
14744 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
14745
14746 PR target/83628
14747 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
14748 (*saddl_se_1): Ditto.
14749 (*ssubsi_1): Ditto.
14750 (*ssubl_se_1): Ditto.
14751
14752 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
14753
14754 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
14755 rather than wi::to_widest for DR_INITs.
14756 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
14757 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
14758 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
14759 INTEGER_CSTs.
14760 (vect_analyze_group_access_1): Note that here.
14761
14762 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
14763
14764 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
14765 polynomial type sizes.
14766
14767 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
14768
14769 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
14770 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
14771 (gimple_add_tmp_var): Likewise.
14772
14773 2018-01-12 Martin Liska <mliska@suse.cz>
14774
14775 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
14776 (gimple_alloc_sizes): Likewise.
14777 (dump_gimple_statistics): Use PRIu64 in printf format.
14778 * gimple.h: Change uint64_t to int.
14779
14780 2018-01-12 Martin Liska <mliska@suse.cz>
14781
14782 * tree-core.h: Use uint64_t instead of int.
14783 * tree.c (tree_node_counts): Likewise.
14784 (tree_node_sizes): Likewise.
14785 (dump_tree_statistics): Use PRIu64 in printf format.
14786
14787 2018-01-12 Martin Liska <mliska@suse.cz>
14788
14789 * Makefile.in: As qsort_chk is implemented in vec.c, add
14790 vec.o to linkage of gencfn-macros.
14791 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
14792 passing the info to record_node_allocation_statistics.
14793 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
14794 and pass the info.
14795 * ggc-common.c (struct ggc_usage): Add operator== and use
14796 it in operator< and compare function.
14797 * mem-stats.h (struct mem_usage): Likewise.
14798 * vec.c (struct vec_usage): Remove operator< and compare
14799 function. Can be simply inherited.
14800
14801 2018-01-12 Martin Jambor <mjambor@suse.cz>
14802
14803 PR target/81616
14804 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
14805 * tree-ssa-math-opts.c: Include domwalk.h.
14806 (convert_mult_to_fma_1): New function.
14807 (fma_transformation_info): New type.
14808 (fma_deferring_state): Likewise.
14809 (cancel_fma_deferring): New function.
14810 (result_of_phi): Likewise.
14811 (last_fma_candidate_feeds_initial_phi): Likewise.
14812 (convert_mult_to_fma): Added deferring logic, split actual
14813 transformation to convert_mult_to_fma_1.
14814 (math_opts_dom_walker): New type.
14815 (math_opts_dom_walker::after_dom_children): New method, body moved
14816 here from pass_optimize_widening_mul::execute, added deferring logic
14817 bits.
14818 (pass_optimize_widening_mul::execute): Moved most of code to
14819 math_opts_dom_walker::after_dom_children.
14820 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
14821 * config/i386/i386.c (ix86_option_override_internal): Added
14822 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
14823
14824 2018-01-12 Richard Biener <rguenther@suse.de>
14825
14826 PR debug/83157
14827 * dwarf2out.c (gen_variable_die): Do not reset old_die for
14828 inline instance vars.
14829
14830 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
14831
14832 PR target/81819
14833 * config/rx/rx.c (rx_is_restricted_memory_address):
14834 Handle SUBREG case.
14835
14836 2018-01-12 Richard Biener <rguenther@suse.de>
14837
14838 PR tree-optimization/80846
14839 * target.def (split_reduction): New target hook.
14840 * targhooks.c (default_split_reduction): New function.
14841 * targhooks.h (default_split_reduction): Declare.
14842 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
14843 target requests first reduce vectors by combining low and high
14844 parts.
14845 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
14846 (get_vectype_for_scalar_type_and_size): Export.
14847 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
14848 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
14849 * doc/tm.texi: Regenerate.
14850 * config/i386/i386.c (ix86_split_reduction): Implement
14851 TARGET_VECTORIZE_SPLIT_REDUCTION.
14852
14853 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14854
14855 PR target/83368
14856 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
14857 in PIC mode except for TARGET_VXWORKS_RTP.
14858 * config/sparc/sparc.c: Include cfgrtl.h.
14859 (TARGET_INIT_PIC_REG): Define.
14860 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
14861 (sparc_pic_register_p): New predicate.
14862 (sparc_legitimate_address_p): Use it.
14863 (sparc_legitimize_pic_address): Likewise.
14864 (sparc_delegitimize_address): Likewise.
14865 (sparc_mode_dependent_address_p): Likewise.
14866 (gen_load_pcrel_sym): Remove 4th parameter.
14867 (load_got_register): Adjust call to above. Remove obsolete stuff.
14868 (sparc_expand_prologue): Do not call load_got_register here.
14869 (sparc_flat_expand_prologue): Likewise.
14870 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
14871 (sparc_use_pseudo_pic_reg): New function.
14872 (sparc_init_pic_reg): Likewise.
14873 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14874 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
14875
14876 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
14877
14878 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
14879 Add item for branch_cost.
14880
14881 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14882
14883 PR rtl-optimization/83565
14884 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
14885 not extend the result to a larger mode for rotate operations.
14886 (num_sign_bit_copies1): Likewise.
14887
14888 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14889
14890 PR target/40411
14891 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
14892 -symbolic.
14893 Use values-Xc.o for -pedantic.
14894 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
14895
14896 2018-01-12 Martin Liska <mliska@suse.cz>
14897
14898 PR ipa/83054
14899 * ipa-devirt.c (final_warning_record::grow_type_warnings):
14900 New function.
14901 (possible_polymorphic_call_targets): Use it.
14902 (ipa_devirt): Likewise.
14903
14904 2018-01-12 Martin Liska <mliska@suse.cz>
14905
14906 * profile-count.h (enum profile_quality): Use 0 as invalid
14907 enum value of profile_quality.
14908
14909 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
14910
14911 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
14912 -mext-string options.
14913
14914 2018-01-12 Richard Biener <rguenther@suse.de>
14915
14916 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
14917 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
14918 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
14919 Likewise.
14920 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
14921
14922 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
14923
14924 * configure.ac (--with-long-double-format): Add support for the
14925 configuration option to change the default long double format on
14926 PowerPC systems.
14927 * config.gcc (powerpc*-linux*-*): Likewise.
14928 * configure: Regenerate.
14929 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
14930 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
14931 used without modification.
14932
14933 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14934
14935 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
14936 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
14937 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
14938 MISC_BUILTIN_SPEC_BARRIER.
14939 (rs6000_init_builtins): Likewise.
14940 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
14941 enum value.
14942 (speculation_barrier): New define_insn.
14943 * doc/extend.texi: Document __builtin_speculation_barrier.
14944
14945 2018-01-11 Jakub Jelinek <jakub@redhat.com>
14946
14947 PR target/83203
14948 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
14949 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
14950 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
14951 iterators.
14952 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
14953 integral modes instead of "ss" and "sd".
14954 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
14955 vectors with 32-bit and 64-bit elements.
14956 (vecdupssescalarmodesuffix): New mode attribute.
14957 (vec_dup<mode>): Use it.
14958
14959 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
14960
14961 PR target/83330
14962 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
14963 frame if argument is passed on stack.
14964
14965 2018-01-11 Jakub Jelinek <jakub@redhat.com>
14966
14967 PR target/82682
14968 * ree.c (combine_reaching_defs): Optimize also
14969 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
14970 reg2=any_extend(exp); reg1=reg2;, formatting fix.
14971
14972 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
14973
14974 PR middle-end/83189
14975 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
14976
14977 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
14978
14979 PR middle-end/83718
14980 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
14981 after they are computed.
14982
14983 2018-01-11 Bin Cheng <bin.cheng@arm.com>
14984
14985 PR tree-optimization/83695
14986 * gimple-loop-linterchange.cc
14987 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
14988 reset cached scev information after interchange.
14989 (pass_linterchange::execute): Remove call to scev_reset_htab.
14990
14991 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14992
14993 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
14994 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
14995 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
14996 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
14997 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
14998 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
14999 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
15000 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
15001 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
15002 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
15003 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
15004 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
15005 (V_lane_reg): Likewise.
15006 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
15007 New define_expand.
15008 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
15009 (vfmal_lane_low<mode>_intrinsic,
15010 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
15011 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
15012 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
15013 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
15014 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
15015 vfmsl_lane_high<mode>_intrinsic): New define_insns.
15016
15017 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15018
15019 * config/arm/arm-cpus.in (fp16fml): New feature.
15020 (ALL_SIMD): Add fp16fml.
15021 (armv8.2-a): Add fp16fml as an option.
15022 (armv8.3-a): Likewise.
15023 (armv8.4-a): Add fp16fml as part of fp16.
15024 * config/arm/arm.h (TARGET_FP16FML): Define.
15025 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
15026 when appropriate.
15027 * config/arm/arm-modes.def (V2HF): Define.
15028 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
15029 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
15030 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
15031 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
15032 vfmsl_low, vfmsl_high): New set of builtins.
15033 * config/arm/iterators.md (PLUSMINUS): New code iterator.
15034 (vfml_op): New code attribute.
15035 (VFMLHALVES): New int iterator.
15036 (VFML, VFMLSEL): New mode attributes.
15037 (V_reg): Define mapping for V2HF.
15038 (V_hi, V_lo): New mode attributes.
15039 (VF_constraint): Likewise.
15040 (vfml_half, vfml_half_selector): New int attributes.
15041 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
15042 define_expand.
15043 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
15044 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
15045 New define_insn.
15046 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
15047 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
15048 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
15049 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
15050 documentation.
15051 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
15052 Document new effective target and option set.
15053
15054 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15055
15056 * config/arm/arm-cpus.in (armv8_4): New feature.
15057 (ARMv8_4a): New fgroup.
15058 (armv8.4-a): New arch.
15059 * config/arm/arm-tables.opt: Regenerate.
15060 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
15061 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
15062 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
15063 Add matching rules for -march=armv8.4-a and extensions.
15064 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
15065
15066 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
15067
15068 PR target/81821
15069 * config/rx/rx.md (BW): New mode attribute.
15070 (sync_lock_test_and_setsi): Add mode suffix to insn output.
15071
15072 2018-01-11 Richard Biener <rguenther@suse.de>
15073
15074 PR tree-optimization/83435
15075 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
15076 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
15077 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
15078
15079 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15080 Alan Hayward <alan.hayward@arm.com>
15081 David Sherwood <david.sherwood@arm.com>
15082
15083 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
15084 field.
15085 (aarch64_classify_address): Initialize it. Track polynomial offsets.
15086 (aarch64_print_address_internal): Use it to check for a zero offset.
15087
15088 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15089 Alan Hayward <alan.hayward@arm.com>
15090 David Sherwood <david.sherwood@arm.com>
15091
15092 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
15093 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
15094 Return a poly_int64 rather than a HOST_WIDE_INT.
15095 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
15096 rather than a HOST_WIDE_INT.
15097 * config/aarch64/aarch64.h (aarch64_frame): Protect with
15098 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
15099 hard_fp_offset, frame_size, initial_adjust, callee_offset and
15100 final_offset from HOST_WIDE_INT to poly_int64.
15101 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
15102 to_constant when getting the number of units in an Advanced SIMD
15103 mode.
15104 (aarch64_builtin_vectorized_function): Check for a constant number
15105 of units.
15106 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
15107 GET_MODE_SIZE.
15108 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
15109 attribute instead of GET_MODE_NUNITS.
15110 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
15111 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
15112 GET_MODE_SIZE for fixed-size registers.
15113 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
15114 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
15115 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
15116 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
15117 (aarch64_print_operand, aarch64_print_address_internal)
15118 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
15119 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
15120 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
15121 Handle polynomial GET_MODE_SIZE.
15122 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
15123 wider than SImode without modification.
15124 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
15125 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
15126 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
15127 passing and returning SVE modes.
15128 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
15129 rather than GEN_INT.
15130 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
15131 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
15132 (aarch64_allocate_and_probe_stack_space): Likewise.
15133 (aarch64_layout_frame): Cope with polynomial offsets.
15134 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
15135 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
15136 polynomial offsets.
15137 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
15138 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
15139 poly_int64 rather than a HOST_WIDE_INT.
15140 (aarch64_get_separate_components, aarch64_process_components)
15141 (aarch64_expand_prologue, aarch64_expand_epilogue)
15142 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
15143 (aarch64_anchor_offset): New function, split out from...
15144 (aarch64_legitimize_address): ...here.
15145 (aarch64_builtin_vectorization_cost): Handle polynomial
15146 TYPE_VECTOR_SUBPARTS.
15147 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
15148 GET_MODE_NUNITS.
15149 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
15150 number of elements from the PARALLEL rather than the mode.
15151 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
15152 rather than GET_MODE_BITSIZE.
15153 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
15154 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
15155 (aarch64_expand_vec_perm_const_1): Handle polynomial
15156 d->perm.length () and d->perm elements.
15157 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
15158 Apply to_constant to d->perm elements.
15159 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
15160 polynomial CONST_VECTOR_NUNITS.
15161 (aarch64_move_pointer): Take amount as a poly_int64 rather
15162 than an int.
15163 (aarch64_progress_pointer): Avoid temporary variable.
15164 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
15165 the mode attribute instead of GET_MODE.
15166
15167 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15168 Alan Hayward <alan.hayward@arm.com>
15169 David Sherwood <david.sherwood@arm.com>
15170
15171 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
15172 x exists before using it.
15173 (aarch64_add_constant_internal): Rename to...
15174 (aarch64_add_offset_1): ...this. Replace regnum with separate
15175 src and dest rtxes. Handle the case in which they're different,
15176 including when the offset is zero. Replace scratchreg with an rtx.
15177 Use 2 additions if there is no spare register into which we can
15178 move a 16-bit constant.
15179 (aarch64_add_constant): Delete.
15180 (aarch64_add_offset): Replace reg with separate src and dest
15181 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
15182 Use aarch64_add_offset_1.
15183 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
15184 an rtx rather than an int. Take the delta as a poly_int64
15185 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
15186 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
15187 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
15188 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
15189 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
15190 and aarch64_add_sp.
15191 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
15192 aarch64_add_constant.
15193
15194 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15195
15196 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15197 Use scalar_float_mode.
15198
15199 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15200
15201 * config/aarch64/aarch64-simd.md
15202 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
15203 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
15204 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
15205 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
15206 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
15207 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
15208 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
15209 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
15210 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
15211 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
15212
15213 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15214
15215 PR target/83514
15216 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
15217 targ_options->x_arm_arch_string is non NULL.
15218
15219 2018-01-11 Tamar Christina <tamar.christina@arm.com>
15220
15221 * config/aarch64/aarch64.h
15222 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
15223
15224 2018-01-11 Sudakshina Das <sudi.das@arm.com>
15225
15226 PR target/82096
15227 * expmed.c (emit_store_flag_force): Swap if const op0
15228 and change VOIDmode to mode of op0.
15229
15230 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15231
15232 PR rtl-optimization/83761
15233 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
15234 than bytes to mode_for_size.
15235
15236 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
15237
15238 PR middle-end/83189
15239 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
15240 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
15241 profile.
15242
15243 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
15244
15245 PR middle-end/83575
15246 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
15247 when in layout mode.
15248 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
15249 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
15250 partition fixup.
15251
15252 2018-01-10 Michael Collison <michael.collison@arm.com>
15253
15254 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
15255 * config/aarch64/aarch64-option-extension.def: Add
15256 AARCH64_OPT_EXTENSION of 'fp16fml'.
15257 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15258 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
15259 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
15260 * config/aarch64/constraints.md (Ui7): New constraint.
15261 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
15262 (VFMLA_SEL_W): Ditto.
15263 (f16quad): Ditto.
15264 (f16mac1): Ditto.
15265 (VFMLA16_LOW): New int iterator.
15266 (VFMLA16_HIGH): Ditto.
15267 (UNSPEC_FMLAL): New unspec.
15268 (UNSPEC_FMLSL): Ditto.
15269 (UNSPEC_FMLAL2): Ditto.
15270 (UNSPEC_FMLSL2): Ditto.
15271 (f16mac): New code attribute.
15272 * config/aarch64/aarch64-simd-builtins.def
15273 (aarch64_fmlal_lowv2sf): Ditto.
15274 (aarch64_fmlsl_lowv2sf): Ditto.
15275 (aarch64_fmlalq_lowv4sf): Ditto.
15276 (aarch64_fmlslq_lowv4sf): Ditto.
15277 (aarch64_fmlal_highv2sf): Ditto.
15278 (aarch64_fmlsl_highv2sf): Ditto.
15279 (aarch64_fmlalq_highv4sf): Ditto.
15280 (aarch64_fmlslq_highv4sf): Ditto.
15281 (aarch64_fmlal_lane_lowv2sf): Ditto.
15282 (aarch64_fmlsl_lane_lowv2sf): Ditto.
15283 (aarch64_fmlal_laneq_lowv2sf): Ditto.
15284 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
15285 (aarch64_fmlalq_lane_lowv4sf): Ditto.
15286 (aarch64_fmlsl_lane_lowv4sf): Ditto.
15287 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
15288 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
15289 (aarch64_fmlal_lane_highv2sf): Ditto.
15290 (aarch64_fmlsl_lane_highv2sf): Ditto.
15291 (aarch64_fmlal_laneq_highv2sf): Ditto.
15292 (aarch64_fmlsl_laneq_highv2sf): Ditto.
15293 (aarch64_fmlalq_lane_highv4sf): Ditto.
15294 (aarch64_fmlsl_lane_highv4sf): Ditto.
15295 (aarch64_fmlalq_laneq_highv4sf): Ditto.
15296 (aarch64_fmlsl_laneq_highv4sf): Ditto.
15297 * config/aarch64/aarch64-simd.md:
15298 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
15299 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15300 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
15301 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15302 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
15303 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
15304 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
15305 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
15306 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
15307 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
15308 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
15309 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
15310 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
15311 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
15312 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
15313 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
15314 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
15315 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
15316 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
15317 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
15318 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
15319 (vfmlsl_low_u32): Ditto.
15320 (vfmlalq_low_u32): Ditto.
15321 (vfmlslq_low_u32): Ditto.
15322 (vfmlal_high_u32): Ditto.
15323 (vfmlsl_high_u32): Ditto.
15324 (vfmlalq_high_u32): Ditto.
15325 (vfmlslq_high_u32): Ditto.
15326 (vfmlal_lane_low_u32): Ditto.
15327 (vfmlsl_lane_low_u32): Ditto.
15328 (vfmlal_laneq_low_u32): Ditto.
15329 (vfmlsl_laneq_low_u32): Ditto.
15330 (vfmlalq_lane_low_u32): Ditto.
15331 (vfmlslq_lane_low_u32): Ditto.
15332 (vfmlalq_laneq_low_u32): Ditto.
15333 (vfmlslq_laneq_low_u32): Ditto.
15334 (vfmlal_lane_high_u32): Ditto.
15335 (vfmlsl_lane_high_u32): Ditto.
15336 (vfmlal_laneq_high_u32): Ditto.
15337 (vfmlsl_laneq_high_u32): Ditto.
15338 (vfmlalq_lane_high_u32): Ditto.
15339 (vfmlslq_lane_high_u32): Ditto.
15340 (vfmlalq_laneq_high_u32): Ditto.
15341 (vfmlslq_laneq_high_u32): Ditto.
15342 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
15343 (AARCH64_FL_FOR_ARCH8_4): New.
15344 (AARCH64_ISA_F16FML): New ISA flag.
15345 (TARGET_F16FML): New feature flag for fp16fml.
15346 (doc/invoke.texi): Document new fp16fml option.
15347
15348 2018-01-10 Michael Collison <michael.collison@arm.com>
15349
15350 * config/aarch64/aarch64-builtins.c:
15351 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
15352 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15353 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
15354 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
15355 (AARCH64_ISA_SHA3): New ISA flag.
15356 (TARGET_SHA3): New feature flag for sha3.
15357 * config/aarch64/iterators.md (sha512_op): New int attribute.
15358 (CRYPTO_SHA512): New int iterator.
15359 (UNSPEC_SHA512H): New unspec.
15360 (UNSPEC_SHA512H2): Ditto.
15361 (UNSPEC_SHA512SU0): Ditto.
15362 (UNSPEC_SHA512SU1): Ditto.
15363 * config/aarch64/aarch64-simd-builtins.def
15364 (aarch64_crypto_sha512hqv2di): New builtin.
15365 (aarch64_crypto_sha512h2qv2di): Ditto.
15366 (aarch64_crypto_sha512su0qv2di): Ditto.
15367 (aarch64_crypto_sha512su1qv2di): Ditto.
15368 (aarch64_eor3qv8hi): Ditto.
15369 (aarch64_rax1qv2di): Ditto.
15370 (aarch64_xarqv2di): Ditto.
15371 (aarch64_bcaxqv8hi): Ditto.
15372 * config/aarch64/aarch64-simd.md:
15373 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
15374 (aarch64_crypto_sha512su0qv2di): Ditto.
15375 (aarch64_crypto_sha512su1qv2di): Ditto.
15376 (aarch64_eor3qv8hi): Ditto.
15377 (aarch64_rax1qv2di): Ditto.
15378 (aarch64_xarqv2di): Ditto.
15379 (aarch64_bcaxqv8hi): Ditto.
15380 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
15381 (vsha512h2q_u64): Ditto.
15382 (vsha512su0q_u64): Ditto.
15383 (vsha512su1q_u64): Ditto.
15384 (veor3q_u16): Ditto.
15385 (vrax1q_u64): Ditto.
15386 (vxarq_u64): Ditto.
15387 (vbcaxq_u16): Ditto.
15388 * config/arm/types.md (crypto_sha512): New type attribute.
15389 (crypto_sha3): Ditto.
15390 (doc/invoke.texi): Document new sha3 option.
15391
15392 2018-01-10 Michael Collison <michael.collison@arm.com>
15393
15394 * config/aarch64/aarch64-builtins.c:
15395 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
15396 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15397 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
15398 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
15399 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
15400 (AARCH64_ISA_SM4): New ISA flag.
15401 (TARGET_SM4): New feature flag for sm4.
15402 * config/aarch64/aarch64-simd-builtins.def
15403 (aarch64_sm3ss1qv4si): Ditto.
15404 (aarch64_sm3tt1aq4si): Ditto.
15405 (aarch64_sm3tt1bq4si): Ditto.
15406 (aarch64_sm3tt2aq4si): Ditto.
15407 (aarch64_sm3tt2bq4si): Ditto.
15408 (aarch64_sm3partw1qv4si): Ditto.
15409 (aarch64_sm3partw2qv4si): Ditto.
15410 (aarch64_sm4eqv4si): Ditto.
15411 (aarch64_sm4ekeyqv4si): Ditto.
15412 * config/aarch64/aarch64-simd.md:
15413 (aarch64_sm3ss1qv4si): Ditto.
15414 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
15415 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
15416 (aarch64_sm4eqv4si): Ditto.
15417 (aarch64_sm4ekeyqv4si): Ditto.
15418 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
15419 (sm3part_op): Ditto.
15420 (CRYPTO_SM3TT): Ditto.
15421 (CRYPTO_SM3PART): Ditto.
15422 (UNSPEC_SM3SS1): New unspec.
15423 (UNSPEC_SM3TT1A): Ditto.
15424 (UNSPEC_SM3TT1B): Ditto.
15425 (UNSPEC_SM3TT2A): Ditto.
15426 (UNSPEC_SM3TT2B): Ditto.
15427 (UNSPEC_SM3PARTW1): Ditto.
15428 (UNSPEC_SM3PARTW2): Ditto.
15429 (UNSPEC_SM4E): Ditto.
15430 (UNSPEC_SM4EKEY): Ditto.
15431 * config/aarch64/constraints.md (Ui2): New constraint.
15432 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
15433 * config/arm/types.md (crypto_sm3): New type attribute.
15434 (crypto_sm4): Ditto.
15435 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
15436 (vsm3tt1aq_u32): Ditto.
15437 (vsm3tt1bq_u32): Ditto.
15438 (vsm3tt2aq_u32): Ditto.
15439 (vsm3tt2bq_u32): Ditto.
15440 (vsm3partw1q_u32): Ditto.
15441 (vsm3partw2q_u32): Ditto.
15442 (vsm4eq_u32): Ditto.
15443 (vsm4ekeyq_u32): Ditto.
15444 (doc/invoke.texi): Document new sm4 option.
15445
15446 2018-01-10 Michael Collison <michael.collison@arm.com>
15447
15448 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
15449 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
15450 (AARCH64_FL_FOR_ARCH8_4): New.
15451 (AARCH64_FL_V8_4): New flag.
15452 (doc/invoke.texi): Document new armv8.4-a option.
15453
15454 2018-01-10 Michael Collison <michael.collison@arm.com>
15455
15456 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15457 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
15458 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
15459 * config/aarch64/aarch64-option-extension.def: Add
15460 AARCH64_OPT_EXTENSION of 'sha2'.
15461 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
15462 (crypto): Disable sha2 and aes if crypto disabled.
15463 (crypto): Enable aes and sha2 if enabled.
15464 (simd): Disable sha2 and aes if simd disabled.
15465 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
15466 New flags.
15467 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
15468 (TARGET_SHA2): New feature flag for sha2.
15469 (TARGET_AES): New feature flag for aes.
15470 * config/aarch64/aarch64-simd.md:
15471 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
15472 conditional on TARGET_AES.
15473 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
15474 (aarch64_crypto_sha1hsi): Make pattern conditional
15475 on TARGET_SHA2.
15476 (aarch64_crypto_sha1hv4si): Ditto.
15477 (aarch64_be_crypto_sha1hv4si): Ditto.
15478 (aarch64_crypto_sha1su1v4si): Ditto.
15479 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
15480 (aarch64_crypto_sha1su0v4si): Ditto.
15481 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
15482 (aarch64_crypto_sha256su0v4si): Ditto.
15483 (aarch64_crypto_sha256su1v4si): Ditto.
15484 (doc/invoke.texi): Document new aes and sha2 options.
15485
15486 2018-01-10 Martin Sebor <msebor@redhat.com>
15487
15488 PR tree-optimization/83781
15489 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
15490 as string arrays.
15491
15492 2018-01-11 Martin Sebor <msebor@gmail.com>
15493 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15494
15495 PR tree-optimization/83501
15496 PR tree-optimization/81703
15497
15498 * tree-ssa-strlen.c (get_string_cst): Rename...
15499 (get_string_len): ...to this. Handle global constants.
15500 (handle_char_store): Adjust.
15501
15502 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
15503 Jim Wilson <jimw@sifive.com>
15504
15505 * config/riscv/riscv-protos.h (riscv_output_return): New.
15506 * config/riscv/riscv.c (struct machine_function): New naked_p field.
15507 (riscv_attribute_table, riscv_output_return),
15508 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
15509 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
15510 (riscv_compute_frame_info): Only compute frame->mask if not a naked
15511 function.
15512 (riscv_expand_prologue): Add early return for naked function.
15513 (riscv_expand_epilogue): Likewise.
15514 (riscv_function_ok_for_sibcall): Return false for naked function.
15515 (riscv_set_current_function): New.
15516 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
15517 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
15518 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
15519 * doc/extend.texi (RISC-V Function Attributes): New.
15520
15521 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
15522
15523 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
15524 check for 128-bit long double before checking TCmode.
15525 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
15526 128-bit long doubles before checking TFmode or TCmode.
15527 (FLOAT128_IBM_P): Likewise.
15528
15529 2018-01-10 Martin Sebor <msebor@redhat.com>
15530
15531 PR tree-optimization/83671
15532 * builtins.c (c_strlen): Unconditionally return zero for the empty
15533 string.
15534 Use -Warray-bounds for warnings.
15535 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
15536 for non-constant array indices with COMPONENT_REF, arrays of
15537 arrays, and pointers to arrays.
15538 (gimple_fold_builtin_strlen): Determine and set length range for
15539 non-constant character arrays.
15540
15541 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
15542
15543 PR middle-end/81897
15544 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
15545 empty blocks.
15546
15547 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
15548
15549 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
15550
15551 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
15552
15553 PR target/83399
15554 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
15555 VECTOR_MEM_ALTIVEC_OR_VSX_P.
15556 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
15557 indexed_or_indirect_operand predicate.
15558 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
15559 (*vsx_le_perm_load_v8hi): Likewise.
15560 (*vsx_le_perm_load_v16qi): Likewise.
15561 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
15562 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
15563 (*vsx_le_perm_store_v8hi): Likewise.
15564 (*vsx_le_perm_store_v16qi): Likewise.
15565 (eight unnamed splitters): Likewise.
15566
15567 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
15568
15569 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
15570 * config/rs6000/emmintrin.h: Likewise.
15571 * config/rs6000/mmintrin.h: Likewise.
15572 * config/rs6000/xmmintrin.h: Likewise.
15573
15574 2018-01-10 David Malcolm <dmalcolm@redhat.com>
15575
15576 PR c++/43486
15577 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
15578 "public_flag".
15579 * tree.c (tree_nop_conversion): Return true for location wrapper
15580 nodes.
15581 (maybe_wrap_with_location): New function.
15582 (selftest::check_strip_nops): New function.
15583 (selftest::test_location_wrappers): New function.
15584 (selftest::tree_c_tests): Call it.
15585 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
15586 (maybe_wrap_with_location): New decl.
15587 (EXPR_LOCATION_WRAPPER_P): New macro.
15588 (location_wrapper_p): New inline function.
15589 (tree_strip_any_location_wrapper): New inline function.
15590
15591 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
15592
15593 PR target/83735
15594 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
15595 stack_realign_offset for the largest alignment of stack slot
15596 actually used.
15597 (ix86_find_max_used_stack_alignment): New function.
15598 (ix86_finalize_stack_frame_flags): Use it. Set
15599 max_used_stack_alignment if we don't realign stack.
15600 * config/i386/i386.h (machine_function): Add
15601 max_used_stack_alignment.
15602
15603 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
15604
15605 * config/arm/arm.opt (-mbranch-cost): New option.
15606 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
15607 account.
15608
15609 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
15610
15611 PR target/83629
15612 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
15613 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
15614
15615 2018-01-10 Richard Biener <rguenther@suse.de>
15616
15617 PR debug/83765
15618 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
15619 early out so it also covers the case where we have a non-NULL
15620 origin.
15621
15622 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
15623
15624 PR tree-optimization/83753
15625 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
15626 for non-strided grouped accesses if the number of elements is 1.
15627
15628 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
15629
15630 PR target/81616
15631 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
15632 * i386.h (TARGET_USE_GATHER): Define.
15633 * x86-tune.def (X86_TUNE_USE_GATHER): New.
15634
15635 2018-01-10 Martin Liska <mliska@suse.cz>
15636
15637 PR bootstrap/82831
15638 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
15639 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
15640 partitioning.
15641 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
15642 CLEANUP_NO_PARTITIONING is not set.
15643
15644 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
15645
15646 * doc/rtl.texi: Remove documentation of (const ...) wrappers
15647 for vectors, as a partial revert of r254296.
15648 * rtl.h (const_vec_p): Delete.
15649 (const_vec_duplicate_p): Don't test for vector CONSTs.
15650 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
15651 * expmed.c (make_tree): Likewise.
15652
15653 Revert:
15654 * common.md (E, F): Use CONSTANT_P instead of checking for
15655 CONST_VECTOR.
15656 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
15657 checking for CONST_VECTOR.
15658
15659 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
15660
15661 PR middle-end/83575
15662 * predict.c (force_edge_cold): Handle in more sane way edges
15663 with no prediction.
15664
15665 2018-01-09 Carl Love <cel@us.ibm.com>
15666
15667 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
15668 V4SI, V4SF types.
15669 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
15670 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
15671 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
15672 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
15673 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
15674 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
15675 * config/rs6000/rs6000-protos.h: Add extern defition for
15676 rs6000_generate_float2_double_code.
15677 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
15678 function.
15679 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
15680 (float2_v2df): Add define_expand.
15681
15682 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
15683
15684 PR target/83628
15685 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
15686 op_mode in the force_to_mode call.
15687
15688 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
15689
15690 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
15691 instead of checking each element individually.
15692 (aarch64_evpc_uzp): Likewise.
15693 (aarch64_evpc_zip): Likewise.
15694 (aarch64_evpc_ext): Likewise.
15695 (aarch64_evpc_rev): Likewise.
15696 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
15697 instead of checking each element individually. Return true without
15698 generating rtl if
15699 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
15700 whether all selected elements come from the same input, instead of
15701 checking each element individually. Remove calls to gen_rtx_REG,
15702 start_sequence and end_sequence and instead assert that no rtl is
15703 generated.
15704
15705 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
15706
15707 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
15708 order of HIGH and CONST checks.
15709
15710 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
15711
15712 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
15713 if the destination isn't an SSA_NAME.
15714
15715 2018-01-09 Richard Biener <rguenther@suse.de>
15716
15717 PR tree-optimization/83668
15718 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
15719 move prologue...
15720 (canonicalize_loop_form): ... here, renamed from ...
15721 (canonicalize_loop_closed_ssa_form): ... this and amended to
15722 swap successor edges for loop exit blocks to make us use
15723 the RPO order we need for initial schedule generation.
15724
15725 2018-01-09 Joseph Myers <joseph@codesourcery.com>
15726
15727 PR tree-optimization/64811
15728 * match.pd: When optimizing comparisons with Inf, avoid
15729 introducing or losing exceptions from comparisons with NaN.
15730
15731 2018-01-09 Martin Liska <mliska@suse.cz>
15732
15733 PR sanitizer/82517
15734 * asan.c (shadow_mem_size): Add gcc_assert.
15735
15736 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
15737
15738 Don't save registers in main().
15739
15740 PR target/83738
15741 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
15742 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
15743 * config/avr/avr.c (avr_set_current_function): Don't error if
15744 naked, OS_task or OS_main are specified at the same time.
15745 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
15746 OS_main.
15747 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
15748 attribute.
15749 * common/config/avr/avr-common.c (avr_option_optimization_table):
15750 Switch on -mmain-is-OS_task for optimizing compilations.
15751
15752 2018-01-09 Richard Biener <rguenther@suse.de>
15753
15754 PR tree-optimization/83572
15755 * graphite.c: Include cfganal.h.
15756 (graphite_transform_loops): Connect infinite loops to exit
15757 and remove fake edges at the end.
15758
15759 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
15760
15761 * ipa-inline.c (edge_badness): Revert accidental checkin.
15762
15763 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
15764
15765 PR ipa/80763
15766 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
15767 symbols; not inline clones.
15768
15769 2018-01-09 Jakub Jelinek <jakub@redhat.com>
15770
15771 PR target/83507
15772 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
15773 hard registers. Formatting fixes.
15774
15775 PR preprocessor/83722
15776 * gcc.c (try_generate_repro): Pass
15777 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
15778 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
15779 do_report_bug.
15780
15781 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
15782 Kito Cheng <kito.cheng@gmail.com>
15783
15784 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
15785 (riscv_leaf_function_p): Delete.
15786 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
15787
15788 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15789
15790 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
15791 function.
15792 (do_ifelse): New function.
15793 (do_isel): New function.
15794 (do_sub3): New function.
15795 (do_add3): New function.
15796 (do_load_mask_compare): New function.
15797 (do_overlap_load_compare): New function.
15798 (expand_compare_loop): New function.
15799 (expand_block_compare): Call expand_compare_loop() when appropriate.
15800 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
15801 option description.
15802 (-mblock-compare-inline-loop-limit): New option.
15803
15804 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15805
15806 PR target/83677
15807 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
15808 Reverse order of second and third operands in first alternative.
15809 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
15810 of first and second elements in UNSPEC_VPERMR vector.
15811 (altivec_expand_vec_perm_le): Likewise.
15812
15813 2018-01-08 Jeff Law <law@redhat.com>
15814
15815 PR rtl-optimizatin/81308
15816 * tree-switch-conversion.c (cfg_altered): New file scoped static.
15817 (process_switch): If group_case_labels makes a change, then set
15818 cfg_altered.
15819 (pass_convert_switch::execute): If a switch is converted, then
15820 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
15821
15822 PR rtl-optimization/81308
15823 * recog.c (split_all_insns): Conditionally cleanup the CFG after
15824 splitting insns.
15825
15826 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
15827
15828 PR target/83663 - Revert r255946
15829 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
15830 generation for cases where splatting a value is not useful.
15831 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
15832 across a vec_duplicate and a paradoxical subreg forming a vector
15833 mode to a vec_concat.
15834
15835 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15836
15837 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
15838 -march=armv8.3-a variants.
15839 * config/arm/t-multilib: Likewise.
15840 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
15841
15842 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15843
15844 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
15845 to generate rtl.
15846 (cceq_ior_compare_complement): Give it a name so I can use it, and
15847 change boolean_or_operator predicate to boolean_operator so it can
15848 be used to generate a crand.
15849 (eqne): New code iterator.
15850 (bd/bd_neg): New code_attrs.
15851 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
15852 a single define_insn.
15853 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
15854 decrement (bdnzt/bdnzf/bdzt/bdzf).
15855 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
15856 with the new names of the branch decrement patterns, and added the
15857 names of the branch decrement conditional patterns.
15858
15859 2018-01-08 Richard Biener <rguenther@suse.de>
15860
15861 PR tree-optimization/83563
15862 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
15863 cache.
15864
15865 2018-01-08 Richard Biener <rguenther@suse.de>
15866
15867 PR middle-end/83713
15868 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
15869
15870 2018-01-08 Richard Biener <rguenther@suse.de>
15871
15872 PR tree-optimization/83685
15873 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
15874 references to abnormals.
15875
15876 2018-01-08 Richard Biener <rguenther@suse.de>
15877
15878 PR lto/83719
15879 * dwarf2out.c (output_indirect_strings): Handle empty
15880 skeleton_debug_str_hash.
15881 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
15882
15883 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
15884
15885 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
15886 (emit_store_direct): Likewise.
15887 (arc_trampoline_adjust_address): Likewise.
15888 (arc_asm_trampoline_template): New function.
15889 (arc_initialize_trampoline): Use asm_trampoline_template.
15890 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
15891 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
15892 * config/arc/arc.md (flush_icache): Delete pattern.
15893
15894 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
15895
15896 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
15897 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
15898 munaligned-access.
15899
15900 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
15901
15902 PR target/83681
15903 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
15904 by not USED_FOR_TARGET.
15905 (make_pass_resolve_sw_modes): Likewise.
15906
15907 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
15908
15909 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
15910 USED_FOR_TARGET.
15911
15912 2018-01-08 Richard Biener <rguenther@suse.de>
15913
15914 PR middle-end/83580
15915 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
15916
15917 2018-01-08 Richard Biener <rguenther@suse.de>
15918
15919 PR middle-end/83517
15920 * match.pd ((t * 2) / 2) -> t): Add missing :c.
15921
15922 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
15923
15924 PR middle-end/81897
15925 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
15926 basic blocks with a small number of successors.
15927 (convert_control_dep_chain_into_preds): Improve handling of
15928 forwarder blocks.
15929 (dump_predicates): Split apart into...
15930 (dump_pred_chain): ...here...
15931 (dump_pred_info): ...and here.
15932 (can_one_predicate_be_invalidated_p): Add debugging printfs.
15933 (can_chain_union_be_invalidated_p): Improve check for invalidation
15934 of paths.
15935 (uninit_uses_cannot_happen): Avoid unnecessary if
15936 convert_control_dep_chain_into_preds yielded nothing.
15937
15938 2018-01-06 Martin Sebor <msebor@redhat.com>
15939
15940 PR tree-optimization/83640
15941 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
15942 subtracting negative offset from size.
15943 (builtin_access::overlap): Adjust offset bounds of the access to fall
15944 within the size of the object if possible.
15945
15946 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
15947
15948 PR rtl-optimization/83699
15949 * expmed.c (extract_bit_field_1): Restrict the vector usage of
15950 extract_bit_field_as_subreg to cases in which the extracted
15951 value is also a vector.
15952
15953 * lra-constraints.c (process_alt_operands): Test for the equivalence
15954 substitutions when detecting a possible reload cycle.
15955
15956 2018-01-06 Jakub Jelinek <jakub@redhat.com>
15957
15958 PR debug/83480
15959 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
15960 by default if flag_selective_schedling{,2}. Formatting fixes.
15961
15962 PR rtl-optimization/83682
15963 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
15964 if it has non-VECTOR_MODE element mode.
15965 (vec_duplicate_p): Likewise.
15966
15967 PR middle-end/83694
15968 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
15969 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
15970
15971 2018-01-05 Jakub Jelinek <jakub@redhat.com>
15972
15973 PR target/83604
15974 * config/i386/i386-builtin.def
15975 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
15976 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
15977 Require also OPTION_MASK_ISA_AVX512F in addition to
15978 OPTION_MASK_ISA_GFNI.
15979 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
15980 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
15981 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
15982 to OPTION_MASK_ISA_GFNI.
15983 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
15984 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
15985 OPTION_MASK_ISA_AVX512BW.
15986 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
15987 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
15988 addition to OPTION_MASK_ISA_GFNI.
15989 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
15990 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
15991 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
15992 to OPTION_MASK_ISA_GFNI.
15993 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
15994 a requirement for all ISAs rather than any of them with a few
15995 exceptions.
15996 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
15997 processing.
15998 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
15999 bitmasks to be enabled with 3 exceptions, instead of requiring any
16000 enabled ISA with lots of exceptions.
16001 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
16002 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
16003 Change avx512bw in isa attribute to avx512f.
16004 * config/i386/sgxintrin.h: Add license boilerplate.
16005 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
16006 to __AVX512F__ and __AVX512VL to __AVX512VL__.
16007 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
16008 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
16009 defined.
16010 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
16011 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
16012 temporarily sse2 rather than sse if not enabled already.
16013
16014 PR target/83604
16015 * config/i386/sse.md (VI248_VLBW): Rename to ...
16016 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
16017 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
16018 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
16019 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
16020 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
16021 mode iterator instead of VI248_VLBW.
16022
16023 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
16024
16025 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
16026 (record_modified): Skip clobbers; add debug output.
16027 (param_change_prob): Use sreal frequencies.
16028
16029 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
16030
16031 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
16032 punt for user-aligned variables.
16033
16034 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
16035
16036 * tree-chrec.c (chrec_contains_symbols): Return true for
16037 POLY_INT_CST.
16038
16039 2018-01-05 Sudakshina Das <sudi.das@arm.com>
16040
16041 PR target/82439
16042 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
16043 of (x|y) == x for BICS pattern.
16044
16045 2018-01-05 Jakub Jelinek <jakub@redhat.com>
16046
16047 PR tree-optimization/83605
16048 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
16049 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
16050 can throw.
16051
16052 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
16053
16054 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
16055 * config/epiphany/rtems.h: New file.
16056
16057 2018-01-04 Jakub Jelinek <jakub@redhat.com>
16058 Uros Bizjak <ubizjak@gmail.com>
16059
16060 PR target/83554
16061 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
16062 QIreg_operand instead of register_operand predicate.
16063 * config/i386/i386.c (ix86_rop_should_change_byte_p,
16064 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
16065 comments instead of -fmitigate[-_]rop.
16066
16067 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16068
16069 PR bootstrap/81926
16070 * cgraphunit.c (symbol_table::compile): Switch to text_section
16071 before calling assembly_start debug hook.
16072 * run-rtl-passes.c (run_rtl_passes): Likewise.
16073 Include output.h.
16074
16075 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16076
16077 * tree-vrp.c (extract_range_from_binary_expr_1): Check
16078 range_int_cst_p rather than !symbolic_range_p before calling
16079 extract_range_from_multiplicative_op_1.
16080
16081 2018-01-04 Jeff Law <law@redhat.com>
16082
16083 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
16084 redundant test in assertion.
16085
16086 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16087
16088 * doc/rtl.texi: Document machine_mode wrapper classes.
16089
16090 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16091
16092 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
16093 using tree_to_uhwi.
16094
16095 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16096
16097 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
16098 the VEC_PERM_EXPR fold to fail.
16099
16100 2018-01-04 Jakub Jelinek <jakub@redhat.com>
16101
16102 PR debug/83585
16103 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
16104 to switched_sections.
16105
16106 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16107
16108 PR target/83680
16109 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
16110 test for d.testing.
16111
16112 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
16113
16114 PR target/83387
16115 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
16116 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
16117
16118 2018-01-04 Jakub Jelinek <jakub@redhat.com>
16119
16120 PR debug/83666
16121 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
16122 is BLKmode and bitpos not zero or mode change is needed.
16123
16124 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16125
16126 PR target/83675
16127 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
16128 TARGET_VIS2.
16129
16130 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
16131
16132 PR target/83628
16133 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
16134 instead of MULT rtx. Update all corresponding splitters.
16135 (*saddl_se): Ditto.
16136 (*ssub<modesuffix>): Ditto.
16137 (*ssubl_se): Ditto.
16138 (*cmp_sadd_di): Update split patterns.
16139 (*cmp_sadd_si): Ditto.
16140 (*cmp_sadd_sidi): Ditto.
16141 (*cmp_ssub_di): Ditto.
16142 (*cmp_ssub_si): Ditto.
16143 (*cmp_ssub_sidi): Ditto.
16144 * config/alpha/predicates.md (const23_operand): New predicate.
16145 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
16146 Look for ASHIFT, not MULT inner operand.
16147 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
16148
16149 2018-01-04 Martin Liska <mliska@suse.cz>
16150
16151 PR gcov-profile/83669
16152 * gcov.c (output_intermediate_file): Add version to intermediate
16153 gcov file.
16154 * doc/gcov.texi: Document new field 'version' in intermediate
16155 file format. Fix location of '-k' option of gcov command.
16156
16157 2018-01-04 Martin Liska <mliska@suse.cz>
16158
16159 PR ipa/82352
16160 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
16161
16162 2018-01-04 Jakub Jelinek <jakub@redhat.com>
16163
16164 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
16165
16166 2018-01-03 Martin Sebor <msebor@redhat.com>
16167
16168 PR tree-optimization/83655
16169 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
16170 checking calls with invalid arguments.
16171
16172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16173
16174 * tree-vect-stmts.c (vect_get_store_rhs): New function.
16175 (vectorizable_mask_load_store): Delete.
16176 (vectorizable_call): Return false for masked loads and stores.
16177 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
16178 instead of gimple_assign_rhs1.
16179 (vectorizable_load): Handle IFN_MASK_LOAD.
16180 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
16181
16182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16183
16184 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
16185 split out from..,
16186 (vectorizable_mask_load_store): ...here.
16187 (vectorizable_load): ...and here.
16188
16189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16190
16191 * tree-vect-stmts.c (vect_build_all_ones_mask)
16192 (vect_build_zero_merge_argument): New functions, split out from...
16193 (vectorizable_load): ...here.
16194
16195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16196
16197 * tree-vect-stmts.c (vect_check_store_rhs): New function,
16198 split out from...
16199 (vectorizable_mask_load_store): ...here.
16200 (vectorizable_store): ...and here.
16201
16202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16203
16204 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
16205 split out from...
16206 (vectorizable_mask_load_store): ...here.
16207
16208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16209
16210 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
16211 (vect_model_store_cost): Take a vec_load_store_type instead of a
16212 vect_def_type.
16213 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
16214 (vect_model_store_cost): Take a vec_load_store_type instead of a
16215 vect_def_type.
16216 (vectorizable_mask_load_store): Update accordingly.
16217 (vectorizable_store): Likewise.
16218 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
16219
16220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16221
16222 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
16223 IFN_MASK_LOAD calls here rather than...
16224 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
16225
16226 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16227 Alan Hayward <alan.hayward@arm.com>
16228 David Sherwood <david.sherwood@arm.com>
16229
16230 * expmed.c (extract_bit_field_1): For vector extracts,
16231 fall back to extract_bit_field_as_subreg if vec_extract
16232 isn't available.
16233
16234 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16235 Alan Hayward <alan.hayward@arm.com>
16236 David Sherwood <david.sherwood@arm.com>
16237
16238 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
16239 they are variable or constant sized.
16240 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
16241 slots for constant-sized data.
16242
16243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16244 Alan Hayward <alan.hayward@arm.com>
16245 David Sherwood <david.sherwood@arm.com>
16246
16247 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
16248 handling COND_EXPRs with boolean comparisons, try to find a better
16249 basis for the mask type than the boolean itself.
16250
16251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16252
16253 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
16254 is calculated and how it can be overridden.
16255 * genmodes.c (max_bitsize_mode_any_mode): New variable.
16256 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
16257 if defined.
16258 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
16259 if nonzero.
16260
16261 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16262 Alan Hayward <alan.hayward@arm.com>
16263 David Sherwood <david.sherwood@arm.com>
16264
16265 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
16266 Remove the mode argument.
16267 (aarch64_simd_valid_immediate): Remove the mode and inverse
16268 arguments.
16269 * config/aarch64/iterators.md (bitsize): New iterator.
16270 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
16271 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
16272 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
16273 aarch64_simd_valid_immediate.
16274 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
16275 (aarch64_reg_or_bic_imm): Likewise.
16276 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
16277 with an insn_type enum and msl with a modifier_type enum.
16278 Replace element_width with a scalar_mode. Change the shift
16279 to unsigned int. Add constructors for scalar_float_mode and
16280 scalar_int_mode elements.
16281 (aarch64_vect_float_const_representable_p): Delete.
16282 (aarch64_can_const_movi_rtx_p)
16283 (aarch64_simd_scalar_immediate_valid_for_move)
16284 (aarch64_simd_make_constant): Update call to
16285 aarch64_simd_valid_immediate.
16286 (aarch64_advsimd_valid_immediate_hs): New function.
16287 (aarch64_advsimd_valid_immediate): Likewise.
16288 (aarch64_simd_valid_immediate): Remove mode and inverse
16289 arguments. Rewrite to use the above. Use const_vec_duplicate_p
16290 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
16291 and aarch64_float_const_representable_p on the result.
16292 (aarch64_output_simd_mov_immediate): Remove mode argument.
16293 Update call to aarch64_simd_valid_immediate and use of
16294 simd_immediate_info.
16295 (aarch64_output_scalar_simd_mov_immediate): Update call
16296 accordingly.
16297
16298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16299 Alan Hayward <alan.hayward@arm.com>
16300 David Sherwood <david.sherwood@arm.com>
16301
16302 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
16303 (mode_nunits): Likewise CONST_MODE_NUNITS.
16304 * machmode.def (ADJUST_NUNITS): Document.
16305 * genmodes.c (mode_data::need_nunits_adj): New field.
16306 (blank_mode): Update accordingly.
16307 (adj_nunits): New variable.
16308 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
16309 parameter.
16310 (emit_mode_size_inline): Set need_bytesize_adj for all modes
16311 listed in adj_nunits.
16312 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
16313 listed in adj_nunits. Don't emit case statements for such modes.
16314 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
16315 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
16316 nothing if adj_nunits is nonnull.
16317 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
16318 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
16319 (emit_mode_fbit): Update use of print_maybe_const_decl.
16320 (emit_move_size): Likewise. Treat the array as non-const
16321 if adj_nunits.
16322 (emit_mode_adjustments): Handle adj_nunits.
16323
16324 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16325
16326 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
16327 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
16328 (VECTOR_MODES): Use it.
16329 (make_vector_modes): Take the prefix as an argument.
16330
16331 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16332 Alan Hayward <alan.hayward@arm.com>
16333 David Sherwood <david.sherwood@arm.com>
16334
16335 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
16336 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
16337 for MODE_VECTOR_BOOL.
16338 * machmode.def (VECTOR_BOOL_MODE): Document.
16339 * genmodes.c (VECTOR_BOOL_MODE): New macro.
16340 (make_vector_bool_mode): New function.
16341 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
16342 MODE_VECTOR_BOOL.
16343 * lto-streamer-in.c (lto_input_mode_table): Likewise.
16344 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
16345 Likewise.
16346 * stor-layout.c (int_mode_for_mode): Likewise.
16347 * tree.c (build_vector_type_for_mode): Likewise.
16348 * varasm.c (output_constant_pool_2): Likewise.
16349 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
16350 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
16351 for MODE_VECTOR_BOOL.
16352 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
16353 of mode class checks.
16354 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
16355 instead of a list of mode class checks.
16356 (expand_vector_scalar_condition): Likewise.
16357 (type_for_widest_vector_mode): Handle BImode as an inner mode.
16358
16359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16360 Alan Hayward <alan.hayward@arm.com>
16361 David Sherwood <david.sherwood@arm.com>
16362
16363 * machmode.h (mode_size): Change from unsigned short to
16364 poly_uint16_pod.
16365 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
16366 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16367 or if measurement_type is not polynomial.
16368 (fixed_size_mode::includes_p): Check for constant-sized modes.
16369 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
16370 return a poly_uint16 rather than an unsigned short.
16371 (emit_mode_size): Change the type of mode_size from unsigned short
16372 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
16373 (emit_mode_adjustments): Cope with polynomial vector sizes.
16374 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16375 for GET_MODE_SIZE.
16376 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16377 for GET_MODE_SIZE.
16378 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
16379 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
16380 * caller-save.c (setup_save_areas): Likewise.
16381 (replace_reg_with_saved_mem): Likewise.
16382 * calls.c (emit_library_call_value_1): Likewise.
16383 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
16384 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
16385 (gen_lowpart_for_combine): Likewise.
16386 * convert.c (convert_to_integer_1): Likewise.
16387 * cse.c (equiv_constant, cse_insn): Likewise.
16388 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
16389 (cselib_subst_to_values): Likewise.
16390 * dce.c (word_dce_process_block): Likewise.
16391 * df-problems.c (df_word_lr_mark_ref): Likewise.
16392 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
16393 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
16394 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
16395 (rtl_for_decl_location): Likewise.
16396 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
16397 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
16398 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
16399 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
16400 (expand_expr_real_1): Likewise.
16401 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
16402 (pad_below): Likewise.
16403 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16404 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
16405 * ira.c (get_subreg_tracking_sizes): Likewise.
16406 * ira-build.c (ira_create_allocno_objects): Likewise.
16407 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
16408 (ira_sort_regnos_for_alter_reg): Likewise.
16409 * ira-costs.c (record_operand_costs): Likewise.
16410 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
16411 (resolve_simple_move): Likewise.
16412 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
16413 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
16414 (lra_constraints): Likewise.
16415 (CONST_POOL_OK_P): Reject variable-sized modes.
16416 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
16417 (add_pseudo_to_slot, lra_spill): Likewise.
16418 * omp-low.c (omp_clause_aligned_alignment): Likewise.
16419 * optabs-query.c (get_best_extraction_insn): Likewise.
16420 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16421 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
16422 (expand_mult_highpart, valid_multiword_target_p): Likewise.
16423 * recog.c (offsettable_address_addr_space_p): Likewise.
16424 * regcprop.c (maybe_mode_change): Likewise.
16425 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
16426 * regrename.c (build_def_use): Likewise.
16427 * regstat.c (dump_reg_info): Likewise.
16428 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
16429 (find_reloads, find_reloads_subreg_address): Likewise.
16430 * reload1.c (eliminate_regs_1): Likewise.
16431 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
16432 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
16433 (simplify_binary_operation_1, simplify_subreg): Likewise.
16434 * targhooks.c (default_function_arg_padding): Likewise.
16435 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
16436 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
16437 (verify_gimple_assign_ternary): Likewise.
16438 * tree-inline.c (estimate_move_cost): Likewise.
16439 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16440 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
16441 (get_address_cost_ainc): Likewise.
16442 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
16443 (vect_supportable_dr_alignment): Likewise.
16444 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16445 (vectorizable_reduction): Likewise.
16446 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
16447 (vectorizable_operation, vectorizable_load): Likewise.
16448 * tree.c (build_same_sized_truth_vector_type): Likewise.
16449 * valtrack.c (cleanup_auto_inc_dec): Likewise.
16450 * var-tracking.c (emit_note_insn_var_location): Likewise.
16451 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
16452 (ADDR_VEC_ALIGN): Likewise.
16453
16454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16455 Alan Hayward <alan.hayward@arm.com>
16456 David Sherwood <david.sherwood@arm.com>
16457
16458 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
16459 unsigned short.
16460 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16461 or if measurement_type is polynomial.
16462 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
16463 * combine.c (make_extraction): Likewise.
16464 * dse.c (find_shift_sequence): Likewise.
16465 * dwarf2out.c (mem_loc_descriptor): Likewise.
16466 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
16467 (extract_bit_field, extract_low_bits): Likewise.
16468 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
16469 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
16470 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
16471 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
16472 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16473 * reload.c (find_reloads): Likewise.
16474 * reload1.c (alter_reg): Likewise.
16475 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
16476 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
16477 * tree-if-conv.c (predicate_mem_writes): Likewise.
16478 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
16479 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
16480 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
16481 * valtrack.c (dead_debug_insert_temp): Likewise.
16482 * varasm.c (mergeable_constant_section): Likewise.
16483 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
16484
16485 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16486 Alan Hayward <alan.hayward@arm.com>
16487 David Sherwood <david.sherwood@arm.com>
16488
16489 * expr.c (expand_assignment): Cope with polynomial mode sizes
16490 when assigning to a CONCAT.
16491
16492 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16493 Alan Hayward <alan.hayward@arm.com>
16494 David Sherwood <david.sherwood@arm.com>
16495
16496 * machmode.h (mode_precision): Change from unsigned short to
16497 poly_uint16_pod.
16498 (mode_to_precision): Return a poly_uint16 rather than an unsigned
16499 short.
16500 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
16501 or if measurement_type is not polynomial.
16502 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
16503 in which the mode is already known to be a scalar_int_mode.
16504 * genmodes.c (emit_mode_precision): Change the type of mode_precision
16505 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
16506 initializer.
16507 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16508 for GET_MODE_PRECISION.
16509 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16510 for GET_MODE_PRECISION.
16511 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
16512 as polynomial.
16513 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
16514 (expand_field_assignment, make_extraction): Likewise.
16515 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
16516 (get_last_value): Likewise.
16517 * convert.c (convert_to_integer_1): Likewise.
16518 * cse.c (cse_insn): Likewise.
16519 * expr.c (expand_expr_real_1): Likewise.
16520 * lra-constraints.c (simplify_operand_subreg): Likewise.
16521 * optabs-query.c (can_atomic_load_p): Likewise.
16522 * optabs.c (expand_atomic_load): Likewise.
16523 (expand_atomic_store): Likewise.
16524 * ree.c (combine_reaching_defs): Likewise.
16525 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
16526 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
16527 * tree.h (type_has_mode_precision_p): Likewise.
16528 * ubsan.c (instrument_si_overflow): Likewise.
16529
16530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16531 Alan Hayward <alan.hayward@arm.com>
16532 David Sherwood <david.sherwood@arm.com>
16533
16534 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
16535 polynomial numbers of units.
16536 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
16537 (valid_vector_subparts_p): New function.
16538 (build_vector_type): Remove temporary shim and take the number
16539 of units as a poly_uint64 rather than an int.
16540 (build_opaque_vector_type): Take the number of units as a
16541 poly_uint64 rather than an int.
16542 * tree.c (build_vector_from_ctor): Handle polynomial
16543 TYPE_VECTOR_SUBPARTS.
16544 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
16545 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
16546 (build_vector_from_val): If the number of units is variable,
16547 use build_vec_duplicate_cst for constant operands and
16548 VEC_DUPLICATE_EXPR otherwise.
16549 (make_vector_type): Remove temporary is_constant ().
16550 (build_vector_type, build_opaque_vector_type): Take the number of
16551 units as a poly_uint64 rather than an int.
16552 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
16553 VECTOR_CST_NELTS.
16554 * cfgexpand.c (expand_debug_expr): Likewise.
16555 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
16556 (store_constructor, expand_expr_real_1): Likewise.
16557 (const_scalar_mask_from_tree): Likewise.
16558 * fold-const-call.c (fold_const_reduction): Likewise.
16559 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
16560 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
16561 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
16562 (fold_relational_const): Likewise.
16563 (native_interpret_vector): Likewise. Change the size from an
16564 int to an unsigned int.
16565 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
16566 TYPE_VECTOR_SUBPARTS.
16567 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
16568 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
16569 duplicating a non-constant operand into a variable-length vector.
16570 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
16571 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
16572 * ipa-icf.c (sem_variable::equals): Likewise.
16573 * match.pd: Likewise.
16574 * omp-simd-clone.c (simd_clone_subparts): Likewise.
16575 * print-tree.c (print_node): Likewise.
16576 * stor-layout.c (layout_type): Likewise.
16577 * targhooks.c (default_builtin_vectorization_cost): Likewise.
16578 * tree-cfg.c (verify_gimple_comparison): Likewise.
16579 (verify_gimple_assign_binary): Likewise.
16580 (verify_gimple_assign_ternary): Likewise.
16581 (verify_gimple_assign_single): Likewise.
16582 * tree-pretty-print.c (dump_generic_node): Likewise.
16583 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16584 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
16585 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
16586 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
16587 (vect_shift_permute_load_chain): Likewise.
16588 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
16589 (expand_vector_condition, optimize_vector_constructor): Likewise.
16590 (lower_vec_perm, get_compute_type): Likewise.
16591 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16592 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
16593 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
16594 (vect_recog_mask_conversion_pattern): Likewise.
16595 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
16596 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
16597 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
16598 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
16599 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
16600 (vectorizable_shift, vectorizable_operation, vectorizable_store)
16601 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
16602 (supportable_widening_operation): Likewise.
16603 (supportable_narrowing_operation): Likewise.
16604 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
16605 Likewise.
16606 * varasm.c (output_constant): Likewise.
16607
16608 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16609 Alan Hayward <alan.hayward@arm.com>
16610 David Sherwood <david.sherwood@arm.com>
16611
16612 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
16613 so that both the length == 3 and length != 3 cases set up their
16614 own permute vectors. Add comments explaining why we know the
16615 number of elements is constant.
16616 (vect_permute_load_chain): Likewise.
16617
16618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16619 Alan Hayward <alan.hayward@arm.com>
16620 David Sherwood <david.sherwood@arm.com>
16621
16622 * machmode.h (mode_nunits): Change from unsigned char to
16623 poly_uint16_pod.
16624 (ONLY_FIXED_SIZE_MODES): New macro.
16625 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
16626 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
16627 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
16628 New typedefs.
16629 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
16630 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
16631 or if measurement_type is not polynomial.
16632 * genmodes.c (ZERO_COEFFS): New macro.
16633 (emit_mode_nunits_inline): Make mode_nunits_inline return a
16634 poly_uint16.
16635 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
16636 Use ZERO_COEFFS when emitting initializers.
16637 * data-streamer.h (bp_pack_poly_value): New function.
16638 (bp_unpack_poly_value): Likewise.
16639 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16640 for GET_MODE_NUNITS.
16641 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16642 for GET_MODE_NUNITS.
16643 * tree.c (make_vector_type): Remove temporary shim and make
16644 the real function take the number of units as a poly_uint64
16645 rather than an int.
16646 (build_vector_type_for_mode): Handle polynomial nunits.
16647 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
16648 * emit-rtl.c (const_vec_series_p_1): Likewise.
16649 (gen_rtx_CONST_VECTOR): Likewise.
16650 * fold-const.c (test_vec_duplicate_folding): Likewise.
16651 * genrecog.c (validate_pattern): Likewise.
16652 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
16653 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16654 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
16655 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
16656 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
16657 * rtlanal.c (subreg_get_info): Likewise.
16658 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
16659 (vect_grouped_load_supported): Likewise.
16660 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
16661 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
16662 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16663 (simplify_const_unary_operation, simplify_binary_operation_1)
16664 (simplify_const_binary_operation, simplify_ternary_operation)
16665 (test_vector_ops_duplicate, test_vector_ops): Likewise.
16666 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
16667 instead of CONST_VECTOR_NUNITS.
16668 * varasm.c (output_constant_pool_2): Likewise.
16669 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
16670 explicit-encoded elements in the XVEC for variable-length vectors.
16671
16672 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16673
16674 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
16675
16676 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16677 Alan Hayward <alan.hayward@arm.com>
16678 David Sherwood <david.sherwood@arm.com>
16679
16680 * coretypes.h (fixed_size_mode): Declare.
16681 (fixed_size_mode_pod): New typedef.
16682 * builtins.h (target_builtins::x_apply_args_mode)
16683 (target_builtins::x_apply_result_mode): Change type to
16684 fixed_size_mode_pod.
16685 * builtins.c (apply_args_size, apply_result_size, result_vector)
16686 (expand_builtin_apply_args_1, expand_builtin_apply)
16687 (expand_builtin_return): Update accordingly.
16688
16689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16690
16691 * cse.c (hash_rtx_cb): Hash only the encoded elements.
16692 * cselib.c (cselib_hash_rtx): Likewise.
16693 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
16694 CONST_VECTOR encoding.
16695
16696 2018-01-03 Jakub Jelinek <jakub@redhat.com>
16697 Jeff Law <law@redhat.com>
16698
16699 PR target/83641
16700 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
16701 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
16702 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
16703 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
16704
16705 PR target/83641
16706 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
16707 explicitly probe *sp in a noreturn function if there were any callee
16708 register saves or frame pointer is needed.
16709
16710 2018-01-03 Jakub Jelinek <jakub@redhat.com>
16711
16712 PR debug/83621
16713 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
16714 BLKmode for ternary, binary or unary expressions.
16715
16716 PR debug/83645
16717 * var-tracking.c (delete_vta_debug_insn): New inline function.
16718 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
16719 insns from get_insns () to NULL instead of each bb separately.
16720 Use delete_vta_debug_insn. No longer static.
16721 (vt_debug_insns_local, variable_tracking_main_1): Adjust
16722 delete_vta_debug_insns callers.
16723 * rtl.h (delete_vta_debug_insns): Declare.
16724 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
16725 instead of variable_tracking_main.
16726
16727 2018-01-03 Martin Sebor <msebor@redhat.com>
16728
16729 PR tree-optimization/83603
16730 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
16731 arguments past the endof the argument list in functions declared
16732 without a prototype.
16733 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
16734 Avoid checking when arguments are null.
16735
16736 2018-01-03 Martin Sebor <msebor@redhat.com>
16737
16738 PR c/83559
16739 * doc/extend.texi (attribute const): Fix a typo.
16740 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
16741 issuing -Wsuggest-attribute for void functions.
16742
16743 2018-01-03 Martin Sebor <msebor@redhat.com>
16744
16745 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
16746 offset_int::from instead of wide_int::to_shwi.
16747 (maybe_diag_overlap): Remove assertion.
16748 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
16749 * gimple-ssa-sprintf.c (format_directive): Same.
16750 (parse_directive): Same.
16751 (sprintf_dom_walker::compute_format_length): Same.
16752 (try_substitute_return_value): Same.
16753
16754 2018-01-03 Jeff Law <law@redhat.com>
16755
16756 PR middle-end/83654
16757 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
16758 non-constant residual for zero at runtime and avoid probing in
16759 that case. Reorganize code for trailing problem to mirror handling
16760 of the residual.
16761
16762 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16763
16764 PR tree-optimization/83501
16765 * tree-ssa-strlen.c (get_string_cst): New.
16766 (handle_char_store): Call get_string_cst.
16767
16768 2018-01-03 Martin Liska <mliska@suse.cz>
16769
16770 PR tree-optimization/83593
16771 * tree-ssa-strlen.c: Include tree-cfg.h.
16772 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
16773 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
16774 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
16775 to false.
16776 (strlen_dom_walker::before_dom_children): Call
16777 gimple_purge_dead_eh_edges. Dump tranformation with details
16778 dump flags.
16779 (strlen_dom_walker::before_dom_children): Update call by adding
16780 new argument cleanup_eh.
16781 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
16782
16783 2018-01-03 Martin Liska <mliska@suse.cz>
16784
16785 PR ipa/83549
16786 * cif-code.def (VARIADIC_THUNK): New enum value.
16787 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
16788 thunks.
16789
16790 2018-01-03 Jan Beulich <jbeulich@suse.com>
16791
16792 * sse.md (mov<mode>_internal): Tighten condition for when to use
16793 vmovdqu<ssescalarsize> for TI and OI modes.
16794
16795 2018-01-03 Jakub Jelinek <jakub@redhat.com>
16796
16797 Update copyright years.
16798
16799 2018-01-03 Martin Liska <mliska@suse.cz>
16800
16801 PR ipa/83594
16802 * ipa-visibility.c (function_and_variable_visibility): Skip
16803 functions with noipa attribure.
16804
16805 2018-01-03 Jakub Jelinek <jakub@redhat.com>
16806
16807 * gcc.c (process_command): Update copyright notice dates.
16808 * gcov-dump.c (print_version): Ditto.
16809 * gcov.c (print_version): Ditto.
16810 * gcov-tool.c (print_version): Ditto.
16811 * gengtype.c (create_file): Ditto.
16812 * doc/cpp.texi: Bump @copying's copyright year.
16813 * doc/cppinternals.texi: Ditto.
16814 * doc/gcc.texi: Ditto.
16815 * doc/gccint.texi: Ditto.
16816 * doc/gcov.texi: Ditto.
16817 * doc/install.texi: Ditto.
16818 * doc/invoke.texi: Ditto.
16819
16820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16821
16822 * vector-builder.h (vector_builder::m_full_nelts): Change from
16823 unsigned int to poly_uint64.
16824 (vector_builder::full_nelts): Update prototype accordingly.
16825 (vector_builder::new_vector): Likewise.
16826 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
16827 (vector_builder::operator ==): Likewise.
16828 (vector_builder::finalize): Likewise.
16829 * int-vector-builder.h (int_vector_builder::int_vector_builder):
16830 Take the number of elements as a poly_uint64 rather than an
16831 unsigned int.
16832 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
16833 from unsigned int to poly_uint64.
16834 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
16835 (vec_perm_indices::new_vector): Likewise.
16836 (vec_perm_indices::length): Likewise.
16837 (vec_perm_indices::nelts_per_input): Likewise.
16838 (vec_perm_indices::input_nelts): Likewise.
16839 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
16840 number of elements per input as a poly_uint64 rather than an
16841 unsigned int. Use the original encoding for variable-length
16842 vectors, rather than clamping each individual element.
16843 For the second and subsequent elements in each pattern,
16844 clamp the step and base before clamping their sum.
16845 (vec_perm_indices::series_p): Handle polynomial element counts.
16846 (vec_perm_indices::all_in_range_p): Likewise.
16847 (vec_perm_indices_to_tree): Likewise.
16848 (vec_perm_indices_to_rtx): Likewise.
16849 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
16850 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
16851 (tree_vector_builder::new_binary_operation): Handle polynomial
16852 element counts. Return false if we need to know the number
16853 of elements at compile time.
16854 * fold-const.c (fold_vec_perm): Punt if the number of elements
16855 isn't known at compile time.
16856
16857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16858
16859 * vec-perm-indices.h (vec_perm_builder): Change element type
16860 from HOST_WIDE_INT to poly_int64.
16861 (vec_perm_indices::element_type): Update accordingly.
16862 (vec_perm_indices::clamp): Handle polynomial element_types.
16863 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
16864 (vec_perm_indices::all_in_range_p): Likewise.
16865 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
16866 than shwi trees.
16867 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
16868 polynomial vec_perm_indices element types.
16869 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
16870 * fold-const.c (fold_vec_perm): Likewise.
16871 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
16872 * tree-vect-generic.c (lower_vec_perm): Likewise.
16873 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
16874 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
16875 element type to HOST_WIDE_INT.
16876
16877 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16878 Alan Hayward <alan.hayward@arm.com>
16879 David Sherwood <david.sherwood@arm.com>
16880
16881 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
16882 rather than an int. Use plus_constant.
16883 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
16884 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
16885
16886 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16887 Alan Hayward <alan.hayward@arm.com>
16888 David Sherwood <david.sherwood@arm.com>
16889
16890 * calls.c (emit_call_1, expand_call): Change struct_value_size from
16891 a HOST_WIDE_INT to a poly_int64.
16892
16893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16894 Alan Hayward <alan.hayward@arm.com>
16895 David Sherwood <david.sherwood@arm.com>
16896
16897 * calls.c (load_register_parameters): Cope with polynomial
16898 mode sizes. Require a constant size for BLKmode parameters
16899 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
16900 forces a parameter to be padded at the lsb end in order to
16901 fill a complete number of words, require the parameter size
16902 to be ordered wrt UNITS_PER_WORD.
16903
16904 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16905 Alan Hayward <alan.hayward@arm.com>
16906 David Sherwood <david.sherwood@arm.com>
16907
16908 * reload1.c (spill_stack_slot_width): Change element type
16909 from unsigned int to poly_uint64_pod.
16910 (alter_reg): Treat mode sizes as polynomial.
16911
16912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16913 Alan Hayward <alan.hayward@arm.com>
16914 David Sherwood <david.sherwood@arm.com>
16915
16916 * reload.c (complex_word_subreg_p): New function.
16917 (reload_inner_reg_of_subreg, push_reload): Use it.
16918
16919 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16920 Alan Hayward <alan.hayward@arm.com>
16921 David Sherwood <david.sherwood@arm.com>
16922
16923 * lra-constraints.c (process_alt_operands): Reject matched
16924 operands whose sizes aren't ordered.
16925 (match_reload): Refer to this check here.
16926
16927 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16928 Alan Hayward <alan.hayward@arm.com>
16929 David Sherwood <david.sherwood@arm.com>
16930
16931 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
16932 that the mode size is in the set {1, 2, 4, 8, 16}.
16933
16934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16935 Alan Hayward <alan.hayward@arm.com>
16936 David Sherwood <david.sherwood@arm.com>
16937
16938 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
16939 Use plus_constant instead of gen_rtx_PLUS.
16940
16941 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16942 Alan Hayward <alan.hayward@arm.com>
16943 David Sherwood <david.sherwood@arm.com>
16944
16945 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
16946 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
16947 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
16948 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
16949 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
16950 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
16951 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
16952 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
16953 * config/i386/i386.c (ix86_push_rounding): ...this new function.
16954 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
16955 a poly_int64.
16956 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
16957 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
16958 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
16959 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
16960 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
16961 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
16962 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
16963 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
16964 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
16965 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
16966 function.
16967 * expr.c (emit_move_resolve_push): Treat the input and result
16968 of PUSH_ROUNDING as a poly_int64.
16969 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
16970 (emit_push_insn): Likewise.
16971 * lra-eliminations.c (mark_not_eliminable): Likewise.
16972 * recog.c (push_operand): Likewise.
16973 * reload1.c (elimination_effects): Likewise.
16974 * rtlanal.c (nonzero_bits1): Likewise.
16975 * calls.c (store_one_arg): Likewise. Require the padding to be
16976 known at compile time.
16977
16978 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16979 Alan Hayward <alan.hayward@arm.com>
16980 David Sherwood <david.sherwood@arm.com>
16981
16982 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
16983 Use plus_constant instead of gen_rtx_PLUS.
16984
16985 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16986 Alan Hayward <alan.hayward@arm.com>
16987 David Sherwood <david.sherwood@arm.com>
16988
16989 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
16990 rather than an int.
16991
16992 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16993 Alan Hayward <alan.hayward@arm.com>
16994 David Sherwood <david.sherwood@arm.com>
16995
16996 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
16997 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
16998 via stack temporaries. Treat the mode size as polynomial too.
16999
17000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17001 Alan Hayward <alan.hayward@arm.com>
17002 David Sherwood <david.sherwood@arm.com>
17003
17004 * expr.c (expand_expr_real_2): When handling conversions involving
17005 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
17006 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
17007 as a poly_uint64 too.
17008
17009 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17010 Alan Hayward <alan.hayward@arm.com>
17011 David Sherwood <david.sherwood@arm.com>
17012
17013 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
17014
17015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17016 Alan Hayward <alan.hayward@arm.com>
17017 David Sherwood <david.sherwood@arm.com>
17018
17019 * combine.c (can_change_dest_mode): Handle polynomial
17020 REGMODE_NATURAL_SIZE.
17021 * expmed.c (store_bit_field_1): Likewise.
17022 * expr.c (store_constructor): Likewise.
17023 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
17024 and polynomial REGMODE_NATURAL_SIZE.
17025 (gen_lowpart_common): Likewise.
17026 * reginfo.c (record_subregs_of_mode): Likewise.
17027 * rtlanal.c (read_modify_subreg_p): Likewise.
17028
17029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17030 Alan Hayward <alan.hayward@arm.com>
17031 David Sherwood <david.sherwood@arm.com>
17032
17033 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
17034 numbers of elements.
17035
17036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17037 Alan Hayward <alan.hayward@arm.com>
17038 David Sherwood <david.sherwood@arm.com>
17039
17040 * match.pd: Cope with polynomial numbers of vector elements.
17041
17042 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17043 Alan Hayward <alan.hayward@arm.com>
17044 David Sherwood <david.sherwood@arm.com>
17045
17046 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
17047 in a POINTER_PLUS_EXPR.
17048
17049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17050 Alan Hayward <alan.hayward@arm.com>
17051 David Sherwood <david.sherwood@arm.com>
17052
17053 * omp-simd-clone.c (simd_clone_subparts): New function.
17054 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
17055 (ipa_simd_modify_function_body): Likewise.
17056
17057 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17058 Alan Hayward <alan.hayward@arm.com>
17059 David Sherwood <david.sherwood@arm.com>
17060
17061 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
17062 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
17063 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
17064 (expand_vector_condition, vector_element): Likewise.
17065 (subparts_gt): New function.
17066 (get_compute_type): Use subparts_gt.
17067 (count_type_subparts): Delete.
17068 (expand_vector_operations_1): Use subparts_gt instead of
17069 count_type_subparts.
17070
17071 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17072 Alan Hayward <alan.hayward@arm.com>
17073 David Sherwood <david.sherwood@arm.com>
17074
17075 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
17076 (vect_compile_time_alias): ...this new function. Do the calculation
17077 on poly_ints rather than trees.
17078 (vect_prune_runtime_alias_test_list): Update call accordingly.
17079
17080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17081 Alan Hayward <alan.hayward@arm.com>
17082 David Sherwood <david.sherwood@arm.com>
17083
17084 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
17085 numbers of units.
17086 (vect_schedule_slp_instance): Likewise.
17087
17088 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17089 Alan Hayward <alan.hayward@arm.com>
17090 David Sherwood <david.sherwood@arm.com>
17091
17092 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
17093 constant and extern definitions for variable-length vectors.
17094 (vect_get_constant_vectors): Note that the number of units
17095 is known to be constant.
17096
17097 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17098 Alan Hayward <alan.hayward@arm.com>
17099 David Sherwood <david.sherwood@arm.com>
17100
17101 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
17102 of units as polynomial. Choose between WIDE and NARROW based
17103 on multiple_p.
17104
17105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17106 Alan Hayward <alan.hayward@arm.com>
17107 David Sherwood <david.sherwood@arm.com>
17108
17109 * tree-vect-stmts.c (simd_clone_subparts): New function.
17110 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
17111
17112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17113 Alan Hayward <alan.hayward@arm.com>
17114 David Sherwood <david.sherwood@arm.com>
17115
17116 * tree-vect-stmts.c (vectorizable_call): Treat the number of
17117 vectors as polynomial. Use build_index_vector for
17118 IFN_GOMP_SIMD_LANE.
17119
17120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17121 Alan Hayward <alan.hayward@arm.com>
17122 David Sherwood <david.sherwood@arm.com>
17123
17124 * tree-vect-stmts.c (get_load_store_type): Treat the number of
17125 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
17126 for variable-length vectors.
17127 (vectorizable_mask_load_store): Treat the number of units as
17128 polynomial, asserting that it is constant if the condition has
17129 already been enforced.
17130 (vectorizable_store, vectorizable_load): Likewise.
17131
17132 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17133 Alan Hayward <alan.hayward@arm.com>
17134 David Sherwood <david.sherwood@arm.com>
17135
17136 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
17137 of units as polynomial. Punt if we can't tell at compile time
17138 which vector contains the final result.
17139
17140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17141 Alan Hayward <alan.hayward@arm.com>
17142 David Sherwood <david.sherwood@arm.com>
17143
17144 * tree-vect-loop.c (vectorizable_induction): Treat the number
17145 of units as polynomial. Punt on SLP inductions. Use an integer
17146 VEC_SERIES_EXPR for variable-length integer reductions. Use a
17147 cast of such a series for variable-length floating-point
17148 reductions.
17149
17150 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17151 Alan Hayward <alan.hayward@arm.com>
17152 David Sherwood <david.sherwood@arm.com>
17153
17154 * tree.h (build_index_vector): Declare.
17155 * tree.c (build_index_vector): New function.
17156 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
17157 of units as polynomial, forcibly converting it to a constant if
17158 vectorizable_reduction has already enforced the condition.
17159 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
17160 to create a {1,2,3,...} vector.
17161 (vectorizable_reduction): Treat the number of units as polynomial.
17162 Choose vectype_in based on the largest scalar element size rather
17163 than the smallest number of units. Enforce the restrictions
17164 relied on above.
17165
17166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17167 Alan Hayward <alan.hayward@arm.com>
17168 David Sherwood <david.sherwood@arm.com>
17169
17170 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
17171 number of units as polynomial.
17172
17173 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17174 Alan Hayward <alan.hayward@arm.com>
17175 David Sherwood <david.sherwood@arm.com>
17176
17177 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
17178 * target.def (autovectorize_vector_sizes): Return the vector sizes
17179 by pointer, using vector_sizes rather than a bitmask.
17180 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
17181 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
17182 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
17183 Likewise.
17184 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
17185 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
17186 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
17187 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
17188 * omp-general.c (omp_max_vf): Likewise.
17189 * omp-low.c (omp_clause_aligned_alignment): Likewise.
17190 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
17191 * tree-vect-loop.c (vect_analyze_loop): Likewise.
17192 * tree-vect-slp.c (vect_slp_bb): Likewise.
17193 * doc/tm.texi: Regenerate.
17194 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
17195 to a poly_uint64.
17196 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
17197 the vector size as a poly_uint64 rather than an unsigned int.
17198 (current_vector_size): Change from an unsigned int to a poly_uint64.
17199 (get_vectype_for_scalar_type): Update accordingly.
17200 * tree.h (build_truth_vector_type): Take the size and number of
17201 units as a poly_uint64 rather than an unsigned int.
17202 (build_vector_type): Add a temporary overload that takes
17203 the number of units as a poly_uint64 rather than an unsigned int.
17204 * tree.c (make_vector_type): Likewise.
17205 (build_truth_vector_type): Take the number of units as a poly_uint64
17206 rather than an unsigned int.
17207
17208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17209 Alan Hayward <alan.hayward@arm.com>
17210 David Sherwood <david.sherwood@arm.com>
17211
17212 * target.def (get_mask_mode): Take the number of units and length
17213 as poly_uint64s rather than unsigned ints.
17214 * targhooks.h (default_get_mask_mode): Update accordingly.
17215 * targhooks.c (default_get_mask_mode): Likewise.
17216 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17217 * doc/tm.texi: Regenerate.
17218
17219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17220 Alan Hayward <alan.hayward@arm.com>
17221 David Sherwood <david.sherwood@arm.com>
17222
17223 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
17224 * omp-general.c (omp_max_vf): Likewise.
17225 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
17226 (expand_omp_simd): Handle polynomial safelen.
17227 * omp-low.c (omplow_simd_context): Add a default constructor.
17228 (omplow_simd_context::max_vf): Change from int to poly_uint64.
17229 (lower_rec_simd_input_clauses): Update accordingly.
17230 (lower_rec_input_clauses): Likewise.
17231
17232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17233 Alan Hayward <alan.hayward@arm.com>
17234 David Sherwood <david.sherwood@arm.com>
17235
17236 * tree-vectorizer.h (vect_nunits_for_cost): New function.
17237 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
17238 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
17239 (vect_analyze_slp_cost): Likewise.
17240 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
17241 (vect_model_load_cost): Likewise.
17242
17243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17244 Alan Hayward <alan.hayward@arm.com>
17245 David Sherwood <david.sherwood@arm.com>
17246
17247 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
17248 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
17249 from an unsigned int * to a poly_uint64_pod *.
17250 (calculate_unrolling_factor): New function.
17251 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
17252
17253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17254 Alan Hayward <alan.hayward@arm.com>
17255 David Sherwood <david.sherwood@arm.com>
17256
17257 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
17258 from an unsigned int to a poly_uint64.
17259 (_loop_vec_info::slp_unrolling_factor): Likewise.
17260 (_loop_vec_info::vectorization_factor): Change from an int
17261 to a poly_uint64.
17262 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
17263 (vect_get_num_vectors): New function.
17264 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
17265 (vect_get_num_copies): Use vect_get_num_vectors.
17266 (vect_analyze_data_ref_dependences): Change max_vf from an int *
17267 to an unsigned int *.
17268 (vect_analyze_data_refs): Change min_vf from an int * to a
17269 poly_uint64 *.
17270 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17271 than an unsigned HOST_WIDE_INT.
17272 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
17273 (vect_analyze_data_ref_dependence): Change max_vf from an int *
17274 to an unsigned int *.
17275 (vect_analyze_data_ref_dependences): Likewise.
17276 (vect_compute_data_ref_alignment): Handle polynomial vf.
17277 (vect_enhance_data_refs_alignment): Likewise.
17278 (vect_prune_runtime_alias_test_list): Likewise.
17279 (vect_shift_permute_load_chain): Likewise.
17280 (vect_supportable_dr_alignment): Likewise.
17281 (dependence_distance_ge_vf): Take the vectorization factor as a
17282 poly_uint64 rather than an unsigned HOST_WIDE_INT.
17283 (vect_analyze_data_refs): Change min_vf from an int * to a
17284 poly_uint64 *.
17285 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
17286 vfm1 as a poly_uint64 rather than an int. Make the same change
17287 for the returned bound_scalar.
17288 (vect_gen_vector_loop_niters): Handle polynomial vf.
17289 (vect_do_peeling): Likewise. Update call to
17290 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
17291 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
17292 be constant.
17293 * tree-vect-loop.c (vect_determine_vectorization_factor)
17294 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
17295 (vect_get_known_peeling_cost): Likewise.
17296 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
17297 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
17298 (vect_transform_loop): Likewise. Use the lowest possible VF when
17299 updating the upper bounds of the loop.
17300 (vect_min_worthwhile_factor): Make static. Return an unsigned int
17301 rather than an int.
17302 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
17303 polynomial unroll factors.
17304 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
17305 (vect_make_slp_decision): Likewise.
17306 (vect_supported_load_permutation_p): Likewise, and polynomial
17307 vf too.
17308 (vect_analyze_slp_cost): Handle polynomial vf.
17309 (vect_slp_analyze_node_operations): Likewise.
17310 (vect_slp_analyze_bb_1): Likewise.
17311 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17312 than an unsigned HOST_WIDE_INT.
17313 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
17314 (vectorizable_load): Handle polynomial vf.
17315 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
17316 a poly_uint64.
17317 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
17318
17319 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17320 Alan Hayward <alan.hayward@arm.com>
17321 David Sherwood <david.sherwood@arm.com>
17322
17323 * match.pd: Handle bit operations involving three constants
17324 and try to fold one pair.
17325
17326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17327
17328 * tree-vect-loop-manip.c: Include gimple-fold.h.
17329 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
17330 niters_maybe_zero parameters. Handle other cases besides a step of 1.
17331 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
17332 Add a path that uses a step of VF instead of 1, but disable it
17333 for now.
17334 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
17335 and niters_no_overflow parameters. Update calls to
17336 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
17337 Create a new SSA name if the latter choses to use a ste other
17338 than zero, and return it via niters_vector_mult_vf_var.
17339 * tree-vect-loop.c (vect_transform_loop): Update calls to
17340 vect_do_peeling, vect_gen_vector_loop_niters and
17341 slpeel_make_loop_iterate_ntimes.
17342 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
17343 (vect_gen_vector_loop_niters): Update declarations after above changes.
17344
17345 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
17346
17347 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
17348 128-bit round to integer instructions.
17349 (ceil<mode>2): Likewise.
17350 (btrunc<mode>2): Likewise.
17351 (round<mode>2): Likewise.
17352
17353 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17354
17355 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
17356 unaligned VSX load/store on P8/P9.
17357 (expand_block_clear): Allow the use of unaligned VSX
17358 load/store on P8/P9.
17359
17360 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17361
17362 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
17363 New function.
17364 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
17365 swap associated with both a load and a store.
17366
17367 2018-01-02 Andrew Waterman <andrew@sifive.com>
17368
17369 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
17370 * config/riscv/riscv.md (clear_cache): Use it.
17371
17372 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
17373
17374 * web.c: Remove out-of-date comment.
17375
17376 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17377
17378 * expr.c (fixup_args_size_notes): Check that any existing
17379 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
17380 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
17381 (emit_single_push_insn): ...here.
17382
17383 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17384
17385 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
17386 (const_vector_encoded_nelts): New function.
17387 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
17388 (const_vector_int_elt, const_vector_elt): Declare.
17389 * emit-rtl.c (const_vector_int_elt_1): New function.
17390 (const_vector_elt): Likewise.
17391 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
17392 of CONST_VECTOR_ELT.
17393
17394 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17395
17396 * expr.c: Include rtx-vector-builder.h.
17397 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
17398 directly on the tree encoding.
17399 (const_vector_from_tree): Likewise.
17400 * optabs.c: Include rtx-vector-builder.h.
17401 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
17402 sequence of "u" values.
17403 * vec-perm-indices.c: Include rtx-vector-builder.h.
17404 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
17405 directly on the vec_perm_indices encoding.
17406
17407 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17408
17409 * doc/rtl.texi (const_vector): Describe new encoding scheme.
17410 * Makefile.in (OBJS): Add rtx-vector-builder.o.
17411 * rtx-vector-builder.h: New file.
17412 * rtx-vector-builder.c: Likewise.
17413 * rtl.h (rtx_def::u2): Add a const_vector field.
17414 (CONST_VECTOR_NPATTERNS): New macro.
17415 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
17416 (CONST_VECTOR_DUPLICATE_P): Likewise.
17417 (CONST_VECTOR_STEPPED_P): Likewise.
17418 (CONST_VECTOR_ENCODED_ELT): Likewise.
17419 (const_vec_duplicate_p): Check for a duplicated vector encoding.
17420 (unwrap_const_vec_duplicate): Likewise.
17421 (const_vec_series_p): Check for a non-duplicated vector encoding.
17422 Say that the function only returns true for integer vectors.
17423 * emit-rtl.c: Include rtx-vector-builder.h.
17424 (gen_const_vec_duplicate_1): Delete.
17425 (gen_const_vector): Call gen_const_vec_duplicate instead of
17426 gen_const_vec_duplicate_1.
17427 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
17428 (gen_const_vec_duplicate): Use rtx_vector_builder.
17429 (gen_const_vec_series): Likewise.
17430 (gen_rtx_CONST_VECTOR): Likewise.
17431 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
17432 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17433 Build a new vector rather than modifying a CONST_VECTOR in-place.
17434 (handle_special_swappables): Update call accordingly.
17435 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
17436 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17437 Build a new vector rather than modifying a CONST_VECTOR in-place.
17438 (handle_special_swappables): Update call accordingly.
17439
17440 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17441
17442 * simplify-rtx.c (simplify_const_binary_operation): Use
17443 CONST_VECTOR_ELT instead of XVECEXP.
17444
17445 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17446
17447 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
17448 the selector elements to be different from the data elements
17449 if the selector is a VECTOR_CST.
17450 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
17451 ssizetype for the selector.
17452
17453 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17454
17455 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
17456 before testing each element individually.
17457 * tree-vect-generic.c (lower_vec_perm): Likewise.
17458
17459 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17460
17461 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
17462 * selftest-run-tests.c (selftest::run_tests): Call it.
17463 * vector-builder.h (vector_builder::operator ==): New function.
17464 (vector_builder::operator !=): Likewise.
17465 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
17466 (vec_perm_indices::all_from_input_p): New function.
17467 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17468 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
17469 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
17470 instead of reading the VECTOR_CST directly. Detect whether both
17471 vector inputs are the same before constructing the vec_perm_indices,
17472 and update the number of inputs argument accordingly. Use the
17473 utility functions added above. Only construct sel2 if we need to.
17474
17475 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17476
17477 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
17478 the broadcast of the low byte.
17479 (expand_mult_highpart): Use an explicit encoding for the permutes.
17480 * optabs-query.c (can_mult_highpart_p): Likewise.
17481 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
17482 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17483 (vectorizable_bswap): Likewise.
17484 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
17485 explicit encoding for the power-of-2 permutes.
17486 (vect_permute_store_chain): Likewise.
17487 (vect_grouped_load_supported): Likewise.
17488 (vect_permute_load_chain): Likewise.
17489
17490 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17491
17492 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
17493 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
17494 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
17495 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17496 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
17497 (vect_gen_perm_mask_any): Likewise.
17498
17499 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17500
17501 * int-vector-builder.h: New file.
17502 * vec-perm-indices.h: Include int-vector-builder.h.
17503 (vec_perm_indices): Redefine as an int_vector_builder.
17504 (auto_vec_perm_indices): Delete.
17505 (vec_perm_builder): Redefine as a stand-alone class.
17506 (vec_perm_indices::vec_perm_indices): New function.
17507 (vec_perm_indices::clamp): Likewise.
17508 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
17509 (vec_perm_indices::new_vector): New function.
17510 (vec_perm_indices::new_expanded_vector): Update for new
17511 vec_perm_indices class.
17512 (vec_perm_indices::rotate_inputs): New function.
17513 (vec_perm_indices::all_in_range_p): Operate directly on the
17514 encoded form, without computing elided elements.
17515 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
17516 encoding. Update for new vec_perm_indices class.
17517 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
17518 the given vec_perm_builder.
17519 (expand_vec_perm_var): Update vec_perm_builder constructor.
17520 (expand_mult_highpart): Use vec_perm_builder instead of
17521 auto_vec_perm_indices.
17522 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
17523 vec_perm_indices instead of auto_vec_perm_indices. Use a single
17524 or double series encoding as appropriate.
17525 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
17526 vec_perm_indices instead of auto_vec_perm_indices.
17527 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17528 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17529 (vect_permute_store_chain): Likewise.
17530 (vect_grouped_load_supported): Likewise.
17531 (vect_permute_load_chain): Likewise.
17532 (vect_shift_permute_load_chain): Likewise.
17533 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17534 (vect_transform_slp_perm_load): Likewise.
17535 (vect_schedule_slp_instance): Likewise.
17536 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17537 (vectorizable_mask_load_store): Likewise.
17538 (vectorizable_bswap): Likewise.
17539 (vectorizable_store): Likewise.
17540 (vectorizable_load): Likewise.
17541 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
17542 vec_perm_indices instead of auto_vec_perm_indices. Use
17543 tree_to_vec_perm_builder to read the vector from a tree.
17544 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
17545 vec_perm_builder instead of a vec_perm_indices.
17546 (have_whole_vector_shift): Use vec_perm_builder and
17547 vec_perm_indices instead of auto_vec_perm_indices. Leave the
17548 truncation to calc_vec_perm_mask_for_shift.
17549 (vect_create_epilog_for_reduction): Likewise.
17550 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
17551 from auto_vec_perm_indices to vec_perm_indices.
17552 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17553 instead of changing individual elements.
17554 (aarch64_vectorize_vec_perm_const): Use new_vector to install
17555 the vector in d.perm.
17556 * config/arm/arm.c (expand_vec_perm_d::perm): Change
17557 from auto_vec_perm_indices to vec_perm_indices.
17558 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17559 instead of changing individual elements.
17560 (arm_vectorize_vec_perm_const): Use new_vector to install
17561 the vector in d.perm.
17562 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
17563 Update vec_perm_builder constructor.
17564 (rs6000_expand_interleave): Likewise.
17565 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
17566 (rs6000_expand_interleave): Likewise.
17567
17568 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17569
17570 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
17571 to qimode could truncate the indices.
17572 * optabs.c (expand_vec_perm_var): Likewise.
17573
17574 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17575
17576 * Makefile.in (OBJS): Add vec-perm-indices.o.
17577 * vec-perm-indices.h: New file.
17578 * vec-perm-indices.c: Likewise.
17579 * target.h (vec_perm_indices): Replace with a forward class
17580 declaration.
17581 (auto_vec_perm_indices): Move to vec-perm-indices.h.
17582 * optabs.h: Include vec-perm-indices.h.
17583 (expand_vec_perm): Delete.
17584 (selector_fits_mode_p, expand_vec_perm_var): Declare.
17585 (expand_vec_perm_const): Declare.
17586 * target.def (vec_perm_const_ok): Replace with...
17587 (vec_perm_const): ...this new hook.
17588 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
17589 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
17590 * doc/tm.texi: Regenerate.
17591 * optabs.def (vec_perm_const): Delete.
17592 * doc/md.texi (vec_perm_const): Likewise.
17593 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
17594 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
17595 expand_vec_perm for constant permutation vectors. Assert that
17596 the mode of variable permutation vectors is the integer equivalent
17597 of the mode that is being permuted.
17598 * optabs-query.h (selector_fits_mode_p): Declare.
17599 * optabs-query.c: Include vec-perm-indices.h.
17600 (selector_fits_mode_p): New function.
17601 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
17602 is defined, instead of checking whether the vec_perm_const_optab
17603 exists. Use targetm.vectorize.vec_perm_const instead of
17604 targetm.vectorize.vec_perm_const_ok. Check whether the indices
17605 fit in the vector mode before using a variable permute.
17606 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
17607 vec_perm_indices instead of an rtx.
17608 (expand_vec_perm): Replace with...
17609 (expand_vec_perm_const): ...this new function. Take the selector
17610 as a vec_perm_indices rather than an rtx. Also take the mode of
17611 the selector. Update call to shift_amt_for_vec_perm_mask.
17612 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
17613 Use vec_perm_indices::new_expanded_vector to expand the original
17614 selector into bytes. Check whether the indices fit in the vector
17615 mode before using a variable permute.
17616 (expand_vec_perm_var): Make global.
17617 (expand_mult_highpart): Use expand_vec_perm_const.
17618 * fold-const.c: Includes vec-perm-indices.h.
17619 * tree-ssa-forwprop.c: Likewise.
17620 * tree-vect-data-refs.c: Likewise.
17621 * tree-vect-generic.c: Likewise.
17622 * tree-vect-loop.c: Likewise.
17623 * tree-vect-slp.c: Likewise.
17624 * tree-vect-stmts.c: Likewise.
17625 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
17626 Delete.
17627 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
17628 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
17629 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
17630 (aarch64_vectorize_vec_perm_const): ...this new function.
17631 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17632 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17633 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
17634 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
17635 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17636 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17637 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
17638 into...
17639 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
17640 check for NEON modes.
17641 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
17642 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
17643 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
17644 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
17645 into...
17646 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
17647 the old VEC_PERM_CONST conditions.
17648 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
17649 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
17650 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
17651 (ia64_vectorize_vec_perm_const_ok): Merge into...
17652 (ia64_vectorize_vec_perm_const): ...this new function.
17653 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
17654 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
17655 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
17656 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
17657 * config/mips/mips.c (mips_expand_vec_perm_const)
17658 (mips_vectorize_vec_perm_const_ok): Merge into...
17659 (mips_vectorize_vec_perm_const): ...this new function.
17660 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
17661 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
17662 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
17663 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
17664 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
17665 (rs6000_expand_vec_perm_const): Delete.
17666 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
17667 Delete.
17668 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17669 (altivec_expand_vec_perm_const_le): Take each operand individually.
17670 Operate on constant selectors rather than rtxes.
17671 (altivec_expand_vec_perm_const): Likewise. Update call to
17672 altivec_expand_vec_perm_const_le.
17673 (rs6000_expand_vec_perm_const): Delete.
17674 (rs6000_vectorize_vec_perm_const_ok): Delete.
17675 (rs6000_vectorize_vec_perm_const): New function.
17676 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17677 an element count and rtx array.
17678 (rs6000_expand_extract_even): Update call accordingly.
17679 (rs6000_expand_interleave): Likewise.
17680 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
17681 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
17682 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
17683 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
17684 (rs6000_expand_vec_perm_const): Delete.
17685 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17686 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17687 (altivec_expand_vec_perm_const_le): Take each operand individually.
17688 Operate on constant selectors rather than rtxes.
17689 (altivec_expand_vec_perm_const): Likewise. Update call to
17690 altivec_expand_vec_perm_const_le.
17691 (rs6000_expand_vec_perm_const): Delete.
17692 (rs6000_vectorize_vec_perm_const_ok): Delete.
17693 (rs6000_vectorize_vec_perm_const): New function. Remove stray
17694 reference to the SPE evmerge intructions.
17695 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17696 an element count and rtx array.
17697 (rs6000_expand_extract_even): Update call accordingly.
17698 (rs6000_expand_interleave): Likewise.
17699 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
17700 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
17701 new function.
17702 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17703
17704 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17705
17706 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
17707 vector mode and that that mode matches the mode of the data
17708 being permuted.
17709 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
17710 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
17711 directly using expand_vec_perm_1 when forcing selectors into
17712 registers.
17713 (expand_vec_perm_var): New function, split out from expand_vec_perm.
17714
17715 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17716
17717 * optabs-query.h (can_vec_perm_p): Delete.
17718 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
17719 * optabs-query.c (can_vec_perm_p): Split into...
17720 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
17721 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
17722 particular selector is valid.
17723 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17724 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17725 (vect_grouped_load_supported): Likewise.
17726 (vect_shift_permute_load_chain): Likewise.
17727 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17728 (vect_transform_slp_perm_load): Likewise.
17729 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17730 (vectorizable_bswap): Likewise.
17731 (vect_gen_perm_mask_checked): Likewise.
17732 * fold-const.c (fold_ternary_loc): Likewise. Don't take
17733 implementations of variable permutation vectors into account
17734 when deciding which selector to use.
17735 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
17736 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
17737 with a false third argument.
17738 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
17739 to test whether the constant selector is valid and can_vec_perm_var_p
17740 to test whether a variable selector is valid.
17741
17742 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17743
17744 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
17745 * optabs-query.c (can_vec_perm_p): Likewise.
17746 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
17747 instead of vec_perm_indices.
17748 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
17749 (vect_gen_perm_mask_checked): Likewise,
17750 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
17751 (vect_gen_perm_mask_checked): Likewise,
17752
17753 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
17754
17755 * optabs-query.h (qimode_for_vec_perm): Declare.
17756 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
17757 (qimode_for_vec_perm): ...this new function.
17758 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
17759
17760 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17761
17762 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
17763 does not have a conditional at the top.
17764
17765 2018-01-02 Richard Biener <rguenther@suse.de>
17766
17767 * ipa-inline.c (big_speedup_p): Fix expression.
17768
17769 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
17770
17771 PR target/81616
17772 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
17773 for generic 4->6.
17774
17775 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
17776
17777 PR target/81616
17778 Generic tuning.
17779 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
17780 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
17781 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
17782 cond_taken_branch_cost 3->4.
17783
17784 2018-01-01 Jakub Jelinek <jakub@redhat.com>
17785
17786 PR tree-optimization/83581
17787 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
17788 TODO_cleanup_cfg if any changes have been made.
17789
17790 PR middle-end/83608
17791 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
17792 convert_modes if target mode has the right side, but different mode
17793 class.
17794
17795 PR middle-end/83609
17796 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
17797 last argument when extracting from CONCAT. If either from_real or
17798 from_imag is NULL, use expansion through memory. If result is not
17799 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
17800 the parts directly to inner mode, if even that fails, use expansion
17801 through memory.
17802
17803 PR middle-end/83623
17804 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
17805 check for bswap in mode rather than HImode and use that in expand_unop
17806 too.
17807 \f
17808 Copyright (C) 2018 Free Software Foundation, Inc.
17809
17810 Copying and distribution of this file, with or without modification,
17811 are permitted in any medium without royalty provided the copyright
17812 notice and this notice are preserved.