e0eedf712bad602e3904b979b89e1d20fd645772
[gcc.git] / gcc / ChangeLog
1 2018-11-21 Renlin Li <renlin.li@arm.com>
2
3 PR middle-end/84877
4 * explow.h (get_dynamic_stack_size): Declare it as external.
5 * explow.c (record_new_stack_level): Remove function static attribute.
6 * function.c (assign_stack_local_1): Dynamically align the stack slot
7 addr for parameter copy on the stack.
8
9 2018-11-21 Richard Biener <rguenther@suse.de>
10
11 PR bootstrap/88133
12 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
13 * Makefile.in (bitmap.o-warn): Remove again.
14
15 2018-11-20 Jeff Law <law@redhat.com>
16
17 PR tree-optimization/88069
18 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
19 degenerate virtual PHIs.
20
21 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
22
23 PR target/87317
24 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
25 nonimmediate_operand with register_operand.
26 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
27 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
28 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
29 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
30 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
31 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
32 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
33 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
34 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
35 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
36 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
37 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
38 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
39 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
40 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
41 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
42 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
43 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
44 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
45 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
46 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
47 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
48 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
49 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
50 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
51 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
52 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
53
54 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
55
56 * read-rtl.c (apply_subst_iterator): Handle define_split and
57 define_insn_and_split.
58
59 2018-11-21 Jakub Jelinek <jakub@redhat.com>
60
61 PR rtl-optimization/87817
62 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
63 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
64 in the pattern to avoid triggering UB when operands[2] is zero.
65 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
66 (*tbm_bextri_<mode>): ... this.
67
68 2018-11-21 Tom de Vries <tdevries@suse.de>
69
70 PR driver/79855
71 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
72 period.
73
74 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
75
76 * configure.ac: Add check for Binutils to determine whether vector
77 load/store alignments hints are being supported.
78 * config.in: Regenerate.
79 * configure: Regenerate.
80 * config/s390/s390.c (print_operand): Support new output
81 modifier A.
82 * config/s390/s390.md ("movti"): Append alignment hint output
83 using the new output modifier 'A'.
84 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
85 ("*vec_ti_to_v1ti"): Likewise.
86
87 2018-11-20 Martin Sebor <msebor@redhat.com>
88
89 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
90
91 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
92
93 PR lto/84044
94 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
95 compare ENUM values.
96
97 2018-11-20 Jakub Jelinek <jakub@redhat.com>
98
99 PR tree-optimization/87895
100 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
101 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
102 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
103 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
104 has any preds and always use EDGE_PRED (, 0).
105
106 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
107
108 PR target/88070
109 * mode-switching.c (create_pre_exit): After reload, always split the
110 fallthrough edge to the exit block.
111
112 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
113
114 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
115 * tree.c (build_array_type_1): Forward declare.
116 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
117 (fld_type_variant): Likewise.
118 (fld_simplified_types): New hash.
119 (fld_process_array_type): New function.
120 (fld_incomplete_type_of): Handle array and enumeration types.
121 (fld_simplified_type): Handle simplification of arrays.
122 (free_lang_data): Allocate and free simplified types hash.
123
124 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
125
126 PR lto/87957
127 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
128 when sybtype already violates ODR.
129 (get_odr_type): Do not ICE when insert is false and type duplicate
130 is not registered yet.
131 (register_odr_type): Be sure to register subtypes first.
132
133 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
134
135 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
136 DImode parts of the target operand.
137
138 2018-11-20 Nathan Sidwell <nathan@acm.org>
139
140 PR 87926
141 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
142
143 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
144
145 PR lto/87997
146 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
147 type checking to...
148 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
149
150 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
151
152 PR ipa/87706
153 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
154 * ipa.c (possible_inline_candidate_p): Break out from ..
155 (process_references): ... here ; drop before_inlining_p;
156 cleanup handling of alises.
157 (walk_polymorphic_call_targets): Likewise.
158 (symbol_table::remove_unreachable_nodes): Likewise.
159 * passes.c (pass_data_ipa_remove_symbols): New structure.
160 (pass_ipa_remove_symbols): New pass.
161 (make_pass_ipa_remove_symbols): New function.
162 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
163 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
164
165 2018-11-20 Richard Biener <rguenther@suse.de>
166
167 * tree-vect-stmts.c (vectorizable_condition): Do not get
168 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
169 pointless vect_is_simple_use calls.
170
171 2018-11-20 Richard Biener <rguenther@suse.de>
172
173 PR tree-optimization/88074
174 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
175 backedges.
176
177 2018-11-20 Richard Biener <rguenther@suse.de>
178
179 PR tree-optimization/88069
180 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
181 virtual PHI arguments.
182
183 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
184
185 PR target/88083
186 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
187 involved.
188 * rtl.h (contains_constant_pool_address_p): New function.
189 * rtlanal.c (contains_constant_pool_address_p): Likewise.
190
191 2018-11-20 Richard Biener <rguenther@suse.de>
192
193 PR middle-end/83215
194 * alias.c (component_uses_parent_alias_set_from): Remove
195 alias-set zero and TYPE_TYPELESS_STORAGE case both already
196 handled in other ways.
197
198 2018-11-20 Richard Biener <rguenther@suse.de>
199
200 PR tree-optimization/88087
201 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
202 call fntype.
203 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
204 call fntype.
205
206 2018-11-20 Richard Biener <rguenther@suse.de>
207
208 PR middle-end/88089
209 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
210
211 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
212
213 PR lto/87957
214 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
215
216 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
217
218 PR driver/50250
219 * doc/invoke.texi (Link Options): Mention shared libraries
220 in documentation for the -l option. Simplify discussion and
221 point to the system linker documentation for details.
222
223 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
224
225 PR rtl-optimization/88033
226 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
227 to itself. Use HARD_REGISTER_NUM_P.
228
229 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
230
231 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
232 of the loop if vf is non-constant.
233
234 2018-11-19 David Malcolm <dmalcolm@redhat.com>
235
236 PR tree-optimization/87025
237 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
238 immediately after creating the scope optinfo.
239 (selftest::test_pr87025): New function.
240 (selftest::dumpfile_c_tests): Call it.
241 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
242 that we're not popping the top-level records array.
243 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
244 not changing the kind of a "scope" optinfo.
245
246 2018-11-19 David Malcolm <dmalcolm@redhat.com>
247
248 PR tree-optimization/87025
249 * dump-context.h: Include "optinfo.h".
250 (class optrecord_json_writer): New forward decl.
251 (dump_context::forcibly_enable_optinfo_p): Delete.
252 (dump_context::optinfo_enabled_p): New member function.
253 (dump_context::optimization_records_enabled_p): New member
254 function.
255 (dump_context::set_json_writer): New member function.
256 (dump_context::emit_optinfo): New member function.
257 (dump_context::m_forcibly_enable_optinfo): Delete.
258 (dump_context::m_json_writer): New member data.
259 * dumpfile.c (dump_context::set_json_writer): New member function.
260 (dump_context::finish_any_json_writer): New member function.
261 (dump_context::end_scope): Replace call to
262 optimization_records_maybe_pop_dump_scope with call to
263 m_json_writer->pop_scope.
264 (dump_context::optinfo_enabled_p): New member function.
265 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
266 to dump_context::emit_optinfo.
267 (dump_context::emit_optinfo): New member function.
268 (temp_dump_context::temp_dump_context): Replace
269 m_forcibly_enable_optinfo with call to set_json_writer.
270 (temp_dump_context::~temp_dump_context): Clean up any json writer.
271 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
272 optinfo-emit-json.h
273 (the_json_writer): Delete.
274 (optimization_records_start): Delete.
275 (optimization_records_finish): Delete.
276 (optimization_records_enabled_p): Delete, in favor of
277 dump_context::optimization_records_enabled_p.
278 (optimization_records_maybe_record_optinfo): Delete.
279 (optimization_records_maybe_pop_dump_scope): Delete.
280 * optinfo-emit-json.h: Include "json.h". Delete forward
281 decl of opt_pass.
282 (optimization_records_start): Delete.
283 (optimization_records_finish): Delete.
284 (optimization_records_enabled_p): Delete.
285 (optimization_records_maybe_record_optinfo): Delete.
286 (optimization_records_maybe_pop_dump_scope): Delete.
287 (class optrecord_json_writer): Move here from
288 optinfo-emit-json.cc.
289 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
290 to optinfo::emit with call to dump_context::emit_optinfo.
291 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
292 (optinfo_enabled_p): Delete, in favor of
293 dump_context::optinfo_enabled_p.
294 (optinfo_wants_inlining_info_p): Update for conversion o
295 optimization_records_enabled_p to a member function of
296 dump_context.
297 * optinfo.h (optinfo_enabled_p): Delete, in favor of
298 dump_context::optinfo_enabled_p.
299 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
300 * toplev.c: Include "dump-context.h".
301 (compile_file): Replace call to optimization_records_finish with
302 dump_context::finish_any_json_writer.
303 (do_compile): Replace call to optimization_records_start with
304 conditionally creating a optrecord_json_writer for the
305 dump_context.
306
307 2018-11-19 Jakub Jelinek <jakub@redhat.com>
308
309 PR tree-optimization/88071
310 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
311 of false as last argument to gsi_remove.
312 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
313 false as last argument to gsi_replace.
314
315 PR debug/87039
316 * omp-expand.c: Don't include debug.h.
317 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
318 from innermost outer parallel, task, teams or target that has a
319 child_fn set, or, if there is no such outer region, use
320 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
321 whether a suitable BLOCK is found or not.
322 (expand_parallel_call, expand_teams_call): Don't call
323 adjust_context_and_scope here.
324 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
325 (expand_omp_taskreg, expand_omp_target): Likewise. Call
326 adjust_context_and_scope.
327 * dwarf2out.c (dwarf2out_early_global_decl): For
328 decl_function_context recurse instead of calling dwarf2out_decl.
329
330 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
331
332 PR rtl-optimization/85925
333 * rtl.h (word_register_operation_p): New predicate.
334 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
335 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
336 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
337 (num_sign_bit_copies1): Likewise.
338
339 2018-11-19 Richard Biener <rguenther@suse.de>
340
341 PR lto/87229
342 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
343 sizepos values.
344
345 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
346
347 * compare-elim.c (struct comparison): Add not_in_a field.
348 (is_not): New static function.
349 (strip_not): Likewise.
350 (conforming_compare): Handle a NOT in the first operand.
351 (can_eliminate_compare): Likewise.
352 (find_comparison_dom_walker::before_dom_children): Likewise.
353 (try_eliminate_compare): Likewise.
354 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
355 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
356
357 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
358
359 * doc/extend.texi (Common Type Attributes): Fix typos.
360
361 2018-11-19 Martin Liska <mliska@suse.cz>
362
363 PR gcov-profile/88045
364 * coverage.c (coverage_begin_function): Add assert.
365
366 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
367
368 PR other/40498
369 * doc/extend.texi (Common Function Attributes): Document that
370 no_instrument_function applies to -p and -pg, too.
371 * doc/invoke.texi (Instrumentation Options): Add cross-references
372 to docs for -p, -pg, and -finstrument-functions.
373
374 2018-11-18 Alan Modra <amodra@gmail.com>
375
376 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
377 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
378 (GNU_USER_TARGET_CRTN): Define.
379 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
380 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
381
382 2018-11-18 Alan Modra <amodra@gmail.com>
383
384 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
385 !HAVE_LD_PIE variant.
386 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
387
388 2018-11-17 Nick Clifton <nickc@redhat.com>
389 Sandra Loosemore <sandra@codesourcery.com>
390
391 PR driver/31357
392 * doc/invoke.texi (Overall Options): Document that --help and
393 --help=<value> options cannot be combined.
394
395 2018-11-17 Jim Wilson <jimw@sifive.com>
396
397 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
398 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
399 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
400 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
401 to step2 if frame_pointer_needed and step1 is 0.
402
403 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
404
405 PR c++/4225
406 * doc/cpp.texi (System Headers): Add note about implicit
407 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
408
409 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
410
411 PR c++/4025
412 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
413 -fno-implicit-templates.
414
415 2018-11-17 Jakub Jelinek <jakub@redhat.com>
416
417 PR tree-optimization/87546
418 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
419 min_precision variable, initially set it to orig_precision, only does
420 something if op_type's precision is <= min_precision and update
421 min_precision whenever calling set_op.
422
423 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
424
425 PR ipa/87957
426 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
427
428 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
429
430 * doc/invoke.texi (Option Summary): Fix whitespace and line
431 breaks in @gccoptlist environments.
432 (Warning Options): Likewise.
433 (Optimize Options): Likewise.
434 (PowerPC SPE Options): Likewise.
435 (RS/6000 and PowerPC Options): Likewise.
436
437 2018-11-16 Jeff Law <law@redhat.com>
438
439 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
440 gcc_assert.
441
442 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
443
444 PR middle-end/23197
445 * doc/invoke.texi (Optimize Options): Update options enabled by
446 fprofile-generate, -fprofile-use, and -fauto-profile.
447
448 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
449
450 PR target/87927
451 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
452 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
453 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
454 the byte_op hook.
455 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
456 * targhooks.c (default_print_patchable_function_entry): Assert
457 asm_int_op does not return a NULL string.
458 * varasm.c (integer_asm_op): Return the op for a partial int type
459 when the requested size does not correspond to an integer type.
460 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
461 * doc/tm.texi: Regenerate.
462
463 2018-11-12 Jason Merrill <jason@redhat.com>
464
465 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
466
467 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
468
469 * config/rs6000/constraints.md (wF constraint): Remove power9
470 fusion documentation. Just document wF's use for power8 fusion.
471 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
472 (fusion_gpr_addis): Delete power9 fusion support. Change power8
473 fusion support to require the upper 12 bits to be all 0's or all
474 1's.
475 (fusion_gpr_mem_load): Add comment.
476 (fusion_addis_mem_combo_load): Remove power9 fusion support.
477 (fusion_addis_mem_combo_store): Delete.
478 (fusion_offsettable_mem_operand): Delete.
479 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
480 power8 fusion here.
481 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
482 (POWERPC_MASKS): Delete power9 fusion.
483 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
484 (fusion_p9_p): Delete.
485 (expand_fusion_p9_load): Delete.
486 (expand_fusion_p9_store): Delete.
487 (emit_fusion_p9_load): Delete.
488 (emit_fusion_p9_store): Delete.
489 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
490 fusion support.
491 (rs6000_option_override_internal): Set power8 fusion based on
492 whether we are tuning for power8. Delete power9 fusion support.
493 (rs6000_opt_masks): Delete -mpower9-fusion switch.
494 (emit_fusion_load): Rename emit_fusion_load_store to
495 emit_fusion_load, and drop fusion store support. Update callers.
496 (emit_fusion_load_store): Likewise.
497 (emit_fusion_gpr_load): Likewise.
498 (fusion_p9_p): Delete.
499 (expand_fusion_p9_load): Delete.
500 (expand_fusion_p9_store): Delete.
501 (emit_fusion_p9_load): Delete.
502 (emit_fusion_p9_store): Delete.
503 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
504 (GPR_FUSION): Delete.
505 (FPR_FUSION): Delete.
506 (power9 fusion peephole2s): Delete.
507 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
508 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
509 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
510 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
511 (fusion_p9_<mode>_constant): Delete.
512 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
513 power9 fusion switch.
514 * doc/md.texi (PowerPC constraints): Update wF constraint
515 documentation for power8 fusion only.
516
517 2018-11-16 Jakub Jelinek <jakub@redhat.com>
518
519 PR rtl-optimization/87475
520 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
521 CROSSING_JUMP_P insns.
522 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
523
524 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
525
526 PR target/88051
527 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
528 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
529 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
530
531 2018-11-16 Jakub Jelinek <jakub@redhat.com>
532
533 PR middle-end/88032
534 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
535 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
536
537 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
538
539 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
540 location_t parameter.
541 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
542 (switch_decision_tree::do_jump_if_equal): Likewise.
543 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
544 of switch statement to emit_case_nodes.
545 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
546 set it on the newly built GIMPLE comparison statement.
547 (switch_decision_tree::do_jump_if_equal): Likewise.
548 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
549 in calls to do_jump_if_equal as well as recursive calls.
550
551 2018-11-16 Andi Kleen <ak@linux.intel.com>
552
553 * config/i386/i386.md: Allow memory operands to ptwrite.
554
555 2018-11-16 Michael Matz <matz@suse.de>
556
557 * system.h (PRsa): New macro.
558 (SIZE_AMOUNT): Cast number to uint64_t.
559 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
560 (pool_usage::dump_footer): Likewise and also use PRIu64.
561 * bitmap.h (bitmap_usage::dump): Likewise.
562 * ggc-common.c (ggc_usage::dump): Likewise.
563 * ggc-page.c (ggc_print_statistics): Likewise.
564 * input.c (dump_line_table_statistics): Likewise.
565 * mem-stats.h (mem_usage::dump): Likewise.
566 (mem_usage::dump_footer): Likewise.
567 * rtl.c (dump_rtx_statistics): Likewise.
568 * tree-cfg.c (dump_cfg_stats): Likewise.
569 * tree-dfa.c (dump_dfa_stats): Likewise.
570 * tree-phinodes.c (phinodes_print_statistics): Likewise.
571 * tree-ssanames (ssanames_print_statistics): Likewise.
572 * vec.c (vec_usage::dump): Likewise.
573 (vec_usage::dump_footer): Likewise.
574
575 2018-11-16 Richard Biener <rguenther@suse.de>
576
577 PR tree-optimization/88011
578 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
579 replacing set_value_range_to_undefined and
580 set_value_range_to_varying with method calls.
581
582 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
583
584 * config/s390/s390.md
585 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
586 assembler.
587 (*r<noxa>sbg_<mode>_sll): Likewise.
588 (*r<noxa>sbg_<mode>_srl): Likewise.
589 (*r<noxa>sbg_sidi_srl): New pattern.
590
591 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
592
593 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
594 Default to TARGET_VXWORKS_RTP.
595 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
596 of TARGET_VXWORKS_RTP.
597 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
598 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
599 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
600
601 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
602
603 PR c++/25759
604 * doc/extend.texi (Common Type Attributes): Make it explicit
605 that attribute "packed" can apply to C++ classes.
606
607 2018-11-15 Martin Sebor <msebor@redhat.com>
608
609 PR c++/87541
610 PR c++/87542
611 * tree.c (type_argument_type): New function.
612 * tree.h (type_argument_type): Declare it.
613 * gcc/doc/extend.texi (alloc_align): Update and clarify.
614 (alloc_size, nonnull, sentinel): Same.
615
616 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
617 Kwok Cheung Yeung <kcy@codesourcery.com>
618
619 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
620 int_mode_for_size fails.
621 (vectorizable_load): Likewise.
622
623 2018-11-15 David Malcolm <dmalcolm@redhat.com>
624
625 * doc/ux.texi (Group logically-related diagnostics): Move
626 discussion of auto_diagnostic_group into this new subsection.
627 Give an example of where this grouping is used.
628
629 2018-11-15 David Malcolm <dmalcolm@redhat.com>
630
631 PR other/19165
632 * Makefile.in (OBJS): Move json.o to...
633 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
634 * common.opt (fdiagnostics-format=): New option.
635 (diagnostics_output_format): New enum.
636 * diagnostic-format-json.cc: New file.
637 * diagnostic.c (default_diagnostic_final_cb): New function, taken
638 from start of diagnostic_finish.
639 (diagnostic_initialize): Initialize final_cb to
640 default_diagnostic_final_cb.
641 (diagnostic_finish): Move "being treated as errors" messages to
642 default_diagnostic_final_cb. Call any final_cb.
643 (default_diagnostic_finalizer): Add diagnostic_t param.
644 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
645 diagnostic_finalizer callback.
646 * diagnostic.h (enum diagnostics_output_format): New enum.
647 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
648 (struct diagnostic_context): Add "final_cb".
649 (default_diagnostic_finalizer): Add diagnostic_t param.
650 (diagnostic_output_format_init): New decl.
651 * doc/invoke.texi (-fdiagnostics-format): New option.
652 * dwarf2out.c (gen_producer_string): Ignore
653 OPT_fdiagnostics_format_.
654 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
655 * lto-wrapper.c (append_diag_options): Ignore it.
656 * opts.c (common_handle_option): Handle it.
657
658 2018-11-15 David Malcolm <dmalcolm@redhat.com>
659
660 PR tree-optimization/88015
661 * graphite-isl-ast-to-gimple.c
662 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
663 for dump_enabled_p.
664 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
665
666 2018-11-15 Richard Biener <rguenther@suse.de>
667
668 PR middle-end/88029
669 * gimple.c (gimple_call_flags): Union flags from decl, type
670 and call fntype.
671 * trans-mem.c (is_tm_pure_call): Simplify.
672
673 2018-11-15 Richard Biener <rguenther@suse.de>
674
675 PR tree-optimization/88031
676 * tree-vect-loop.c (vectorizable_reduction): Move check
677 for multiple types earlier so we get the expected dump.
678 Simplify calls to vectorizable_condition.
679 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
680 * tree-vect-stmts.c (vectorizable_condition): Instead of
681 reduc_def and reduc_index take just a flag. Simplify
682 code-generation now that we can rely on the defs being set up.
683 (vectorizable_comparison): Remove unused argument.
684
685 2018-11-15 Richard Biener <rguenther@suse.de>
686
687 PR tree-optimization/88030
688 * tree-complex.c (need_eh_cleanup): New global.
689 (update_complex_assignment): Mark blocks that need EH update.
690 (expand_complex_comparison): Likewise.
691 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
692 perform EH cleanup and schedule CFG cleanup if that did anything.
693
694 2018-11-15 Jakub Jelinek <jakub@redhat.com>
695
696 PR rtl-optimization/88018
697 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
698 on the presence of fallthru edge, rather than if it is a USE or not.
699
700 2018-11-15 Richard Biener <rguenther@suse.de>
701
702 PR middle-end/87917
703 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
704 analyze_subscript_affine_affine properly.
705
706 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
707
708 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
709 (GLIBC_DYNAMIC_LINKER): Define.
710 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
711
712 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
713
714 PR tree-optimization/84648
715 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
716 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
717 by calling adjust_cond_for_loop_until_wrap.
718
719 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
720
721 PR other/56334
722 * doc/extend.texi (Common Function Attributes): Clarify linker
723 restrictions on "aligned" attribute.
724 (Common Variable Attributes): Likewise. Mention that linker
725 restrictions don't apply to stack-allocated variables.
726
727 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
728
729 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
730 as an lvalue.
731
732 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
733
734 PR lto/55102
735 PR lto/56700
736 * doc/invoke.texi (Optimize Options): Remove bad example about
737 interaction between -flto and -O. Replace it with a note that
738 you need to compile with -O and not just link. Copy-edit -flto
739 discussion to reduce verbiage and improve flow.
740
741 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
742
743 PR middle-end/59658
744 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
745 also suppress many optimizations. Alphabetize option lists for
746 -O1, -O2, and -Os. Add list of options disabled with -Og, and
747 correct documentation for those options to say that.
748 * opts.c (default_options_table): Sort table by level and option
749 name, to make it easier to correlate to the manual.
750
751 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
752
753 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
754 printing of the names of segment registers.
755
756 2018-11-14 Nathan Sidwell <nathan@acm.org>
757
758 PR debug/88006
759 PR debug/87462
760 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
761 type list.
762
763 2018-11-14 David Malcolm <dmalcolm@redhat.com>
764
765 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
766
767 2018-11-14 Jakub Jelinek <jakub@redhat.com>
768
769 P1236R1 - Signed integers are two's complement
770 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
771
772 PR bootstrap/86739
773 * hash-map.h (hash_map::iterator::reference_pair): New class.
774 (hash_map::iterator::operator*): Return it rather than std::pair.
775
776 2018-11-14 Jeff Law <law@redhat.com>
777
778 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
779 iff the operand is a constant.
780
781 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
782
783 * gimple-ssa-evrp-analyze.c
784 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
785 ignore_equivs_equal_p to equal_p.
786 * ipa-cp.c (meet_with_1): Use equal_p instead of
787 ignore_equivs_equal_p.
788 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
789 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
790 (value_range::operator==): Remove.
791 (value_range::operator!=): Remove.
792 (vrp_prop::visit_stmt): Use equal_p.
793 * tree-vrp.h (value_range): Remove operator==, operator!=,
794 ignore_equivs_equal_p.
795 * vr-values.c (update_value_range): Use equal_p.
796
797 2018-11-14 Michael Matz <matz@suse.de>
798
799 PR middle-end/86575
800 * gimplify.c (collect_fallthrough_labels): Add new argument,
801 return location via that, don't modify statements.
802 (warn_implicit_fallthrough_r): Adjust call, don't use
803 statement location directly.
804
805 2018-11-14 Richard Biener <rguenther@suse.de>
806
807 PR middle-end/87985
808 * tree-data-ref.c (split_constant_offset): Add wrapper
809 allocating a cache hash-map.
810 (split_constant_offset_1): Cache results of expanding
811 expressions from SSA def stmts.
812
813 2018-11-14 Richard Biener <rguenther@suse.de>
814
815 PR middle-end/88021
816 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
817 to lambda_int.
818 (lambda_vector_mult_const): Likewise.
819 (lambda_matrix_right_hermite): Use lambda_int temporaries.
820
821 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
822 Jackson Woodruff <jackson.woodruff@arm.com>
823
824 PR 71026/tree-optimization
825 * match.pd: Simplify floating point comparisons.
826
827 2018-11-14 Jakub Jelinek <jakub@redhat.com>
828
829 PR rtl-optimization/87817
830 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
831 last argument has low 8 bits clear, fold to 0.
832
833 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
834
835 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
836 MAX_OFILE_ALIGNMENT as needed.
837
838 2018-11-14 Richard Biener <rguenther@suse.de>
839
840 PR tree-optimization/88019
841 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
842 COND_EXPR arguments to non-trapping overflow.
843
844 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
845
846 * config/arc/arc.h (reg_class): Reorder registers classes, remove
847 unused register classes.
848 (REG_CLASS_NAMES): Likewise.
849 (REG_CLASS_CONTENTS): Likewise.
850 (FIXED_REGISTERS): Make lp_count fixed.
851 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
852 (PROGRAM_COUNTER_REGNO): Remove.
853 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
854 register classes, use constants for register numbers, remove
855 reg_class_contents references.
856 (arc_process_double_reg_moves): Add asserts.
857 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
858 lra_in_progress predicate.
859 (arc_init_reg_tables): Remove unused register classes.
860 (arc_register_move_cost): Likewise.
861 (arc_preferred_reload_class): Likewise.
862 (hwloop_optimize): Update rtx patterns involving lp_count register.
863 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
864 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
865 CHEAP_CORE_REGS. Former one will be used for LRA.
866 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
867 one will be used for LRA.
868 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
869 one will be used for LRA.
870 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
871 Former one will be used for LRA.
872 ("f"): Delete constraint.
873 ("k"): Likewise.
874 ("e"): Likewise.
875 ("l"): Change it from register constraint to constraint.
876 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
877 (movhi_insn): Likewise.
878 (movsi_insn): Update pattern.
879 (arc_lp): Likewise.
880 (dbnz): Likewise.
881 (stack_tie): Remove 'b' constraint letter.
882 (R4_REG): Define.
883 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
884 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
885 (R57_REG, R59_REG, PCL_REG): Likewise.
886 (ILINK1_REGNUM): Renamed to ILINK1_REG.
887 (ILINK2_REGNUM): Renamed to ILINK2_REG.
888 (Rgp): Remove.
889 (SP_REGS): Likewise.
890 (Rcw): Remove unused reg classes.
891 * config/arc/predicates.md (dest_reg_operand): Just default on
892 register_operand predicate.
893 (mpy_dest_reg_operand): Likewise.
894 (move_dest_operand): Use macros instead of constants.
895 * config/arc/arc.opt (mlra): Switch to lra as default.
896
897 2018-11-14 Richard Biener <rguenther@suse.de>
898
899 PR tree-optimization/87974
900 * tree-vect-loop.c (vectorizable_reduction): When computing
901 the vectorized reduction PHI vector type ignore constant
902 and external defs.
903
904 2018-11-14 Jakub Jelinek <jakub@redhat.com>
905
906 PR tree-optimization/87977
907 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
908 stmt, build a new one and replace the old one with it. Formatting fix.
909 Call release_ssa_name (x) if !has_other_use and !delete_div.
910 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
911 verify lhs of stmt is still def.
912
913 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
914
915 PR rtl-optimization/87507
916 * lower-subreg.c (operand_for_swap_move_operator): New function.
917 (simple_move): Strip simple operators.
918 (find_pseudo_copy): Likewise.
919 (resolve_operand_for_swap_move_operator): New function.
920 (resolve_simple_move): Strip simple operators and swap operands.
921
922 2018-11-13 Jakub Jelinek <jakub@redhat.com>
923
924 PR tree-optimization/87898
925 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
926 (ipa_simd_modify_function_body): Remove debug stmts where the first
927 argument was changed into a non-decl.
928
929 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
930
931 PR rtl-optimization/87899
932 * lra-lives.c (start_living): Update white space in comment.
933 (enum point_type): New.
934 (sparseset_contains_pseudos_p): New function.
935 (update_pseudo_point): Likewise.
936 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
937 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
938 handling. Move early exit after adding conflicts.
939 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
940 if regno is already live. Remove all handling of program points.
941 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
942 after adding conflicts. Remove all handling of program points and
943 ignore_reg_for_conflicts.
944 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
945 and do not guard call to mark_pseudo_live.
946 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
947 and do not guard call to mark_pseudo_dead.
948 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
949 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
950 Use new function update_pseudo_point. Handle register copies by
951 removing the source register from the live set. Handle INOUT operands.
952 Update to the next program point using the unused_set, dead_set and
953 start_dying sets.
954 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
955
956 2018-11-13 David Malcolm <dmalcolm@redhat.com>
957
958 * builtins.c: Replace "source_location" with "location_t".
959 * diagnostic-show-locus.c: Likewise.
960 * diagnostic.c: Likewise.
961 * dumpfile.c: Likewise.
962 * gcc-rich-location.h: Likewise.
963 * genmatch.c: Likewise.
964 * gimple.h: Likewise.
965 * gimplify.c: Likewise.
966 * input.c: Likewise.
967 * input.h: Likewise. Eliminate the typedef.
968 * omp-expand.c: Likewise.
969 * selftest.h: Likewise.
970 * substring-locations.h (get_source_location_for_substring):
971 Rename to...
972 (get_location_within_string): ...this.
973 * tree-cfg.c: Replace "source_location" with "location_t".
974 * tree-cfgcleanup.c: Likewise.
975 * tree-diagnostic.c: Likewise.
976 * tree-into-ssa.c: Likewise.
977 * tree-outof-ssa.c: Likewise.
978 * tree-parloops.c: Likewise.
979 * tree-phinodes.c: Likewise.
980 * tree-phinodes.h: Likewise.
981 * tree-ssa-loop-ivopts.c: Likewise.
982 * tree-ssa-loop-manip.c: Likewise.
983 * tree-ssa-phiopt.c: Likewise.
984 * tree-ssa-phiprop.c: Likewise.
985 * tree-ssa-threadupdate.c: Likewise.
986 * tree-ssa.c: Likewise.
987 * tree-ssa.h: Likewise.
988 * tree-vect-loop-manip.c: Likewise.
989
990 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
991
992 * doc/extend.texi: Fix typo in the weakref description.
993
994 2018-11-13 Richard Biener <rguenther@suse.de>
995
996 PR tree-optimization/86991
997 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
998 group building until we have successfully detected the SLP
999 reduction.
1000 (vect_is_simple_reduction): Remove fixup code here.
1001
1002 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1003
1004 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
1005 (dump_gimple_stmt): Use it.
1006 (dump_gimple_stmt_loc): Likewise.
1007 (dump_gimple_expr): Likewise.
1008 (dump_gimple_expr_loc): Likewise.
1009 (dump_generic_expr): Likewise.
1010 (dump_generic_expr_loc): Likewise.
1011 (dump_printf): Likewise.
1012 (dump_printf_loc): Likewise.
1013 (dump_dec): Likewise.
1014 (dump_dec): Likewise.
1015 (dump_hex): Likewise.
1016 (dump_symtab_node): Likewise.
1017 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
1018 Guard dump call with dump_enabled_p.
1019 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
1020 * graphite-optimize-isl.c (optimize_isl): Likewise.
1021 * graphite.c (graphite_transform_loops): Likewise.
1022 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
1023 * tree-parloops.c (parallelize_loops): Likewise.
1024 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
1025 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
1026 (vect_prune_runtime_alias_test_list): Likewise.
1027 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
1028 (vect_estimate_min_profitable_iters): Likewise.
1029 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
1030 (vect_build_slp_tree_2): Likewise.
1031 (vect_supported_load_permutation_p): Likewise.
1032 (vect_slp_analyze_operations): Likewise.
1033 (vect_slp_analyze_bb_1): Likewise.
1034 (vect_slp_bb): Likewise.
1035 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
1036 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
1037 (pass_slp_vectorize::execute): Likewise.
1038 (increase_alignment): Likewise.
1039
1040 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1041
1042 PR ipa/87955
1043 * ipa-inline.c (report_inline_failed_reason): Guard calls to
1044 cl_target_option_print_diff and cl_optimization_print_diff with
1045 if (dump_file).
1046
1047 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1048
1049 * doc/invoke.texi (-fsave-optimization-record): Note that the
1050 output is compressed.
1051 * optinfo-emit-json.cc: Include <zlib.h>.
1052 (optrecord_json_writer::write): Compress the output.
1053
1054 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
1055
1056 * tree-vrp.c (value_range_base::dump): Dump type.
1057 Do not use INF nomenclature for 1-bit types.
1058 (dump_value_range): Group all variants to common dumping code.
1059 (debug): New overloaded functions for value_ranges.
1060 (value_range_base::dump): Remove no argument version.
1061 (value_range::dump): Same.
1062
1063 2018-11-13 Richard Biener <rguenther@suse.de>
1064
1065 PR tree-optimization/87931
1066 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
1067 nested cycles we support to latch computations vectorizable_reduction
1068 handles.
1069
1070 2018-11-13 Martin Liska <mliska@suse.cz>
1071
1072 PR tree-optimization/87885
1073 * cfghooks.c (account_profile_record): Rename
1074 to ...
1075 (profile_record_check_consistency): ... this.
1076 Calculate missing num_mismatched_freq_in.
1077 (profile_record_account_profile): New function
1078 that calculates time and size of a function.
1079 * cfghooks.h (struct profile_record): Remove
1080 all tuples.
1081 (struct cfg_hooks): Remove after_pass flag.
1082 (account_profile_record): Rename to ...
1083 (profile_record_check_consistency): ... this.
1084 (profile_record_account_profile): New.
1085 * cfgrtl.c (rtl_account_profile_record): Remove
1086 after_pass flag.
1087 * passes.c (check_profile_consistency): Do only
1088 checking.
1089 (account_profile): Calculate size and time of
1090 function only.
1091 (pass_manager::dump_profile_report): Reformat
1092 output.
1093 (execute_one_ipa_transform_pass): Call
1094 consistency check before clean upand call account_profile
1095 after a clean up is done.
1096 (execute_one_pass): Call check_profile_consistency and
1097 account_profile instead of using after_pass flag..
1098 * tree-cfg.c (gimple_account_profile_record): Likewise.
1099
1100 2018-11-13 Martin Liska <mliska@suse.cz>
1101
1102 PR sanitizer/87930
1103 * config/i386/i386.c (ix86_option_override_internal): Error
1104 about usage -mabi=ms and -fsanitize={,kernel-}address.
1105
1106 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
1107
1108 * config/aarch64/aarch64.c
1109 (aarch64_vectorize_preferred_vector_alignment): Change return type to
1110 poly_uint64.
1111 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
1112 alignment being a poly int.
1113 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
1114 return type to poly_uint64.
1115 * target.def (default_preferred_vector_alignment): Likewise.
1116 * targhooks.c (default_preferred_vector_alignment): Likewise.
1117 * targhooks.h (default_preferred_vector_alignment): Likewise.
1118 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
1119 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
1120 poly int.
1121 (vect_update_misalignment_for_peel): Likewise.
1122 (vect_enhance_data_refs_alignment): Likewise.
1123 (vect_find_same_alignment_drs): Likewise.
1124 (vect_duplicate_ssa_name_ptr_info): Likewise.
1125 (vect_setup_realignment): Likewise.
1126 (vect_can_force_dr_alignment_p): Change alignment parameter type to
1127 poly_uint64.
1128 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
1129 mask with a compile time variable vector alignment.
1130 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
1131 int.
1132 (vect_do_peeling): Exit early if vector alignment is not constant.
1133 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
1134 a poly int.
1135 (vectorizable_store): Likewise.
1136 (vectorizable_load): Likweise.
1137 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
1138 poly_uint64.
1139 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
1140 poly int.
1141 (vect_can_force_dr_alignment_p): Change alignment parameter type to
1142 poly_uint64.
1143
1144 2018-11-13 Richard Biener <rguenther@suse.de>
1145
1146 PR tree-optimization/87962
1147 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
1148 detect outer reduction for disqualifying in-loop uses.
1149
1150 2018-11-13 Richard Biener <rguenther@suse.de>
1151
1152 PR tree-optimization/87967
1153 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
1154 for constants for the scalar loop.
1155
1156 2018-11-13 Alan Modra <amodra@gmail.com>
1157
1158 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
1159 integer constants when -mcmodel=medium.
1160
1161 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1162
1163 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
1164 * config/arc/elf.h (PROFILE_HOOK): Define.
1165 * config/arc/linux.h (PROFILE_HOOK): Likewise.
1166
1167 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1168
1169 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
1170 jump table data in the text section.
1171
1172 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1173
1174 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
1175 to fit the eh_return pattern.
1176 * config/arc/arc.md (eh_return): Define.
1177 (VUNSPEC_ARC_EH_RETURN): Likewise.
1178 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
1179 new implementation.
1180 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
1181
1182
1183 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1184
1185 * common/config/arc/arc-common.c (arc_option_optimization_table):
1186 Millicode optimization is default on for size optimizations.
1187 * config/arc/arc-protos.h (arc_check_multi): New function.
1188 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
1189 (ENTER_LEAVE_START_REG): Define.
1190 (ENTER_LEAVE_END_REG): Likewise.
1191 (arc_override_options): Disable millicode when long calls option
1192 is on.
1193 (arc_frame_info): Change it from int to bool.
1194 (arc_compute_frame_size): Clean up.
1195 (arc_save_restore): Remove.
1196 (frame_save_reg): New function.
1197 (frame_restore_reg): Likewise.
1198 (arc_enter_leave_p): Likewise.
1199 (arc_save_callee_saves): Likewise.
1200 (arc_restore_callee_saves): Likewise.
1201 (arc_save_callee_enter): Likewise.
1202 (arc_restore_callee_leave): Likewise.
1203 (arc_save_callee_milli): Likewise.
1204 (arc_restore_callee_milli): Likewise.
1205 (arc_expand_prologue): Reimplement to emit enter/leave
1206 instructions.
1207 (arc_expand_epilogue): Likewise.
1208 (arc_check_multi): New function.
1209 * config/arc/arc.md (push_multi_fp): New pattern.
1210 (push_multi_fp_blink): Likewise.
1211 (pop_multi_fp): Likewise.
1212 (pop_multi_fp_blink): Likewise.
1213 (pop_multi_fp_ret): Likewise.
1214 (pop_multi_fp_blink_ret): Likewise.
1215 * config/arc/arc.opt (mmillicode): Update option.
1216 (mcode-density-frame): New option.
1217 * config/arc/predicates.md (push_multi_operand): New predicate.
1218 (pop_multi_operand): Likewise.
1219 * doc/invoke.texi (ARC): Update ARC options information.
1220
1221
1222 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1223
1224 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
1225 * config/arc/arc.c (operands_ok_ldd_std): New function.
1226 (mem_ok_for_ldd_std): Likewise.
1227 (gen_operands_ldd_std): Likewise.
1228 * config/arc/arc.md: Add peephole2 rules for std/ldd.
1229
1230 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
1231
1232 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
1233 test on stack_usage_file.
1234 (lang_dependent_init): Do not open the .su file if generating LTO.
1235
1236 2018-11-13 Jakub Jelinek <jakub@redhat.com>
1237
1238 PR rtl-optimization/87918
1239 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
1240 simplify_gen_relational rather than simplify_gen_binary.
1241
1242 2018-11-13 Richard Biener <rguenther@suse.de>
1243
1244 * tree-ssanames.h (set_range_info): Use value_range_base.
1245 (get_range_info): Likewise.
1246 * tree-ssanames.c (set_range_info): Likewise.
1247 (get_range_info): Likewise.
1248 * tree-vrp.c (value_range_base::union_helper): Split
1249 out common parts of value_range[_base]::union_.
1250 (value_range_base::union_): Update.
1251 (value_range::union_): Likewise.
1252 (determine_value_range_1): Use value_range_base.
1253 (determine_value_range): Likewise.
1254 * tree-vrp.h (value_range_base::union_helper): Move ...
1255 (value_range::union_helper): ... from here.
1256
1257 2018-11-13 Alan Modra <amodra@gmail.com>
1258
1259 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
1260 offset for PRE_DEC.
1261 (rs6000_secondary_reload_gpr): Don't call find_replacement.
1262
1263 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
1264
1265 PR middle-end/59634
1266 * doc/invoke.texi (Optimize Options): Clarify that the
1267 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
1268 apply to data cache size.
1269
1270 2018-11-13 Alan Modra <amodra@gmail.com>
1271
1272 * config/rs6000/predicates.md (logical_const_operand),
1273 (logical_operand): Correct comment.
1274 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
1275
1276 2018-11-13 Alan Modra <amodra@gmail.com>
1277
1278 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
1279
1280 2018-11-13 Alan Modra <amodra@gmail.com>
1281
1282 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
1283 description.
1284 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
1285 covered by alternative.
1286 (movcc_internal1): Ignore h for register preference.
1287 (mov<mode>_hardfloat64): Likewise.
1288 (mov<mode>_softfloat): Ignore c, l, h for register preference.
1289
1290 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
1291
1292 PR preprocessor/47823
1293 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
1294 documentation to...
1295 (Pragmas): ...here.
1296 * doc/extend.texi (Pragmas): Note additional pragmas documented
1297 in the CPP manual.
1298
1299 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
1300
1301 PR middle-end/86677
1302 PR middle-end/87528
1303 * tree-scalar-evolution.c (expression_expensive_p): Make
1304 BUILTIN POPCOUNT as expensive when backend does not define it.
1305
1306 2018-11-12 Fredrik Noring <noring@nocrew.org>
1307
1308 * config.gcc: Update with-llsc defaults for MIPS r5900.
1309
1310 2018-11-12 Martin Liska <mliska@suse.cz>
1311
1312 PR gcov-profile/87442
1313 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
1314 options.
1315 * doc/invoke.texi: Document them.
1316 * tree-profile.c (parse_profile_filter): New.
1317 (parse_profile_file_filtering): Likewise.
1318 (release_profile_file_filtering): Likewise.
1319 (include_source_file_for_profile): Likewise.
1320 (tree_profiling): Filter source files based on the
1321 newly added options.
1322
1323 2018-11-12 Martin Liska <mliska@suse.cz>
1324
1325 PR target/87903
1326 * doc/extend.texi: Add missing values for __builtin_cpu_is and
1327 __builtin_cpu_supports for x86 target.
1328
1329 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
1330
1331 PR middle-end/21110
1332 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
1333 have to be Pmode.
1334 (Arithmetic): Likewise for "lo_sum".
1335
1336 2018-11-12 Renlin Li <renlin.li@arm.com>
1337
1338 PR target/87815
1339 * dse.c (get_stored_val): Add check for compile-time constantness
1340 of gap.
1341
1342 2018-11-12 Sudakshina Das <sudi.das@arm.com>
1343
1344 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
1345 (ARMv8_5a): New fgroup.
1346 (armv8.5-a): New arch.
1347 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
1348 sb and predres.
1349 * config/arm/arm-tables.opt: Regenerate.
1350 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
1351 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
1352 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
1353 Add matching rules for -march=armv8.5-a and extensions.
1354 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
1355 Add sb and predres to all armv8-a except armv8.5-a.
1356
1357 2018-11-12 Richard Biener <rguenther@suse.de>
1358
1359 * tree-vrp.h (value_range[_base]::set): Make public. Provide
1360 overload for single value.
1361 (value_range[_base]::set_nonnull): New.
1362 (value_range[_base]::set_null): Likewise.
1363 (value_range): Document bitmap copying behavior, mark
1364 copy constructor and assignment operator deleted.
1365 (value_range::move): New.
1366 (value_range::set_and_canonicalize): Default bitmap to zero.
1367 (set_value_range_to_nonnull): Remove.
1368 (set_value_range_to_null): Likewise.
1369 (set_value_range): Likewise.
1370 (set_value_range_to_value): Likewise.
1371 (extract_range_from_unary_expr): Work on value_range_base.
1372 (extract_range_from_binary_expr_1): Likewise. Rename to...
1373 (extract_range_from_binary_expr): ... this.
1374 * tree-vrp.c (value_range::update): Clear equiv bitmap
1375 if required.
1376 (value_range::move): New, move equiv bitmap.
1377 (value_range_base::set_undefined): Avoid assignment.
1378 (value_range::set_undefined): Likewise.
1379 (value_range_base::set_varying): Likewise.
1380 (value_range::set_varying): Likewise.
1381 (set_value_range): Remove.
1382 (value_range_base::set): New overload for value.
1383 (value_range::set): Likewise.
1384 (set_value_range_to_nonnull): Remove.
1385 (value_range_base::set_nonnull): New.
1386 (value_range::set_nonnull): Likewise.
1387 (set_value_range_to_null): Remove.
1388 (value_range_base::set_null): New.
1389 (value_range::set_null): Likewise.
1390 (range_is_null): Work on value_range_base.
1391 (range_is_nonnull): Likewise.
1392 (ranges_from_anti_range): Likewise.
1393 (extract_range_into_wide_ints): Likewise.
1394 (extract_range_from_multiplicative_op): Likewise.
1395 (extract_range_from_binary_expr): Likewise. Update for API changes.
1396 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
1397 handling.
1398 (value_range::intersect_helper): Avoid copy and assignment.
1399 (value_range::union_helper): Likewise.
1400 (determine_value_range_1): Adjust.
1401 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
1402 Avoid assignment by using move.
1403 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
1404 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1405 Likewise.
1406 * tree-ssanames.c (get_range_info): Likewise.
1407 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
1408 * vr-values.c (vr_values::get_value_range): Adjust.
1409 (vr_values::update_value_range): Likewise.
1410 (symbolic_range_based_on_p): Work on value_range_base.
1411 (vr_values::extract_range_from_binary_expr): Use value_range_base.
1412 (vr_values::extract_range_from_unary_expr): Likewise.
1413 (vr_values::extract_range_from_cond_expr): Avoid assignment.
1414 (vr_values::extract_range_from_comparison): Adjust.
1415 (vr_values::check_for_binary_op_overflow): Use value_range_base.
1416 (vr_values::extract_range_basic): Adjust.
1417 (vr_values::adjust_range_with_scev): Likewise.
1418 (vr_values::vrp_visit_assignment_or_call): Likewise.
1419 (vr_values::get_vr_for_comparison): Change API to avoid
1420 assignment and copy construction.
1421 (vr_values::compare_name_with_value): Adjust accordingly.
1422 (vr_values::compare_names): Likewise.
1423 (vr_values::extract_range_from_phi_node): Avoid assignment and
1424 bogus in-place modify of equiv bitmap.
1425 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
1426 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
1427 for extract_range_from_unary_expr API change.
1428 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
1429
1430 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
1431
1432 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
1433
1434 2018-11-12 Richard Biener <rguenther@suse.de>
1435
1436 * tree-vrp.h (value_range_base::symbolic_p,
1437 value_range_base::constant_p, value_range_base::zero_p,
1438 value_range_base::singleton_p): Move from value_range.
1439 (value_range::dump): Add.
1440 * gimple-ssa-evrp-analyze.c
1441 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
1442 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
1443 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1444 Use set_varying.
1445 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
1446 (value_range::constant_p): Likewise.
1447 (value_range::singleton_p): Likewise.
1448 (value_range_base::dump): Add.
1449 (set_value_range_to_undefined): Remove.
1450 (set_value_range_to_varying): Likewise.
1451 (range_int_cst_p): Take value_range_base argument.
1452 (range_int_cst_singleton_p): Likewise.
1453 (value_range_constant_singleton): Likewise.
1454 (vrp_set_zero_nonzero_bits): Likewise.
1455 (extract_range_from_multiplicative_op): Use set_varying.
1456 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
1457 (extract_range_from_unary_expr): Likewise.
1458 (dump_value_range_base): Change to overload of dump_value_range.
1459 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
1460 (vrp_prop::visit_stmt): Likewise.
1461 (value_range::intersect_helper): Likewise.
1462 (value_range::union_helper): Likewise.
1463 (determine_value_range_1): Likewise.
1464
1465 2018-11-12 Richard Biener <rguenther@suse.de>
1466
1467 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
1468 (set_value_range_to_null): Likewise.
1469 * vr-values.c (vr_values::extract_range_from_comparison):
1470 Clear equiv for constant singleton ranges.
1471
1472 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
1473
1474 * config/i386/sse.md: Combine VFIXUPIMM* patterns
1475 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1476 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1477 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
1478 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1479 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1480 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
1481
1482 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1483
1484 PR c/69502
1485 * doc/extend.texi (Common Type Attributes): For the align type
1486 attribute, copy language about decreasing alignment from the
1487 corresponding variable attribute.
1488
1489 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1490
1491 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
1492 -frounding-math.
1493
1494 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1495
1496 PR c++/43105
1497 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
1498 -frtti and -fno-rtti code.
1499
1500 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1501
1502 PR c/26366
1503 * doc/extend.texi (Other Builtins): Document probability associated
1504 with __builtin_expect.
1505
1506 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
1507
1508 PR target/87928
1509 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
1510 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
1511 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
1512 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
1513
1514 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1515
1516 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
1517
1518 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1519
1520 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
1521
1522 2018-11-11 Richard Biener <rguenther@suse.de>
1523
1524 * tree-vrp.h (class value_range_base): New base class for
1525 value_range containing all but the m_equiv member.
1526 (dump_value_range_base): Add.
1527 (range_includes_zero_p): Work on value_range_base.
1528 * tree-vrp.c (value_range_base::set): Split out base handling
1529 from...
1530 (value_range::set): this.
1531 (value_range::set_equiv): New.
1532 (value_range_base::value_range_base): New constructors.
1533 (value_range_base::check): Split out base handling from...
1534 (value_range::check): this.
1535 (value_range::equal_p): Refactor in terms of
1536 ignore_equivs_equal_p which is now member of the base.
1537 (value_range_base::set_undefined): New.
1538 (value_range_base::set_varying): Likewise.
1539 (value_range_base::dump):Split out base handling from...
1540 (value_range::dump): this.
1541 (value_range_base::set_and_canonicalize): Split out base handling
1542 from...
1543 (value_range::set_and_canonicalize): this.
1544 (value_range_base::union_): New.
1545 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
1546 for m_vr.
1547 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
1548 instead of value_range everywhere.
1549 (ipcp_vr_lattice::print): Use dump_value_range_base.
1550 (ipcp_vr_lattice::meet_with): Adjust.
1551 (ipcp_vr_lattice::meet_with_1): Likewise.
1552 (ipa_vr_operation_and_type_effects): Likewise.
1553 (propagate_vr_across_jump_function): Likewise.
1554 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
1555 (ipa_get_value_range): Likewise.
1556 (ipa_set_jfunc_vr): Likewise.
1557 (ipa_compute_jump_functions_for_edge): Likewise.
1558
1559 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
1560
1561 PR middle-end/65703
1562 * doc/invoke.texi (Optimize Options): Add @opindex entries
1563 for the positive forms of -fno-xxx and -mno-xxx options
1564 that were lacking them.
1565
1566 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
1567
1568 * combine.c (make_more_copies): Only make an intermediate copy if the
1569 dest of a move is a pseudo.
1570
1571 2018-11-09 Maya Rashish <coypu@sdf.org>
1572
1573 PR target/87221
1574 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
1575 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
1576
1577 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
1578
1579 PR driver/41179
1580 PR middle-end/65703
1581 * doc/invoke.texi (Optimize Options): Clarify default behavior
1582 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
1583
1584 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
1585
1586 PR tree-optimization/87940
1587 * expr.c (string_constant): Don't strip NOPS in subexpressions.
1588 Fold PLUS_EXPR correctly.
1589
1590 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
1591
1592 PR target/87762
1593 * config/s390/s390.c (s390_safe_relative_long_p): New function.
1594 (annotate_constant_pool_refs): Skip insns which support
1595 relative addressing.
1596 (annotate_constant_pool_refs_1): New helper function.
1597 (find_constant_pool_ref): Skip insns which support relative
1598 addression.
1599 (find_constant_pool_ref_1): New helper function.
1600 (replace_constant_pool_ref): Skip insns which support
1601 relative addressing.
1602 (replace_constant_pool_ref_1): New helper function.
1603 (s390_mainpool_start): Adapt to the new signature.
1604 (s390_mainpool_finish): Likewise.
1605 (s390_chunkify_start): Likewise.
1606 (s390_chunkify_finish): Likewise.
1607 (pass_s390_early_mach::execute): Likewise.
1608 (s390_prologue_plus_offset): Likewise.
1609 (s390_emit_prologue): Likewise.
1610 (s390_emit_epilogue): Likewise.
1611
1612 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1613
1614 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
1615 but unsupported lastprivate with conditional modifier.
1616
1617 2018-11-09 Jeff Law <law@redhat.com>
1618
1619 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
1620 unused argument better. Add gcc_unreachable to silence warning.
1621
1622 2018-11-09 Martin Sebor <msebor@redhat.com>
1623
1624 PR middle-end/81824
1625 * attribs.c (has_attribute): New helper function.
1626 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
1627 * attribs.h (decls_mismatched_attributes): Declare.
1628 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
1629 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
1630 * common.opt (-Wattribute-alias): Take an argument.
1631 (-Wno-attribute-alias): New option.
1632 * doc/extend.texi (Common Function Attributes): Document copy.
1633 (Common Variable Attributes): Same.
1634 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
1635 (-Wattribute-alias): Document new option argument.
1636
1637 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1638
1639 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
1640 matching criteria. Remove unused array initializer.
1641
1642 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
1643 Jinsong Ji <jji@us.ibm.com>
1644
1645 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
1646 constraints by introducing a new temporary.
1647 (_mm_cvtss_si64): Likewise.
1648
1649 2018-11-09 Martin Liska <mliska@suse.cz>
1650
1651 * common.opt: Add -fipa-stack-alignment flag.
1652 * doc/invoke.texi: Document it.
1653 * final.c (rest_of_clean_state): Guard stack
1654 shrinking with flag.
1655
1656 2018-11-09 Martin Liska <mliska@suse.cz>
1657
1658 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
1659 to ...
1660 (ipa_discover_variable_flags): ... this.
1661 * common.opt: Come up with new flag -fipa-reference-addressable.
1662 * doc/invoke.texi: Document it.
1663 * ipa-reference.c (propagate): Call the renamed fn.
1664 * ipa-visibility.c (whole_program_function_and_variable_visibility):
1665 Likewise.
1666 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
1667 ...
1668 (ipa_discover_variable_flags): ... this. Discover
1669 non-addressable variables only with the newly added flag.
1670 * opts.c: Enable the newly added flag with -O1 and higher
1671 optimization level.
1672
1673 2018-11-09 David Malcolm <dmalcolm@redhat.com>
1674
1675 * json.cc (selftest::test_writing_literals): Fix comment.
1676
1677 2018-11-09 Martin Liska <mliska@suse.cz>
1678
1679 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
1680 string to a stack buffer.
1681 (aarch64_parse_cpu): Likewise.
1682 (aarch64_parse_tune): Likewise.
1683
1684 2018-11-09 Richard Biener <rguenther@suse.de>
1685
1686 PR tree-optimization/87953
1687 * tree-vect-loop.c (vectorizable_reduction): For analysis
1688 always pass ops[0] to vectorizable_condition.
1689
1690 2018-11-09 Stafford Horne <shorne@gmail.com>
1691 Richard Henderson <rth@twiddle.net>
1692 Joel Sherrill <joel@rtems.org>
1693
1694 * common/config/or1k/or1k-common.c: New file.
1695 * config/or1k/*: New.
1696 * config.gcc (or1k*-*-*): New.
1697 * configure.ac (or1k*-*-*): New test for openrisc tls.
1698 * configure: Regenerated.
1699 * doc/install.texi: Document OpenRISC triplets.
1700 * doc/invoke.texi: Document OpenRISC arguments.
1701 * doc/md.texi: Document OpenRISC.
1702
1703 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1704
1705 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1706 (arm7tdmi-s): Delete CPU.
1707 (arm710t): Add aliases for arm720t and arm740t.
1708 (arm720t, arm740t): Delete CPUs.
1709 (arm920t): Add aliases for arm920, arm922t and arm940t.
1710 (arm920, arm922t, arm940t): Delete CPUs.
1711 (arm10tdmi): Add alias for arm1020t.
1712 (arm1020t): Delete CPU.
1713 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1714 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1715 (arm10e): Add aliases for arm1020e and arm1022e.
1716 (arm1020e, arm1022e): Delete CPU.
1717 * config/arm/arm.md (generic_sched): Remove entries that are now
1718 handled by aliases.
1719 (generic_vfp): Likewise.
1720 * config/arm/arm1020e.md: Simplify tuning selection based on alias
1721 changes.
1722 * config/arm/arm-tune.md: Regenerated.
1723 * config/arm/arm-tables.opt: Regenerated.
1724
1725 2018-11-09 Richard Biener <rguenther@suse.de>
1726
1727 PR tree-optimization/87621
1728 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1729 op with only phi inputs.
1730 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1731 (ch_base::copy_headers): Run CSE on copied loop headers.
1732 (pass_ch_vect::process_loop_p): Simplify.
1733
1734 2018-11-09 Alexandre Oliva <oliva@adacore.com>
1735
1736 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1737 for non-w64 x86_64 biarch.
1738
1739 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
1740
1741 PR rtl-optimization/86438
1742 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1743 of in_b for the compare if in_b is SET_DEST.
1744
1745 PR target/87793
1746 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1747 non-toplevel UNSPEC.
1748
1749 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1750
1751 * tree-vrp.c (value_range::check): Do not access internals
1752 directly.
1753 (value_range::singleton_p): Same.
1754 (value_range::type): Same.
1755 (vrp_finalize): Use value_range API.
1756
1757 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1758
1759 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1760
1761 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1762
1763 * vr-values.c (vr_values::get_value_range): Use value_range API
1764 instead of piecing together ranges.
1765 (vr_values::update_value_range): Same.
1766
1767 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1768
1769 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
1770 of performing ad-hoc calculations.
1771 * tree-ssanames.c (set_range_info): New overloaded function
1772 accepting value_range &.
1773 (get_range_info): Same.
1774 * tree-ssanames.h (set_range_info_raw): Remove.
1775 (set_range_info): New prototype.
1776 (get_range_info): Same.
1777 * tree-vrp.h (value_range::null_p): Rename to zero_p.
1778 * tree-vrp.c (value_range::null_p): Same.
1779
1780 2018-11-09 Jan Hubicka <jh@suse.cz>
1781
1782 * tree.c (fld_type_variant_equal_p): Test user align flag.
1783 (flt_type_variant): Copy user align flag.
1784 (fld_incomplete_type_of): Clear it.
1785
1786 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1787
1788 * config/arm/neon.md (div<mode>3): New pattern.
1789
1790 2018-11-08 Andi Kleen <ak@linux.intel.com>
1791
1792 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
1793 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
1794 (ix86_handle_option): Handle OPT_mptwrite.
1795 * config/i386/cpuid.h (bit_PTWRITE): Add.
1796 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
1797 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
1798 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
1799 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
1800 (ix86_option_override_internal): Handle PTA_PTWRITE.
1801 (ix86_valid_target_attribute_inner_p): Define ptwrite.
1802 (def_builtin2): Force UINT64 to be 64bit only.
1803 * config/i386/i386.h (TARGET_PTWRITE): Add.
1804 (TARGET_PTWRITE_P): Add.
1805 (PTA_PTWRITE): Add.
1806 * config/i386/i386.md: Define ptwrite.
1807 * config/i386/i386.opt: Add -mptwrite.
1808 * config/i386/immintrin.h (_ptwrite64): Add.
1809 (_ptwrite32): Add
1810 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
1811 * doc/invoke.texi: Document -mptwrite.
1812
1813 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
1814
1815 PR rtl-optimization/87600
1816 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
1817 * lra-constraints.c (process_alt_operands): Skip illegal hard
1818 register usage. Prefer reloading non hard register operands.
1819
1820 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
1821
1822 PR other/36572
1823 * doc/invoke.texi (Optimize Options): Clarify default behavior
1824 for -fno-sched-interblock and -fno-sched-spec.
1825
1826 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
1827
1828 * collect2.c (linker_select): Add USE_LLD_LD.
1829 (ld_suffixes): Add ld.lld.
1830 (main): Handle -fuse-ld=lld.
1831 * common.opt (-fuse-ld=lld): New option.
1832 * doc/invoke.texi (-fuse-ld=lld): Document.
1833 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1834
1835 2018-11-08 Paul Koning <ni1d@arrl.net>
1836
1837 * config/pdp11/constraints.md: Add "Z" series constraints for use
1838 with pre-dec and post-inc addressing.
1839 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1840 (pdp11_expand_operands): Add int argument (word count).
1841 (pdp11_sp_frame_offset): Delete.
1842 (pdp11_cmp_length): New function.
1843 (pushpop_regeq): New function.
1844 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1845 Add hook.
1846 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1847 frame layout.
1848 (pdp11_initial_elimination_offset): Ditto.
1849 (pdp11_expand_operands): Add word count argument. Bugfixes.
1850 (output_move_multiple): Change how pointer adjustment is done.
1851 (pdp11_gen_int_label): Correct format.
1852 (output_ascii): Ditto.
1853 (pdp11_asm_output_var): Add code for DEC assembler case.
1854 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1855 value.
1856 (legitimate_const_double_p): Ditto.
1857 (pdp11_register_move_cost): Adjust for new register classes.
1858 (pdp11_regno_reg_class): Ditto.
1859 (expand_block_move): Delete.
1860 (pushpop_regeq): New function.
1861 (pdp11_legitimate_address_p): Bugfix in check for constant
1862 offset.
1863 (pdp11_sp_frame_offset): Delete.
1864 (pdp11_reg_save_size): New helper function for new frame layout.
1865 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1866 (pdp11_expand_shift): Bugfix in check for constant shift count.
1867 (pdp11_shift_length): Ditto.
1868 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1869 (pdp11_cmp_length): New function.
1870 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1871 some compile options.
1872 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1873 (CALL_USED_REGISTERS): Ditto.
1874 (ELIMINABLE_REGS): Ditto.
1875 (REGISTER_NAMES): Ditto.
1876 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1877 constraints.
1878 (REG_CLASS_NAMES): Ditto.
1879 (REG_CLASS_CONTENTS): Ditto. Also remove
1880 HARD_FRAME_POINTER_REGNUM.
1881 (CPU_REG_CLASS): New macro.
1882 (CLASS_MAX_NREGS): Adjust for new register classes.
1883 (FUNCTION_PROFILER): Make no-op.
1884 (may_call_alloca): Remove unused declaration.
1885 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1886 (ASM_OUTPUT_SKIP): Fix format.
1887 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1888 (HARD_FRAME_POINTER_REGNUM): Remove.
1889 (return): Delete.
1890 (*rts): Rename. Remove epilogue related checks.
1891 (cmpsi, cmpdi): New insn.
1892 (cbranch<mode>4): Change to apply to SI and DI modes as well.
1893 (mov<mode>): Change constraints to enforce that push/pop
1894 destination cannot use the same register as source.
1895 (*mov<mode><cc_cc>): Ditto.
1896 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1897 at assembly output rather than as RTL expander.
1898 (zero_extendqihi2): Bugfix in check for same registers.
1899 (adddi3_nocc): Bugfix in check for constant operand.
1900 (addsi3_nocc): Ditto.
1901 (subdi3_nocc): Ditto.
1902 (subsi3_nocc): Ditto.
1903 (negdi2_nocc): Copy input to pdp11_expand_operands.
1904 (negsi2_nocc): Ditto.
1905 (bswap2_nocc): Ditto.
1906 * config/pdp11/pdp11.opt (mlra): Fix documentation.
1907 * config/pdp11/t-pdp11: Use -Os.
1908
1909 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
1910
1911 * config/arm/parsecpu.awk (/alias/): New parsing rule.
1912 (/begin cpu/): Check that the cpu name hasn't been previously defined.
1913 (gen_comm_data): Print out CPU alias tables.
1914 (check_cpu): Match aliases when checking the CPU name.
1915 * config/arm/arm-protos.h (cpu_alias): New structure.
1916 (cpu_option): Add entry for aliases.
1917 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1918 strongarm1100 and strongarm1110.
1919 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1920 (config/arm/arm-generic.md): Remove redundant references to
1921 strongarm110, strongarm1100 and strongarm1110.
1922 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1923 Scan aliases for additional hints.
1924 (arm_parse_cpu_option_name): Also match a cpu name against the list
1925 of aliases.
1926 * config/arm/arm-tables.opt: Regenerated.
1927 * config/arm/arm-tune.md: Regenerated.
1928
1929 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1930
1931 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1932 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1933 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1934 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1935 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1936 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1937 * gengtype.c (open_base_files): Add omp-general.h.
1938 * gimple.c (gimple_build_omp_critical):
1939 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
1940 gimple_omp_taskgroup_set_clauses.
1941 (gimple_build_omp_atomic_load): Add mo argument, call
1942 gimple_omp_atomic_set_memory_order.
1943 (gimple_build_omp_atomic_store): Likewise.
1944 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1945 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1946 instead of GSS_OMP.
1947 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1948 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1949 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1950 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
1951 different value for GF_OMP_ATOMIC_NEED_VALUE.
1952 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1953 comments.
1954 (struct gimple_statement_omp_single_layout): And remove here.
1955 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1956 than gimple_statement_omp_single_layout.
1957 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1958 GIMPLE_OMP_TEAMS.
1959 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1960 (gimple_omp_subcode): Formatting fix.
1961 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1962 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1963 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1964 gimple_omp_teams_host, gimple_omp_teams_set_host,
1965 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1966 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1967 gimple_omp_taskgroup_set_clauses): New inline functions.
1968 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1969 (gimple_build_omp_atomic_store): Likewise.
1970 (gimple_omp_atomic_seq_cst_p): Remove.
1971 (gimple_omp_atomic_memory_order): New function.
1972 (gimple_omp_atomic_set_seq_cst): Remove.
1973 (gimple_omp_atomic_set_memory_order): New function.
1974 (gimple_build_omp_taskgroup): Add clauses argument.
1975 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1976 (dump_gimple_omp_task): Print taskwait with depend clauses.
1977 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1978 dump_omp_atomic_memory_order.
1979 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1980 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1981 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1982 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1983 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1984 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1985 ORT_UNTIED_TASKLOOP enumerators.
1986 (enum gimplify_defaultmap_kind): New.
1987 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1988 target_map_pointers_as_0len_arrays members, add defaultmap.
1989 (new_omp_context): Initialize defaultmap member.
1990 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1991 (maybe_fold_stmt): Don't fold even in host teams regions.
1992 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1993 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
1994 ctx->omp_firstprivatize_variable.
1995 (omp_add_variable): Don't add private/firstprivate for VLAs in
1996 ORT_TASKGROUP.
1997 (omp_default_clause): Print "taskloop" rather than "task" if
1998 ORT_*TASKLOOP.
1999 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2000 Handle new defaultmap clause kinds.
2001 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
2002 iterator to be lastprivate or private. Fix up diagnostics if linear
2003 is used on collapse>1 simd iterator.
2004 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2005 (gimplify_omp_depend): New function.
2006 (gimplify_scan_omp_clauses): Add shared clause on parallel for
2007 combined parallel master taskloop{, simd} if taskloop has
2008 firstprivate, lastprivate or reduction clause. Handle
2009 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
2010 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
2011 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
2012 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
2013 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
2014 lastprivate.
2015 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
2016 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
2017 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
2018 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2019 (gimplify_omp_task): Handle taskwait with depend clauses.
2020 (gimplify_omp_for): Add shared clause on parallel for combined
2021 parallel master taskloop{, simd} if taskloop has firstprivate,
2022 lastprivate or reduction clause. Use ORT_TASKLOOP or
2023 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
2024 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
2025 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
2026 __for_end and __for_range temporaries on OMP_PARALLEL for
2027 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
2028 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
2029 sandwiched in between two taskloops.
2030 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
2031 instead of ctx->omp_firstprivatize_variable.
2032 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
2033 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
2034 host teams, use gimplify_and_return_first etc. for body like
2035 for target or target data constructs, and at the end call
2036 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
2037 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
2038 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
2039 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
2040 gimple_omp_atomic_set_seq_cst calls.
2041 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
2042 case, handle taskgroup clauses.
2043 * lto-streamer-out.c (hash_tree): Handle
2044 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2045 * Makefile.in (GTFILES): Add omp-general.h.
2046 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
2047 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
2048 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
2049 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
2050 BUILT_IN_GOMP_LOOP_DOACROSS_START,
2051 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
2052 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2053 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
2054 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
2055 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
2056 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
2057 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
2058 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2059 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
2060 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
2061 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
2062 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
2063 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
2064 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
2065 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
2066 * omp-expand.c (workshare_safe_to_combine_p): Return false for
2067 non-worksharing loops.
2068 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
2069 (determine_parallel_type): Don't combine parallel with worksharing
2070 which has _reductemp_ clause.
2071 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
2072 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
2073 if there is nonmonotonic modifier or if there is no modifier and no
2074 ordered clause. For dynamic and guided schedule without monotonic
2075 and nonmonotonic modifier, default to nonmonotonic.
2076 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
2077 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
2078 task reductions.
2079 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
2080 there are any reduction clauses.
2081 (expand_taskwait_call): New function.
2082 (expand_teams_call): New function.
2083 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
2084 expand_teams_call for it. Formatting fix. Handle taskwait with
2085 depend clauses.
2086 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
2087 of worksharing loops with task reductions.
2088 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
2089 expansion of worksharing loops with task reductions.
2090 (expand_omp_sections): Handle expansion of sections with task
2091 reductions.
2092 (expand_omp_synch): For host teams call expand_omp_taskreg.
2093 (omp_memory_order_to_memmodel): New function.
2094 (expand_omp_atomic_load, expand_omp_atomic_store,
2095 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
2096 instead of gimple_omp_atomic_seq_cst_p.
2097 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
2098 depend clauses as a standalone directive.
2099 * omp-general.c (enum omp_requires): New variable.
2100 (omp_extract_for_data): Initialize have_reductemp member. Allow
2101 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
2102 GT_EXPR loops depending on incr sign. Formatting fixes.
2103 * omp-general.h (struct omp_for_data): Add have_reductemp member.
2104 (enum omp_requires): New enum.
2105 (omp_requires_mask): Declare.
2106 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
2107 Fix comment typos.
2108 * omp-low.c (struct omp_context): Add task_reductions and
2109 task_reduction_map fields.
2110 (is_host_teams_ctx): New function.
2111 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
2112 (use_pointer_for_field): Use is_global_var instead of
2113 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
2114 in outer contexts.
2115 (build_outer_var_ref): Ignore taskgroup outer contexts.
2116 (delete_omp_context): Release task_reductions and task_reduction_map.
2117 (scan_sharing_clauses): Don't add any fields for reduction clause on
2118 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
2119 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
2120 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
2121 Handle OMP_CLAUSE_NONTEMPORAL.
2122 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
2123 needed.
2124 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
2125 clauses with task modifier.
2126 (scan_omp_task): Handle taskwait with depend clauses.
2127 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
2128 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
2129 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
2130 (scan_omp_for): Fix comment formatting.
2131 (scan_omp_teams): Handle host teams constructs.
2132 (check_omp_nesting_restrictions): Allow teams with no outer
2133 OpenMP context. Adjust diagnostics for teams strictly nested into
2134 some explicit OpenMP construct other than target. Allow OpenMP atomics
2135 inside of simd regions.
2136 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
2137 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
2138 taskreg_nesting_level while scanning host teams construct.
2139 (task_reduction_read): New function.
2140 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
2141 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
2142 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
2143 second argument create_tmp_var if it is NULL. Don't ignore shared
2144 clauses in is_host_teams_ctx contexts. Handle
2145 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
2146 clauses.
2147 (lower_reduction_clauses): Ignore reduction clauses with task
2148 modifier. Remove second argument create_tmp_var if it is NULL.
2149 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
2150 (lower_send_clauses): Ignore reduction clauses with task modifier.
2151 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
2152 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
2153 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
2154 rely that it is the last stmt in body so far. Ignore outer taskgroup
2155 contexts.
2156 (omp_task_reductions_find_first, omp_task_reduction_iterate,
2157 lower_omp_task_reductions): New functions.
2158 (lower_omp_sections): Handle reduction clauses with taskgroup
2159 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
2160 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
2161 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
2162 modifiers.
2163 (lower_omp_taskgroup): Handle taskgroup reductions.
2164 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
2165 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
2166 (lower_depend_clauses): If there are any
2167 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2168 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
2169 seen, assume lowering is done already and return early. Set kind
2170 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
2171 (lower_omp_taskreg): Handle reduction clauses with task modifier on
2172 parallel construct. Handle reduction clause on taskloop construct.
2173 Handle taskwait with depend clauses.
2174 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
2175 for host teams constructs.
2176 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
2177 nontemporal and _reductemp_ clause entries.
2178 (omp_clause_code_name): Likewise.
2179 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
2180 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
2181 * tree-core.h (enum omp_clause_code): Add
2182 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
2183 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
2184 (struct tree_base): Add omp_atomic_memory_order field into union.
2185 Remove OMP_ATOMIC_SEQ_CST comment.
2186 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2187 and OMP_CLAUSE_DEPEND_DEPOBJ.
2188 (struct tree_omp_clause): Add subcode.defaultmap_kind.
2189 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
2190 OpenMP constructs with body and clauses operands.
2191 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
2192 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
2193 (OMP_TASKGROUP_CLAUSES): Define.
2194 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
2195 OMP_CLAUSE__LOOPTEMP_.
2196 (OMP_ATOMIC_SEQ_CST): Remove.
2197 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
2198 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
2199 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
2200 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
2201 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
2202 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
2203 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
2204 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
2205 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
2206 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
2207 Define.
2208 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
2209 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2210 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
2211 (convert_local_omp_clauses): Likewise. Remove useless test.
2212 * tree-parloops.c (create_call_for_reduction_1): Pass
2213 OMP_MEMORY_ORDER_RELAXED as new argument to
2214 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
2215 * tree-pretty-print.c (dump_omp_iterators): New function.
2216 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
2217 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
2218 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
2219 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
2220 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
2221 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
2222 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
2223 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2224 (dump_omp_atomic_memory_order): New function.
2225 (dump_generic_node): Use it. Print taskgroup clauses. Print
2226 taskwait with depend clauses.
2227 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
2228 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
2229 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
2230 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
2231 write_ts_omp_clause_tree_pointers): Likewise.
2232
2233 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2234
2235 PR ipa/86395
2236 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
2237 "-missed", "-note", and "-all" sub-options.
2238 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
2239 API.
2240 (can_early_inline_edge_p): Likewise.
2241 (want_early_inline_function_p): Likewise.
2242 (want_inline_self_recursive_call_p): Likewise.
2243 (recursive_inlining): Likewise.
2244 (inline_small_functions): Likewise.
2245 (flatten_function): Likewise.
2246 (ipa_inline): Likewise.
2247 (inline_always_inline_functions): Likewise.
2248 (early_inline_small_functions): Likewise.
2249 (early_inliner): Likewise.
2250 * tree-inline.c (expand_call_inline): Likewise.
2251
2252 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2253
2254 * pretty-print.c (pp_format): Handle %f.
2255 (selftest::test_pp_format): Add test of %f.
2256 * pretty-print.h (pp_double): New macro.
2257
2258 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2259
2260 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
2261 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
2262 (dump_pretty_printer::decode_format): Implement "%C" for
2263 cgraph_node *.
2264 (selftest::test_capture_of_dump_calls): Rename "where" to
2265 "stmt_loc". Convert test_decl to a function decl and set its
2266 location. Add a symbol_table_test RAII instance and a
2267 cgraph_node, using it to test "%C" and dump_symtab_node.
2268
2269 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
2270
2271 PR middle-end/87916
2272 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
2273
2274 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2275
2276 * cgraph.c: Include "selftest.h".
2277 (saved_symtab): New variable.
2278 (selftest::symbol_table_test::symbol_table_test): New ctor.
2279 (selftest::symbol_table_test::~symbol_table_test): New dtor.
2280 (selftest::test_symbol_table_test): New test.
2281 (selftest::cgraph_c_tests): New.
2282 * cgraph.h (saved_symtab): New decl.
2283 (selftest::symbol_table_test): New class.
2284 * selftest-run-tests.c (selftest::run_tests): Call
2285 selftest::cgraph_c_tests.
2286 * selftest.h (selftest::cgraph_c_tests): New decl.
2287
2288 2018-11-08 Richard Biener <rguenther@suse.de>
2289
2290 * tree-data-ref.h (lambda_int): New typedef.
2291 (lambda_vector_gcd): Adjust.
2292 (lambda_vector_new): Likewise.
2293 (lambda_matrix_new): Likewise.
2294 * tree-data-ref.c (print_lambda_vector): Adjust.
2295
2296 2018-11-08 Richard Biener <rguenther@suse.de>
2297
2298 PR tree-optimization/87929
2299 * tree-complex.c (expand_complex_comparison): Clean EH.
2300
2301 2018-11-08 Martin Liska <mliska@suse.cz>
2302
2303 * doc/extend.texi: Reword.
2304 * predict.c (expr_expected_value_1): Likewise.
2305
2306 2018-11-08 Richard Biener <rguenther@suse.de>
2307
2308 PR tree-optimization/87913
2309 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
2310 of extreme values to ordered comparisons.
2311
2312 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
2313
2314 PR middle-end/42726
2315 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
2316
2317 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
2318
2319 * doc/invoke.texi: Remove leading dash from @opindex entries
2320 throughout the file.
2321
2322 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
2323
2324 PR driver/80828
2325 * doc/invoke.texi (Option Summary): Add -e and --entry.
2326 (Link Options): Likewise.
2327
2328 2018-11-07 Nathan Sidwell <nathan@acm.org>
2329
2330 PR 87926
2331 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
2332 --disable-checking bootstrap.
2333
2334 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
2335
2336 * configure: Regenerated.
2337
2338 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2339
2340 PR c/87691
2341 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
2342 to the mode of the widest field iff the widest field has mode class
2343 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
2344 reference.
2345
2346 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
2347
2348 * common.opt: Add -Wattribute-warning.
2349 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
2350 * expr.c (expand_expr_real_1): Add new attribute to warning_at
2351 call to allow user configure behavior of "warning" attribute.
2352
2353 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
2354
2355 * target.def: Put @: after every vs., e.g., and i.e. where it is
2356 followed by whitespace.
2357 * doc/extend.texi: Ditto.
2358 * doc/fragments.texi: Ditto.
2359 * doc/gimple.texi: Ditto.
2360 * doc/implement-c.texi: Ditto.
2361 * doc/install.texi: Ditto.
2362 * doc/invoke.texi: Ditto.
2363 * doc/md.texi: Ditto.
2364 * doc/plugins.texi: Ditto.
2365 * doc/rtl.texi: Ditto.
2366 * doc/sourcebuild.texi: Ditto.
2367 * doc/tm.texi.in: Ditto.
2368 * doc/ux.texi: Ditto.
2369 * doc/tm.texi: Regenerate.
2370
2371 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2372
2373 * config/arm/arm-cpus.in (ares): New entry.
2374 * config/arm/arm-tables.opt: Regenerate.
2375 * config/arm/arm-tune.md: Likewise.
2376 * doc/invoke.texi (ARM Options): Document ares.
2377
2378 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2379
2380 * config/aarch64/aarch64-cores.def (ares): Define.
2381 * config/aarch64/aarch64-tune.md: Regenerate.
2382 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
2383
2384 2018-11-07 Jan Hubicka <jh@suse.cz>
2385
2386 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
2387 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
2388 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
2389 TYPE_DECL.
2390
2391 2018-11-07 Richard Biener <rguenther@suse.de>
2392
2393 PR tree-optimization/87914
2394 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
2395 of nested cycles.
2396 (vectorizable_reduction): Handle shifts and rotates by dispatching
2397 to vectorizable_shift.
2398 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
2399 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
2400 def cases.
2401 (vectorizable_shift): Export and handle being called as
2402 vect_nested_cycle.
2403 (vect_analyze_stmt): Call vectorizable_shift after
2404 vectorizable_reduction.
2405 * tree-vectorizer.h (vectorizable_shift): Declare.
2406
2407 2018-11-07 Jan Hubicka <jh@suse.cz>
2408
2409 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
2410 than const decls in TREE_VALUE of enum.
2411 (dump_type_inheritance_graph): Improve duplicate dumping.
2412 (free_enum_values): New.
2413 (build_type_inheritance_graph): Use it.
2414 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
2415 which are not main variants or not ODR types.
2416 (verify_type_variant): Expect variants to have no TYPE_VALUES.
2417
2418 2018-11-07 Richard Biener <rguenther@suse.de>
2419
2420 * ipa-inline.c (want_inline_small_function_p): Compute
2421 big_speedup_p lazily and last.
2422
2423 2018-11-07 Jan Hubicka <jh@suse.cz>
2424
2425 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
2426 building incomplete variant of complete type.
2427 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
2428 variant of complete type.
2429
2430 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2431
2432 * config/mips/mips.c: Fix typo in documentation of
2433 mips_loongson_ext2_prefetch_cookie.
2434 (mips_option_override): fix brain twister logical.
2435 * config/mips/mips.h: Fix typo in documentation of
2436 ISA_HAS_CTZ_CTO and define pattern.
2437 * config/mips/mips.md (prefetch): Hoist EXT2 above
2438 the 2EF/EXT block.
2439 (prefetch_indexed): Hoist EXT2 above the EXT block.
2440
2441 2018-11-07 Jan Hubicka <jh@suse.cz>
2442
2443 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
2444 return and parameter types of function and method types.
2445 (free_lang_data_in_cgraph): Update.
2446
2447 2018-11-07 Martin Liska <mliska@suse.cz>
2448
2449 PR rtl-optimization/87868
2450 * postreload-gcse.c (eliminate_partially_redundant_load): Set
2451 threshold to max_count if we would overflow.
2452 * profile-count.h: Make max_count a public constant.
2453
2454 2018-11-07 Martin Liska <mliska@suse.cz>
2455
2456 * mem-stats.h: Fix GNU coding style.
2457
2458 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2459
2460 * config/mips/gs264e.md: New.
2461 * config/mips/mips-cpus.def: Define gs264e.
2462 * config/mips/mips-tables.opt: Regenerate.
2463 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2464 gs264e.
2465 (mips_issue_rate): Add support for gs264e.
2466 (mips_multipass_dfa_lookahead): Likewise.
2467 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
2468 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
2469 (MIPS_ASE_MSA_SPEC): New.
2470 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
2471 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
2472 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
2473 * config/mips/mips.md: Include gs264e.md.
2474 (processor): Add gs264e.
2475 * config/mips/mips.opt (MSA): Use Mask instead of Var.
2476 * doc/invoke.texi: Add gs264e to supported architectures.
2477
2478 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2479
2480 * config/mips/gs464e.md: New.
2481 * config/mips/mips-cpus.def: Define gs464e.
2482 * config/mips/mips-tables.opt: Regenerate.
2483 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2484 gs464e.
2485 (mips_issue_rate): Add support for gs464e.
2486 (mips_multipass_dfa_lookahead): Likewise.
2487 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
2488 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
2489 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
2490 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
2491 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
2492 * config/mips/mips.md: Include gs464e.md.
2493 (processor): Add gs464e.
2494 * doc/invoke.texi: Add gs464e to supported architectures.
2495
2496 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2497
2498 * config/mips/loongson3a.md: Rename to ...
2499 * config/mips/gs464.md: ... here.
2500 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
2501 as an alias of gs464 processor.
2502 * config/mips/mips-tables.opt: Regenerate.
2503 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
2504 instead of PROCESSOR_LOONGSON_3A.
2505 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
2506 TUNE_LOONGSON_3A.
2507 (mips_option_override): Enable MMI and EXT for gs464.
2508 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
2509 Rename TUNE_LOONGSON_3A to TUNE_GS464.
2510 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
2511 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
2512 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
2513 TARGET_LOONGSON_3A.
2514 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
2515 (processor): Add gs464;
2516 * doc/invoke.texi: Add gs464 to supported architectures.
2517
2518 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2519
2520 * config/mips/mips-protos.h
2521 (mips_loongson_ext2_prefetch_cookie): New prototype.
2522 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
2523 (mips_option_override): Enable TARGET_LOONGSON_EXT when
2524 TARGET_LOONGSON_EXT2 is true.
2525 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
2526 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
2527 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
2528 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
2529 TARGET_LOONGSON_EXT2.
2530 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
2531 (define_insn "ctz<mode>2"): New insn pattern.
2532 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
2533 (define_insn "prefetch_indexed_<mode>"): Include
2534 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
2535 * config/mips/mips.opt (-mloongson-ext2): Add option.
2536 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
2537
2538 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2539
2540 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
2541 __mips_loongson_ext.
2542 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
2543 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
2544 -mloongson-ext.
2545 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
2546 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
2547 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
2548 instead of TARGET_LOONGSON_3A.
2549 * config/mips/mips.opt (-mloongson-ext): Add option.
2550 * gcc/doc/invoke.texi (-mloongson-ext): Document.
2551
2552 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2553
2554 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
2555 * config/mips/loongson.md: Move to ...
2556 * config/mips/loongson-mmi.md: here; Adjustment.
2557 * config/mips/loongson.h: Move to ...
2558 State as deprecated. Include loongson-mmiintrin.h for back
2559 compatibility and warning.
2560 * config/mips/loongson-mmiintrin.h: ... here.
2561 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
2562 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
2563 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2564 (mips_option_override): Make sure MMI use hard float;
2565 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
2566 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
2567 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
2568 TARGET_LOONGSON_VECTORS.
2569 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
2570 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
2571 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
2572 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
2573 -mloongson-mmi.
2574 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
2575 TARGET_LOONGSON_VECTORS.
2576 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
2577 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2578 (Loongson MMI patterns): Include loongson-mmi.md instead of
2579 loongson.md.
2580 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
2581 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
2582
2583 2018-11-07 Richard Biener <rguenther@suse.de>
2584
2585 PR lto/87906
2586 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
2587 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
2588
2589 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
2590
2591 PR rtl-optimization/87874
2592 * lra.c (lra_substitute_pseudo): Do not create a subreg for
2593 const wide ints.
2594
2595 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
2596
2597 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
2598 if not in indexed or indirect form.
2599 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
2600 (bswap<mode>2_store): Ditto.
2601
2602 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
2603
2604 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
2605 the UNSPEC.
2606
2607 2018-11-06 Richard Biener <rguenther@suse.de>
2608
2609 PR tree-optimization/86850
2610 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
2611 instead of src.m_vec.
2612
2613 2018-11-06 Jan Hubicka <jh@suse.cz>
2614
2615 * tree.c (fld_simplified_type_name): Break out form ...
2616 (free_lang_data_in_type): ... here.
2617 (fld_type_variant_equal_p): Use it.
2618
2619 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2620
2621 * config/default-d.c: Include memmodel.h.
2622
2623 * config/sol2-d.c: New file.
2624 * config/t-sol2 (sol2-d.o): New rule.
2625 * config.gcc <*-*-solaris2*>: Set d_target_objs,
2626 target_has_targetdm.
2627
2628 2018-11-06 Jan Hubicka <jh@suse.cz>
2629
2630 * tree.c (fld_type_variant): Also copy alignment; be sure that
2631 new variant is equal.
2632
2633 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
2634
2635 PR target/87762
2636 * config/s390/s390.md: Add relative_long attribute.
2637
2638 2018-11-06 Jan Hubicka <jh@suse.cz>
2639
2640 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
2641 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
2642 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
2643 stream TYPE_NEEDS_CONSTRUCTING.
2644 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
2645 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2646
2647 2018-11-06 Richard Biener <rguenther@suse.de>
2648
2649 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
2650 dump-scope ...
2651 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2652
2653 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2654
2655 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
2656 REG_CLASS_CONTENTS[GEN_REGS].
2657 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2658
2659 2018-11-06 Jan Hubicka <jh@suse.cz>
2660
2661 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2662
2663 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2664
2665 PR sanitizer/80953
2666 * config/sol2.h (ASAN_CC1_SPEC): Define.
2667 (LD_WHOLE_ARCHIVE_OPTION): Define.
2668 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
2669 (ASAN_REJECT_SPEC): Provide default.
2670 (LIBASAN_EARLY_SPEC): Define.
2671 (LIBTSAN_EARLY_SPEC): Define.
2672 (LIBLSAN_EARLY_SPEC): Define.
2673 * config/i386/sol2.h (CC1_SPEC): Redefine.
2674 (ASAN_REJECT_SPEC): Define.
2675
2676 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
2677 (TARGET_ASAN_SHADOW_OFFSET): Define.
2678 (sparc_asan_shadow_offset): New function.
2679 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
2680 (ASAN_REJECT_SPEC): Define.
2681
2682 2018-11-06 Jan Hubicka <jh@suse.cz>
2683
2684 * tree.c (fld_type_variant): Copy canonical type.
2685 (fld_incomplete_type_of): Check that canonical types looks sane;
2686 copy canonical type.
2687 (verify_type): Accept when incomplete type has complete canonical type.
2688
2689 2018-11-06 Jan Hubicka <jh@suse.cz>
2690
2691 * tree.c (free_lang_data): Reset overwite_assembler_name,
2692 print_xnode, print_decl, print_type and print_identifier of
2693 langhooks.
2694
2695 2018-11-06 Richard Biener <rguenther@suse.de>
2696
2697 PR tree-optimization/87889
2698 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2699 Do nothing if old and new arg are the same
2700
2701 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
2702
2703 PR target/87723
2704 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2705 attributes for operands 3 and 4.
2706
2707 2018-11-06 Richard Biener <rguenther@suse.de>
2708
2709 PR middle-end/18041
2710 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2711 matching bitfield insertion.
2712
2713 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
2714
2715 * auto-inc-dec.c: Include valtrack.h. Improve comments.
2716 (reg_next_debug_use): New.
2717 (attempt_change): Propagate adjusted expression into affected
2718 debug insns.
2719 (merge_in_block): Track uses in debug insns.
2720 (pass_inc_dec::execute): Allocate and release
2721 reg_next_debug_use.
2722
2723 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2724
2725 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2726 (_mm512_fixupimm_round_pd): Update parameters and builtin.
2727 (_mm512_maskz_fixupimm_round_pd): Ditto.
2728 (_mm512_fixupimm_round_ps): Ditto.
2729 (_mm512_maskz_fixupimm_round_ps): Ditto.
2730 (_mm_fixupimm_round_sd): Ditto.
2731 (_mm_maskz_fixupimm_round_sd): Ditto.
2732 (_mm_fixupimm_round_ss): Ditto.
2733 (_mm_maskz_fixupimm_round_ss): Ditto.
2734 (_mm512_fixupimm_pd): Ditto.
2735 (_mm512_maskz_fixupimm_pd): Ditto.
2736 (_mm512_fixupimm_ps): Ditto.
2737 (_mm512_maskz_fixupimm_ps): Ditto.
2738 (_mm_fixupimm_sd): Ditto.
2739 (_mm_maskz_fixupimm_sd): Ditto.
2740 (_mm_fixupimm_ss): Ditto.
2741 (_mm_maskz_fixupimm_ss): Ditto.
2742 (_mm512_mask_fixupimm_round_pd): Update builtin.
2743 (_mm512_mask_fixupimm_round_ps): Ditto.
2744 (_mm_mask_fixupimm_round_sd): Ditto.
2745 (_mm_mask_fixupimm_round_ss): Ditto.
2746 (_mm512_mask_fixupimm_pd): Ditto.
2747 (_mm512_mask_fixupimm_ps): Ditto.
2748 (_mm_mask_fixupimm_sd): Ditto.
2749 (_mm_mask_fixupimm_ss): Ditto.
2750 * config/i386/avx512vlintrin.h:
2751 (_mm256_fixupimm_pd): Update parameters and builtin.
2752 (_mm256_maskz_fixupimm_pd): Ditto.
2753 (_mm256_fixupimm_ps): Ditto.
2754 (_mm256_maskz_fixupimm_ps): Ditto.
2755 (_mm_fixupimm_pd): Ditto.
2756 (_mm_maskz_fixupimm_pd): Ditto.
2757 (_mm_fixupimm_ps): Ditto.
2758 (_mm_maskz_fixupimm_ps): Ditto.
2759 (_mm256_mask_fixupimm_pd): Update builtin.
2760 (_mm256_mask_fixupimm_ps): Ditto.
2761 (_mm_mask_fixupimm_pd): Ditto.
2762 (_mm_mask_fixupimm_ps): Ditto.
2763 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
2764 * config/i386/i386-builtin.def: Update builtin definitions.
2765 * config/i386/i386.c: Handle new builtin types and remove useless ones.
2766 * config/i386/sse.md: Update VFIXUPIMM* patterns.
2767 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2768 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2769 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
2770 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2771 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2772 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
2773 * config/i386/subst.md:
2774 (round_saeonly_sd_mask_operand4): Add new subst_attr.
2775 (round_saeonly_sd_mask_op4): Ditto.
2776 (round_saeonly_expand_operand5): Ditto.
2777 (round_saeonly_expand): Update.
2778
2779 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2780
2781 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2782
2783 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
2784
2785 PR rtl-optimization/87871
2786 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2787
2788 2018-11-05 Paul Koning <ni1d@arrl.net>
2789
2790 * doc/sourcebuild.texi (target attributes): Document new "inf"
2791 effective target keyword.
2792
2793 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2794
2795 * config/s390/s390.c (s390_register_move_cost): Increase costs for
2796 moves involving the CC reg.
2797
2798 2018-11-05 Richard Biener <rguenther@suse.de>
2799
2800 PR tree-optimization/87873
2801 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
2802 argument.
2803 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2804 * tree-vect-loop.c (vect_transform_loop): When splitting the
2805 loop exit also create forwarder PHIs for constants.
2806 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2807 Handle constant to_arg, add extra checking we match up the correct
2808 PHIs.
2809
2810 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2811
2812 * config/s390/s390.md: QImode and HImode for load on condition.
2813
2814 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2815
2816 * config/s390/predicates.md: Fix typo.
2817 * config/s390/s390.md: Allow immediates for load on condition.
2818
2819 2018-11-05 Martin Liska <mliska@suse.cz>
2820
2821 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
2822 * bitmap.h (struct bitmap_usage): Likewise.
2823 * ggc-common.c (SCALE): Remove.
2824 (LABEL): Likewise.
2825 (struct ggc_usage): Use SIZE_AMOUNT. And update
2826 compare method.
2827 * ggc-page.c (SCALE): Remove.
2828 (STAT_LABEL): Remove.
2829 (ggc_print_statistics): Use SIZE_AMOUNT.
2830 * gimple.h (SCALE): Remove.
2831 (LABEL): Likewise.
2832 * input.c (ONE_K): Remove.
2833 (ONE_M): Likewise.
2834 (SCALE): Likewise.
2835 (STAT_LABEL): Likewise.
2836 (FORMAT_AMOUNT): Likewise.
2837 (dump_line_table_statistics): Use SIZE_AMOUNT.
2838 * mem-stats.h (struct mem_usage): Likewise.
2839 * rtl.c (dump_rtx_statistics): Likewise.
2840 (rtx_alloc_counts): Change type to size_t.
2841 (rtx_alloc_sizes): Likewise.
2842 (rtx_count_cmp): New.
2843 (dump_rtx_statistics): Sort first based on counts.
2844 * tree.c (tree_nodes_cmp): New.
2845 (tree_codes_cmp): New.
2846 (dump_tree_statistics): Sort first based on counts.
2847 * system.h (ONE_K): New.
2848 (ONE_M): Likewise.
2849 (SIZE_SCALE): Likewise.
2850 (SIZE_LABEL): Likewise.
2851 (SIZE_AMOUNT): Likewise.
2852 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2853 * tree-dfa.c (dump_dfa_stats): Likewise.
2854 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2855 * tree-ssanames.c (ssanames_print_statistics): Likewise.
2856 * tree.c (dump_tree_statistics): Likewise.
2857 * vec.c (struct vec_usage): Likewise.
2858 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2859 trigger a -Werror=format-overflow with
2860 --enable-gather-detailed-stats.
2861
2862 2018-11-05 Martin Liska <mliska@suse.cz>
2863
2864 * mem-stats.h (mem_alloc_description::release_instance_overhead):
2865 Return T *.
2866 * vec.c (struct vec_usage): Register m_element_size.
2867 (vec_prefix::register_overhead): New arguments: elements and
2868 element_size.
2869 (vec_prefix::release_overhead): Subtract elements.
2870 * vec.h (struct vec_prefix): Change signature.
2871 (va_heap::reserve): Pass proper arguments.
2872 (va_heap::release): Likewise.
2873
2874 2018-11-05 Martin Liska <mliska@suse.cz>
2875
2876 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2877 style.
2878 * vec.c: Likewise.
2879
2880 2018-11-05 Richard Biener <rguenther@suse.de>
2881
2882 * tree-scalar-evolution.h (final_value_replacement_loop): Update
2883 prototype.
2884 * tree-scalar-evolution.c (final_value_replacement_loop): Return
2885 whether anything was done.
2886 (scev_const_prop): Remove constant propagation part, fold
2887 remains into ...
2888 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2889 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2890 conditionally.
2891
2892 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2893
2894 PR tree-optimization/87859
2895 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2896 only_constants and first_nonmergeable_order members.
2897 (merged_store_group::merged_store_group): Initialize them.
2898 (merged_store_group::do_merge): Clear only_constants member if
2899 adding something other than INTEGER_CST store.
2900 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2901 stores with order >= first_nonmergeable_order. Use
2902 merged_store->only_constants instead of always recomputing it.
2903 Set merged_store->first_nonmergeable_order if we've skipped any
2904 stores. Attempt to merge overlapping INTEGER_CST stores that
2905 we would otherwise skip.
2906
2907 PR sanitizer/87837
2908 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2909
2910 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2911
2912 PR target/87853
2913 * config/i386/emmintrin.h (__v16qs): New to cope with option
2914 -funsigned-char.
2915 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2916 (_mm_cmplt_epi8): Likewise.
2917 (_mm_cmpgt_epi8): Likewise.
2918
2919 2018-11-05 Richard Biener <rguenther@suse.de>
2920
2921 PR rtl-optimization/87852
2922 * fwprop.c (use_killed_between): Only consider single-defs of the
2923 use whose definition statement dominates the use.
2924
2925 2018-11-05 Martin Liska <mliska@suse.cz>
2926
2927 PR web/87829
2928 * doc/invoke.texi: Remove options that are
2929 not disabled with -Os.
2930
2931 2018-11-05 Martin Liska <mliska@suse.cz>
2932
2933 PR c/87811
2934 * doc/extend.texi: Update constrain about the last argument
2935 of __builtin_expect_with_probability.
2936
2937 2018-11-05 Martin Liska <mliska@suse.cz>
2938
2939 PR c/87811
2940 * predict.c (expr_expected_value_1): Verify
2941 that last argument is a real constants and emit
2942 error.
2943
2944 2018-11-05 Martin Liska <mliska@suse.cz>
2945
2946 PR gcov-profile/77698
2947 * ipa-profile.c (ipa_profile): Adjust hotness threshold
2948 only in LTO mode.
2949
2950 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2951
2952 PR tree-optimization/86572
2953 * builtins.c (c_strlen): Handle negative offsets in a safe way.
2954
2955 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2956
2957 PR tree-optimization/87672
2958 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2959 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2960
2961 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2962
2963 PR middle-end/58372
2964 * cfgexpand.c (pass_expand::execute): Move the call to
2965 finish_eh_generation in front of the call to expand_stack_alignment.
2966
2967 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2968
2969 * common/config/i386/i386-common.c (processor_alias_table): Add
2970 znver2 entry.
2971 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2972 (case ${target}): Add znver2.
2973 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2974 -march=native recognize znver2 processors.
2975 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2976 * config/i386/i386.c (m_znver2): New definition.
2977 (m_ZNVER): New definition.
2978 (m_AMD_MULTIPLE): Includes m_znver2.
2979 (processor_cost_table): Add znver2 entry.
2980 (processor_target_table): Add znver2 entry.
2981 (get_builtin_code_for_version): Set priority for
2982 PROCESSOR_ZNVER2.
2983 (processor_model): Add M_AMDFAM17H_ZNVER2.
2984 (arch_names_table): Ditto.
2985 (ix86_reassociation_width): Include znver2.
2986 * config/i386/i386.h (TARGET_znver2): New definition.
2987 (struct ix86_size_cost): Add TARGET_ZNVER2.
2988 (enum processor_type): Add PROCESSOR_ZNVER2.
2989 * config/i386/i386.md (define_attr "cpu"): Add znver2.
2990 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2991 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2992 (ix86_adjust_cost): Add znver2.
2993 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
2994 * gcc/doc/extend.texi: Add details about znver2.
2995 * gcc/doc/invoke.texi: Add details about znver2.
2996
2997 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
2998
2999 PR target/87079
3000
3001 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
3002 pattern.
3003
3004 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3005
3006 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
3007 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
3008
3009 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
3010
3011 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
3012 shrink-wrapping when -mtrack-speculation.
3013
3014 2018-11-02 Richard Biener <rguenther@suse.de>
3015
3016 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
3017 (pop_cost_one_pair): Do not free pair.
3018 (pop_best_coalesce): Likewise.
3019 (create_coalesce_list): Initialize obstack.
3020 (delete_coalesce_list): Free obstack.
3021 (find_coalesce_pair): Obstack-allocate coalesce pairs.
3022 (add_cost_one_coalesce): Likewise.
3023 (struct live_track): Remove bitmap pointer indirections.
3024 (new_live_track): Adjust.
3025 (delete_live_track): Likewise.
3026 (live_track_remove_partition): Likewise.
3027 (live_track_add_partition): Likewise.
3028 (live_track_live_p): Likewise.
3029 (live_track_process_def): Likewise.
3030 (live_track_clear_base_vars): Likewise.
3031
3032 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3033
3034 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
3035 * configure: Regenerate.
3036 * config.in: Regenerate.
3037 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
3038 HAVE_AS_REGISTER_PSEUDO_OP guard.
3039 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
3040 !HAVE_AS_REGISTER_PSEUDO_OP support.
3041 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
3042 guard.
3043
3044 2018-11-02 Richard Biener <rguenther@suse.de>
3045
3046 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
3047 with is_type_die.
3048
3049 2018-11-02 Richard Biener <rguenther@suse.de>
3050
3051 PR tree-optimization/87776
3052 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
3053 executable when iterating but running into rpo-vn-max-loop-depth
3054 and not eliding the iteration.
3055
3056 2018-11-30 Jan Hubicka <jh@suse.cz>
3057
3058 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
3059 TYPE_DECL.
3060
3061 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
3062
3063 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
3064 prototype.
3065 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
3066 Combine with rs6000_address_for_fpconvert.
3067 (rs6000_address_for_fpconvert): Combine with
3068 rs6000_force_indexed_or_indirect_mem.
3069 (rs6000_expand_vector_init): Change function call from
3070 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3071 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
3072 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3073 (floatsi<mode>2_lfiwax_mem): Ditto.
3074 (floatunssi<mode>2_lfiwzx): Ditto.
3075 (floatunssi<mode>2_lfiwzx_mem): Ditto.
3076 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
3077 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
3078 (fix_trunc<mode>si2_stfiwx): Ditto.
3079 (fixuns_trunc<mode>si2_stfiwx): Ditto.
3080 (float_<mode>si2_hw): Ditto.
3081 (floatuns_<mode>si2_hw): Ditto.
3082 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
3083 (vsx_splat_<mode>): Ditto.
3084
3085 2018-11-01 Joseph Myers <joseph@codesourcery.com>
3086
3087 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
3088 at end of assembler input text.
3089 * configure: Regenerate.
3090
3091 2018-11-01 Jakub Jelinek <jakub@redhat.com>
3092
3093 PR tree-optimization/87826
3094 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
3095 negative or larger or equal to type's precision.
3096
3097 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
3098
3099 * opts.c (default_options_table): Do not enable
3100 OPT_fdelayed_branch at -Og.
3101 * doc/invoke.texi (-fdelayed-branch): Document it.
3102
3103 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
3104
3105 * optabs-libfuncs.c (build_libfunc_function_visibility):
3106 New, split out from...
3107 (build_libfunc_function): ... here.
3108 (init_one_libfunc_visibility): New, split out from ...
3109 (init_one_libfunc): ... here.
3110
3111 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
3112 scratch register need not be early-clobber. Document the reason
3113 why we cannot use ST<OP>.
3114
3115 2018-10-31 Joseph Myers <joseph@codesourcery.com>
3116
3117 PR bootstrap/82856
3118 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
3119 line for second argument of AC_DEFINE_UNQUOTED.
3120 * doc/install.texi (Tools/packages necessary for modifying GCC):
3121 Update to autoconf 2.69 and automake 1.15.1.
3122 * aclocal.m4, config.in, configure: Regenerate.
3123
3124 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
3125
3126 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
3127 initialization.
3128
3129 2018-10-31 Martin Liska <mliska@suse.cz>
3130
3131 PR driver/83193
3132 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
3133 Add new argument invalid_extension.
3134 (aarch64_get_all_extension_candidates): New function.
3135 (aarch64_rewrite_selected_cpu): Add NULL to function call.
3136 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
3137 new argument.
3138 (aarch64_get_all_extension_candidates): New function.
3139 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
3140 argument invalid_extension.
3141 (aarch64_parse_cpu): Likewise.
3142 (aarch64_print_hint_for_extensions): New function.
3143 (aarch64_validate_mcpu): Provide hint about invalid extension.
3144 (aarch64_validate_march): Likewise.
3145 (aarch64_handle_attr_arch): Pass new argument.
3146 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
3147 (aarch64_handle_attr_isa_flags): Likewise.
3148
3149 2018-10-31 Richard Biener <rguenther@suse.de>
3150
3151 PR middle-end/70359
3152 PR middle-end/86270
3153 * tree-outof-ssa.c (insert_backedge_copies): Restrict
3154 copy generation to useful cases. Place the copy before
3155 the definition of the backedge value when possible.
3156
3157 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3158
3159 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
3160 * config/arc/arc.c (arc_active_insn): New function.
3161 (check_store_cacheline_hazard): Likewise.
3162 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
3163 (arc_override_options): Disable delay slot scheduler for older
3164 A7.
3165 (arc_store_addr_hazard_p): New implementation, old one renamed to
3166 ...
3167 (arc_store_addr_hazard_internal_p): Renamed.
3168 (arc_reorg): Don't combine into brcc instructions which are part
3169 of hardware hazard solution.
3170 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
3171 (tune_arc700): Likewise.
3172 * config/arc/arc.opt (arc7xx): New tune value.
3173 * config/arc/arc700.md: Improve A7 scheduler.
3174
3175 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3176
3177 * config/arc/arc.c (arc_override_options): Remove
3178 TARGET_COMPACT_CASESI.
3179 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
3180 (CASE_VECTOR_MODE): Likewise.
3181 (CASE_VECTOR_PC_RELATIVE): Likewise.
3182 (CASE_VECTOR_SHORTEN_MODE): Likewise.
3183 (CASE_VECTOR_SHORTEN_MODE1): Delete.
3184 (ADDR_VEC_ALIGN): Update.
3185 (ASM_OUTPUT_CASE_LABEL): Undefine.
3186 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
3187 (TARGET_BI_BIH): Define.
3188 (DEFAULT_BRANCH_INDEX): Likewise.
3189 * config/arc/arc.md (casesi): Rework to accept BI/BIH
3190 instructions, remove compact_casesi use case.
3191 (casesi_compact_jump): Remove.
3192 (casesi_dispatch): New pattern.
3193 * config/arc/arc.opt: Add mbranch-index option. Deprecate
3194 compact_casesi option.
3195 * doc/invoke.texi: Document mbranch-index option.
3196
3197 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3198
3199 * config/arc/arc.c (arc_get_tp): Remove function.
3200 (arc_emit_call_tls_get_addr): Likewise.
3201 (arc_call_tls_get_addr): New function.
3202 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
3203 * config/arc/arc.md (tls_load_tp_soft): Remove.
3204 (tls_gd_get_addr): Likewise.
3205
3206 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3207
3208 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
3209 (mulsi3_600_lib): Remove pattern.
3210 (umulsi3_highpart_600_lib_le): Likewise.
3211 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
3212 (umulsidi3): Remove call to umulsidi3_600_lib.
3213 (umulsidi3_600_lib): Remove pattern.
3214 (peephole2): Remove peephole using the above deprecated patterns.
3215
3216 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3217
3218 PR target/87374
3219 * config/arm/arm.c (arm_option_check_internal): Disable the combined
3220 use of -mslow-flash-data and -mword-relocations.
3221 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
3222 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
3223 flag_pic.
3224 * doc/invoke.texi (-mword-relocations): Mention conflict with
3225 -mslow-flash-data.
3226 (-mslow-flash-data): Reciprocally.
3227
3228 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
3229
3230 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
3231 16-byte modes held in GP registers to use an even regno.
3232
3233 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
3234 (aarch64_atomic_ldop_supported_p): Remove.
3235 (aarch64_gen_atomic_ldop): Remove.
3236 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
3237 Fully expand LSE operations here.
3238 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
3239 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
3240 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
3241 and use ATOMIC_LDOP instead; use register_operand for the input;
3242 drop the split and emit insns directly.
3243 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
3244 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
3245 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
3246
3247 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
3248 (aarch64_gen_atomic_ldop): Don't call it.
3249 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
3250 Use aarch64_reg_or_zero.
3251 (aarch64_atomic_exchange<ALLI>): Likewise.
3252 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
3253 operand 0; use aarch64_reg_or_zero for input; merge ...
3254 (@aarch64_atomic_swp<ALLI>): ... this and remove.
3255
3256 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
3257 (aarch64_split_compare_and_swap): Use it.
3258 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
3259 test oldval against the proper predicate.
3260 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
3261 Use nonmemory_operand for expected.
3262 (cas_short_expected_pred): New.
3263 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
3264 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
3265 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
3266 (aarch64_plushi_operand): New.
3267
3268 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
3269 Force oldval into the rval register for TARGET_LSE; emit the compare
3270 during initial expansion so that it may be deleted if unused.
3271 (aarch64_gen_atomic_cas): Remove.
3272 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
3273 Change =&r to +r for operand 0; use match_dup for operand 2;
3274 remove is_weak and mod_f operands as unused. Drop the split
3275 and merge with...
3276 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
3277 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
3278 (@aarch64_atomic_cas<GPI>): Similarly.
3279
3280 2018-10-31 Richard Biener <rguenther@suse.de>
3281
3282 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
3283 using ABSU_EXPR.
3284
3285 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3286
3287 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
3288 * config/aarch64/aarch64.md: Include saphira.md
3289 * config/aarch64/saphira.md: New file for pipeline description.
3290
3291 2018-10-30 Martin Sebor <msebor@redhat.com>
3292
3293 PR middle-end/87041
3294 * gimple-ssa-sprintf.c (format_directive): Use %G to include
3295 inlining context.
3296 (sprintf_dom_walker::compute_format_length):
3297 Avoid setting POSUNDER4K here.
3298 (get_destination_size): Handle null argument values.
3299 (get_user_idx_format): New function.
3300 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
3301 functions, including user-defined with attribute format printf.
3302 Use %G to include inlining context.
3303 Set POSUNDER4K here.
3304
3305 2018-10-30 Jan Hubicka <jh@suse.cz>
3306
3307 * params.def (lto-partitions): Bump from 32 to 128.
3308
3309 2018-10-30 Jan Hubicka <jh@suse.cz>
3310
3311 * tree.c
3312 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
3313 head in file.
3314 (free_lang_data_in_type): Forward declare.
3315 (fld_type_variant_equal_p): New function.
3316 (fld_type_variant): New function
3317 (fld_incomplete_types): New hash.
3318 (fld_incomplete_type_of): New function
3319 (fld_simplfied-type): New function.
3320 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
3321 (free_lang_data): Allocate and free fld_incomplete_type; update call
3322 of free_lang_data_in_decl.
3323
3324 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
3325
3326 * gcov.c (output_lines): Remove duplicate line.
3327
3328 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3329
3330 * config/rs6000/rs6000.md (bswapdi2): Force address into register
3331 if not in indexed or indirect form.
3332 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
3333 (bswapdi2_store): Ditto.
3334 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
3335 helper function.
3336 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
3337 Prototype for helper function.
3338
3339 2018-10-30 Martin Sebor <msebor@redhat.com>
3340
3341 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
3342 (target, pragma GCC optimize, pragma GCC target): Ditto.
3343
3344 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
3345
3346 * doc/extend.texi: Fix prototype and description of
3347 __builtin_expect_with_probability.
3348
3349 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
3350
3351 * cgraph.h (clone_function_name_1): Replaced by new
3352 clone_function_name_numbered that takes name as string; for
3353 privatize_symbol_name_1 use only.
3354 (clone_function_name): Renamed to
3355 clone_function_name_numbered to be explicit about numbering.
3356 (clone_function_name): New two-argument function that does
3357 not number its output.
3358 (clone_function_name): New three-argument function that
3359 takes a number to append to its output.
3360 * cgraphclones.c (duplicate_thunk_for_node):
3361 (clone_function_name_1): Renamed.
3362 (clone_function_name_numbered): Two new functions.
3363 (clone_function_name): Improved documentation.
3364 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
3365 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
3366 * final.c (final_scan_insn_1): Use the new clone_function_name
3367 without numbering.
3368 * multiple_target.c (create_dispatcher_calls): Ditto.
3369 (create_target_clone): Ditto.
3370 * omp-expand.c (grid_expand_target_grid_body): Ditto.
3371 * omp-low.c (create_omp_child_function_name): Ditto.
3372 * omp-simd-clone.c (simd_clone_create): Ditto.
3373 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
3374 new clone_function_name without numbering.
3375
3376 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
3377
3378 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
3379 Assert that the allocation size is not zero.
3380
3381 2018-10-30 Richard Biener <rguenther@suse.de>
3382
3383 PR tree-optimization/87800
3384 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
3385 non-induction or reduction PHIs.
3386
3387 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
3388
3389 * config/aarch64/falkor-tag-collision-avoidance.c
3390 (execute_tag_collision_avoidance): Call df_note_add_problem.
3391
3392 2018-10-30 Martin Liska <mliska@suse.cz>
3393
3394 * doc/extend.texi: Fix typo in documentation
3395 of __builtin_expect_with_probability.
3396
3397 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3398
3399 PR c++/87721
3400 * input.c (get_substring_ranges_for_loc): Detect if
3401 linemap_resolve_location gives us a NULL map, and reject
3402 this case.
3403
3404 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
3405
3406 * config.gcc (xstormy16-*-elf): Set tm_d_file.
3407
3408 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3409 Martin Sebor <msebor@redhat.com>
3410 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3411
3412 * doc/ux.texi (Quoting): New subsection, adapted from material at
3413 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
3414 MartinSebor and ManuelLopezIbanez.
3415 (Fix-it hints): Note that fix-it hints shouldn't be marked for
3416 translation.
3417
3418 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
3419
3420 PR middle-end/87469
3421 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
3422 max value.
3423
3424 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3425
3426 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
3427
3428 2018-10-29 Paul Koning <ni1d@arrl.net>
3429
3430 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
3431
3432 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3433
3434 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
3435 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
3436 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
3437 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
3438 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
3439 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
3440 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
3441 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
3442 Change 'vector' to '__vector'.
3443 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
3444 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
3445 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
3446 _mm_avg_pu16): Likewise. And, whitespace corrections.
3447
3448 2018-10-29 Richard Biener <rguenther@suse.de>
3449
3450 PR tree-optimization/87785
3451 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
3452 internal defs.
3453
3454 2018-10-29 Olivier Hainque <hainque@adacore.com>
3455
3456 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
3457
3458 2018-10-29 Olivier Hainque <hainque@adacore.com>
3459
3460 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
3461 ports configuration macro, defaults to "gnu".
3462 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
3463 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
3464
3465 2018-10-29 Olivier Hainque <hainque@adacore.com>
3466
3467 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
3468
3469 2018-10-29 Richard Biener <rguenther@suse.de>
3470
3471 PR tree-optimization/87790
3472 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
3473 (vect_make_slp_decision): Adjust.
3474 (vect_slp_analyze_bb_1): Likewise.
3475 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
3476 edges.
3477
3478 2018-10-29 Richard Biener <rguenther@suse.de>
3479
3480 PR tree-optimization/87785
3481 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
3482 and processing.
3483 (vect_build_slp_tree): Likewise.
3484 (vect_gather_slp_loads): New function.
3485 (vect_analyze_slp_instance): Gather loads separately from the
3486 SLP tree build.
3487
3488 2018-10-29 Martin Liska <mliska@suse.cz>
3489
3490 * Makefile.in: Make dependency to json.o.
3491 * doc/gcov.texi: Document new JSON format, remove
3492 old intermediate format documentation.
3493 * gcov.c (struct function_info): Come up with m_name and
3494 m_demangled_name.
3495 (function_info::function_info): Initialize it.
3496 (function_info::~function_info): Release it.
3497 (main): Rename flag_intermediate_format to flag_json_format.
3498 (print_usage): Describe --json-format.
3499 (process_args): Set flag_json_format.
3500 (output_intermediate_line): Remove.
3501 (output_intermediate_json_line): Likewise.
3502 (get_gcov_intermediate_filename): Return new extension
3503 ".gcov.json.gz".
3504 (output_intermediate_file): Implement JSON emission.
3505 (output_json_intermediate_file): Implement JSON emission.
3506 (generate_results): Use ::get_name for function name.
3507 Handle JSON output file.
3508 (read_graph_file): Use ::get_name instead of cplus_demangle.
3509 (read_count_file): Likewise.
3510 (solve_flow_graph): Likewise.
3511 (add_line_counts): Likewise.
3512 (accumulate_line_counts): Use new flag_json_format.
3513 (output_function_details): Use ::get_name instead of cplus_demangle.
3514 (output_lines): Likewise.
3515 * json.cc (test_writing_literals): Add new tests.
3516 * json.h (class literal): Add new boolean constructor.
3517
3518 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
3519
3520 PR rtl-optimization/87701
3521 PR rtl-optimization/87780
3522 * combine.c (make_more_copies): Rewrite.
3523
3524 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
3525
3526 * doc/generic.texi (ABSU_EXPR): Document.
3527 * match.pd (absu(x)*absu(x) -> x*x): Handle.
3528 (absu(absu(X)) -> absu(X)): Likewise.
3529 (absu(-X) -> absu(X)): Likewise.
3530 (absu(X) where X is nonnegative -> X): Likewise.
3531
3532 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
3533
3534 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
3535 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
3536 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
3537 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
3538 (s-tm-texi): Also check timestamp on d-target.def.
3539 (generated_files): Add TM_D_H and d-target-hooks-def.h.
3540 (build/genhooks.o): Also depend on D_TARGET_DEF.
3541 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
3542 variables.
3543 * config/aarch64/aarch64-d.c: New file.
3544 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
3545 Define.
3546 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
3547 prototype.
3548 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
3549 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
3550 * config/arm/arm-d.c: New file.
3551 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
3552 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
3553 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3554 * config/arm/t-arm (arm-d.o): New rule.
3555 * config/default-d.c: New file.
3556 * config/glibc-d.c: New file.
3557 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3558 * config/i386/i386-d.c: New file.
3559 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
3560 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
3561 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3562 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
3563 * config/i386/t-i386 (i386-d.o): New rule.
3564 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3565 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3566 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
3567 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3568 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3569 * config/mips/mips-d.c: New file.
3570 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
3571 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
3572 * config/mips/t-mips (mips-d.o): New rule.
3573 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3574 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3575 * config/powerpcspe/powerpcspe-d.c: New file.
3576 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
3577 New prototype.
3578 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3579 Support GNU D by using 0 as the language type.
3580 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
3581 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
3582 * config/riscv/riscv-d.c: New file.
3583 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
3584 prototype.
3585 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
3586 * config/riscv/t-riscv (riscv-d.o): New rule.
3587 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3588 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3589 * config/rs6000/rs6000-d.c: New file.
3590 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
3591 prototype.
3592 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3593 Support GNU D by using 0 as the language type.
3594 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
3595 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
3596 * config/s390/s390-d.c: New file.
3597 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
3598 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
3599 * config/s390/t-s390 (s390-d.o): New rule.
3600 * config/sparc/sparc-d.c: New file.
3601 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
3602 prototype.
3603 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
3604 * config/sparc/t-sparc (sparc-d.o): New rule.
3605 * config/t-glibc (glibc-d.o): New rule.
3606 * configure: Regenerated.
3607 * configure.ac (tm_d_file): New variable.
3608 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
3609 * doc/contrib.texi (Contributors): Add self for the D frontend.
3610 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
3611 * doc/install.texi (Configuration): Mention libphobos as an option for
3612 --enable-shared. Mention d as an option for --enable-languages.
3613 (Testing): Mention check-d as a target.
3614 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
3615 name suffixes. Mention d as a -x option.
3616 * doc/sourcebuild.texi (Top Level): Mention libphobos.
3617 * doc/standards.texi (Standards): Add section on D language.
3618 * doc/tm.texi: Regenerated.
3619 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
3620 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
3621 * dwarf2out.c (is_dlang): New function.
3622 (gen_compile_unit_die): Use DW_LANG_D for D.
3623 (declare_in_namespace): Return module die for D, instead of adding
3624 extra declarations into the namespace.
3625 (gen_namespace_die): Generate DW_TAG_module for D.
3626 (gen_decl_die): Handle CONST_DECLSs for D.
3627 (dwarf2out_decl): Likewise.
3628 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
3629 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
3630 kinds of aggregates.
3631 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
3632 * genhooks.c: Include d/d-target.def.
3633
3634 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
3635
3636 PR target/85669
3637 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
3638 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
3639 (STACK_DYNAMIC_OFFSET): Likewise.
3640
3641 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
3642
3643 PR target/80024
3644 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
3645 error message.
3646
3647 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3648
3649 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
3650 return type and other typos.
3651
3652 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3653
3654 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
3655 a shorter sequence with fewer branches.
3656 (emit_final_str_compare_gpr): Ditto.
3657
3658 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3659
3660 * config/rs6000/tmmintrin.h: New file.
3661 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
3662
3663 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3664
3665 * config/rs6000/mmintrin.h: Enable 32bit compilation.
3666 * config/rs6000/xmmintrin.h: Likewise.
3667
3668 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3669
3670 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
3671
3672 2018-10-26 Richard Biener <rguenther@suse.de>
3673
3674 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
3675 and wrapper.
3676 (vect_mark_slp_stmts_relevant): Likewise.
3677 (vect_detect_hybrid_slp_stmts): Likewise.
3678 (vect_bb_slp_scalar_cost): Likewise.
3679 (vect_remove_slp_scalar_calls): Likewise.
3680
3681 2018-10-26 Jan Hubicka <jh@suse.cz>
3682
3683 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
3684 (warn_types_mismatch): Fix walk of DECL_NAME.
3685 (odr_types_equivalent_p): Fix overactive assert.
3686
3687 2018-10-26 Richard Biener <rguenther@suse.de>
3688
3689 PR tree-optimization/87105
3690 * tree-vectorizer.h (_slp_tree::refcnt): New member.
3691 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3692 refcnt.
3693 (vect_create_new_slp_node): Initialize refcnt to one.
3694 (bst_traits): Move.
3695 (scalar_stmts_set_t, bst_fail): Remove.
3696 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3697 (vect_build_slp_tree): Add bst_map argument and lookup
3698 already created SLP nodes.
3699 (vect_print_slp_tree): Handle a SLP graph, print SLP node
3700 addresses.
3701 (vect_slp_rearrange_stmts): Handle a SLP graph.
3702 (vect_analyze_slp_instance): Adjust and free SLP nodes from
3703 the CSE map. Fix indenting.
3704 (vect_schedule_slp_instance): Add short-cut.
3705
3706 2018-10-26 Martin Liska <mliska@suse.cz>
3707
3708 PR testsuite/86158
3709 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3710 addr_expr and not with pointers.
3711
3712 2018-10-26 Jan Hubicka <jh@suse.cz>
3713
3714 * tree.c (free_lang_data_in_type): Only check main variants.
3715 * ipa-devirt.c (warn_odr): Make static.
3716 (types_same_for_odr): Drop strict variant.
3717 (types_odr_comparable): Likewise.
3718 (odr_or_derived_type_p): Look for main variants.
3719 (odr_name_hasher::equal): Cleanup comment.
3720 (odr_subtypes_equivalent): Add warn and warned arguments; check main
3721 variants.
3722 (type_variants_equivalent_p): break out from ...
3723 (odr_types_equivalent): ... here; go for main variants where needed.
3724 (warn_odr): ... here; turn static.
3725 (warn_types_mismatch): Compare mangled names of main variants.
3726 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3727 (type_with_linkage_p): Sanity check that we look at main variant.
3728 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3729 * tree.h (types_same_for_odr): Drop strict argument.
3730
3731 2018-10-26 Richard Biener <rguenther@suse.de>
3732
3733 PR tree-optimization/87746
3734 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3735 Simplify and fix WRT strided store groups with size not
3736 equal to step in element count.
3737 (vect_analyze_group_access_1): Dump the whole group.
3738
3739 2018-10-25 Carl Love <cel@us.ibm.com>
3740
3741 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3742 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3743 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
3744 precicion entry for each overloaded builtin.
3745 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3746 VSCEDPUO): Rename overloaded name.
3747 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3748 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3749 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3750 define_expand for xscmpexqp instruction.
3751 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3752
3753 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3754 Jinsong Ji <jji@us.ibm.com>
3755
3756 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3757 function with vec_sl.
3758 (_mm_slli_epi32): Likewise.
3759 (_mm_slli_epi64): Likewise.
3760 (_mm_srai_epi16): Replace deprecated function with vec_sra.
3761 (_mm_srai_epi32): Likewise.
3762 (_mm_srli_epi16): Replace deprecated function with vec_sr.
3763 (_mm_srli_epi32): Likewise.
3764 (_mm_srli_epi64): Likewise.
3765 (_mm_sll_epi16): Replace deprecated function with vec_sl.
3766 (_mm_sll_epi32): Likewise.
3767 (_mm_sll_epi64): Likewise.
3768 (_mm_sra_epi16): Replace deprecated function with vec_sra.
3769 (_mm_sra_epi32): Likewise.
3770 (_mm_srl_epi16): Replace deprecated function with vec_sr.
3771 (_mm_srl_epi32): Likewise.
3772 (_mm_srl_epi64): Likewise.
3773
3774 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3775 Jinsong Ji <jji@us.ibm.com>
3776
3777 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
3778 comparison operators with vec_cmp* for compatibility due to
3779 unfortunate history; clean up formatting and use types more
3780 appropriately.
3781 (_mm_sll_epi32): Likewise.
3782 (_mm_sll_epi64): Likewise.
3783 (_mm_srl_epi16): Likewise.
3784 (_mm_srl_epi32): Likewise.
3785 (_mm_srl_epi64): Likewise.
3786
3787 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3788 Jinsong Ji <jji@us.ibm.com>
3789
3790 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
3791 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
3792 __vector __bool int. Use vec_cmpgt in preference to deprecated
3793 function vec_vcmpgtfp.
3794 (_mm_max_ps): Likewise.
3795
3796 2018-10-25 Jeff Law <law@redhat.com>
3797
3798 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
3799 if returning false.
3800
3801 2018-10-25 Martin Sebor <msebor@redhat.com>
3802
3803 * doc/extend.texi (aligned): Expand attribute description.
3804 (Alignment): Rename section. Discuss function arguments.
3805
3806 2018-10-25 Jan Hubicka <jh@suse.cz>
3807
3808 * ipa-devirt.c (main_odr_variant): Remove.
3809 (hash_odr_name, types_same_for_odr, types_odr_comparable,
3810 odr_name_hasher::equal, odr_subtypes_equivalent_p):
3811 Drop use of main_odr_variant.
3812 (add_type_duplicate): Silence confused warnings on integer types.
3813 (get_odr_type): Always look for main variant.
3814 (register_odr_type): Simplify.
3815
3816 2018-10-25 Richard Biener <rguenther@suse.de>
3817
3818 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
3819 Initialize ng to silence error with release checking bootstrap.
3820
3821 2018-10-25 Richard Biener <rguenther@suse.de>
3822
3823 * tree-if-conv.c: Include tree-ssa-sccvn.h.
3824 (tree_if_conversion): Run CSE on the if-converted loop body.
3825
3826 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3827
3828 * config/s390/constraints.md (ZL): New constraint.
3829 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3830 operands.
3831 * config/s390/s390.md (movdi_larl): Remove.
3832 (movdi_64): Add the LARL alternative.
3833
3834 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3835
3836 PR bootstrap/87747
3837 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3838 (RTX_CODE_HWINT_P): New macro.
3839 (rtx_code_size): Use RTX_CODE_HWINT_P ().
3840
3841 2018-10-25 Jan Hubicka <jh@suse.cz>
3842
3843 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3844 is anonymous.
3845
3846 2018-10-25 Richard Biener <rguenther@suse.de>
3847
3848 PR tree-optimization/87665
3849 PR tree-optimization/87745
3850 * tree-vectorizer.h (get_earlier_stmt): Remove.
3851 (get_later_stmt): Pick up UID from the original non-pattern stmt.
3852
3853 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
3854
3855 * options.texi (Deprecated): Move list to Var section.
3856
3857 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
3858 Jinsong Ji <jji@us.ibm.com>
3859
3860 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3861 __vector long to __vector long long.
3862 (_mm_cvtpd_ps): Likewise.
3863 (_mm_cvttpd_epi32): Likewise.
3864 (_mm_cvtpi32_pd): Likewise.
3865 (_mm_unpackhi_epi64): Likewise.
3866 (_mm_unpacklo_epi64): Likewise.
3867
3868 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
3869
3870 PR rtl-optimization/87720
3871 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3872
3873 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
3874
3875 * gimple-ssa-isolate-paths.c
3876 (find_implicit_erroneous_behavior): Do not change code if the
3877 pass is running for warnings only.
3878 (find_explicit_erroneous_behavior): Likewise.
3879
3880 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
3881
3882 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3883 Define as rs6000_mangle_decl_assembler_name.
3884 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3885 long double to IEEE long double, switch the names of the long
3886 double built-in functions to be <func>f128 instead of <func>l.
3887
3888 2018-10-24 Martin Sebor <msebor@redhat.com>
3889
3890 * doc/extend.texi (nonnull): List no-argument form. Reference
3891 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3892
3893 2018-10-24 Richard Biener <rguenther@suse.de>
3894
3895 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3896
3897 2018-10-24 Martin Liska <mliska@suse.cz>
3898
3899 PR tree-optimization/84436
3900 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3901 Remove.
3902 (switch_conversion::contains_linear_function_p): New.
3903 (switch_conversion::build_one_array): Support linear
3904 transformation on input.
3905 * tree-switch-conversion.h (struct switch_conversion): Add
3906 contains_linear_function_p declaration.
3907
3908 2018-10-24 Richard Biener <rguenther@suse.de>
3909
3910 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3911 if its argument is CONSTANT_CLASS_P.
3912
3913 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3914
3915 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3916 it is wrong for forward declarations.
3917
3918 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
3919
3920 * config/s390/s390.c (s390_check_qrst_address): Add the missing
3921 SYMBOL_REF_P () check.
3922
3923 2018-10-24 Richard Biener <rguenther@suse.de>
3924
3925 PR tree-optimization/87105
3926 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3927 dump classification.
3928 (vect_analyze_data_ref_accesses): Handle duplicate loads and
3929 stores by splitting the affected group after the fact.
3930 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3931 fail the SLP build because of size constraints.
3932
3933 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3934
3935 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3936 * configure: Regenerate.
3937 * config.in: Regenerate.
3938 * varasm.c (mergeable_string_section): Use readonly_data_section
3939 if linker doesn't support SHF_MERGE with alignment > 8.
3940 (mergeable_constant_section): Likewise.
3941
3942 2018-10-24 Richard Biener <rguenther@suse.de>
3943
3944 PR tree-optimization/84013
3945 * tree-ssa-structalias.c (struct msdi_data): New struct for
3946 marshalling data to walk_stmt_load_store_ops.
3947 (maybe_set_dependence_info): Refactor as callback for
3948 walk_stmt_load_store_ops.
3949 (compute_dependence_clique): Set restrict info on all stmt kinds.
3950
3951 2018-10-24 Martin Liska <mliska@suse.cz>
3952
3953 * cgraph.c (cgraph_node::dump):
3954 Remove reduntant dumps and make tp_first_run dump more compact.
3955
3956 2018-10-24 Richard Biener <rguenther@suse.de>
3957
3958 PR tree-optimization/87665
3959 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3960 to reflect reality.
3961
3962 2018-10-12 Jeff Law <law@redhat.com>
3963
3964 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3965 for H8/S.
3966
3967 2018-10-23 Richard Biener <rguenther@suse.de>
3968
3969 * tree-vrp.c (add_assert_info): Guard dump_printf with
3970 dump_enabled_p.
3971 * gimple-ssa-evrp-analyze.c
3972 (evrp_range_analyzer::record_ranges_from_incoming_edge):
3973 Use value_range::ignore_equivs_equal_p.
3974
3975 2018-10-23 Richard Biener <rguenther@suse.de>
3976
3977 PR tree-optimization/87105
3978 PR tree-optimization/87608
3979 * passes.def (pass_all_early_optimizations): Add early phi-opt
3980 after dce.
3981 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3982 addition to debug stmts.
3983 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3984 and abs replacement early.
3985 * tree-cfg.c (gimple_empty_block_p): Likewise.
3986
3987 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
3988
3989 PR target/86383
3990 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3991 specified to configure.
3992 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3993
3994 2018-10-23 Richard Biener <rguenther@suse.de>
3995
3996 PR tree-optimization/87700
3997 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3998
3999 2018-10-23 Jakub Jelinek <jakub@redhat.com>
4000
4001 PR target/87674
4002 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
4003 second argument from __mmask16 to __mmask8.
4004 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
4005 _mm_mask_packs_epi32): Likewise.
4006 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
4007 Likewise.
4008 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
4009
4010 2018-10-23 Richard Biener <rguenther@suse.de>
4011
4012 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
4013
4014 2018-10-23 Richard Biener <rguenther@suse.de>
4015
4016 PR tree-optimization/86144
4017 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
4018 over simd attribute.
4019
4020 2018-10-23 Richard Biener <rguenther@suse.de>
4021
4022 PR tree-optimization/87693
4023 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
4024 the case we do not find the taken edge.
4025
4026 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
4027 Jinsong Ji <jji@us.ibm.com>
4028
4029 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
4030 (_mm_store_pd): Use unaligned vector type for pointer cast.
4031 (_mm_maskmoveu_si128): Likewise.
4032 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
4033 (_mm_store_ps): Use unaligned vector type for pointer cast.
4034
4035 2018-10-22 Paul Koning <ni1d@arrl.net>
4036
4037 * symtab.c (symtab_node::increase_alignment): Correct max
4038 alignment check.
4039
4040 2018-10-22 Yury Gribov <tetra2005@gmail.com>
4041
4042 PR tree-optimization/87633
4043 * match.pd: Do not generate unordered integer comparisons.
4044
4045 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4046
4047 PR rtl-optimization/87600
4048 * combine.c: Add include of expr.h.
4049 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
4050 register to a pseudo.
4051 (make_more_copies): New function, add a copy to a new pseudo after
4052 the moves from hard registers into pseudos.
4053 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
4054 later. Call make_more_copies.
4055
4056 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
4057
4058 * lra-constraints.c (process_alt_operands): New local array,
4059 matching_early_clobber. Check matching_early_clobber before
4060 decrementing reject, and set matching_early_clobber after.
4061
4062 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4063
4064 PR target/87598
4065 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
4066 call output_addr_const and hope for the best.
4067
4068 2018-10-22 Richard Biener <rguenther@suse.de>
4069
4070 * gimple-ssa-evrp-analyze.c
4071 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
4072 smarter about what ranges to use.
4073 * tree-vrp.c (add_assert_info): Dump here.
4074 (register_edge_assert_for_2): Instead of here at multiple but
4075 not all places.
4076
4077 * gcc.dg/tree-ssa/evrp12.c: New testcase.
4078 * gcc.dg/predict-6.c: Adjust.
4079 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
4080 * gcc.dg/tree-ssa/vrp02.c: Likewise.
4081 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
4082
4083 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
4084 Richard Biener <rguenther@suse.de>
4085
4086 * bitmap.h: Update data structure documentation, including a
4087 description of bitmap views as either linked-lists or splay trees.
4088 (struct bitmap_element_def): Update comments for splay tree bitmaps.
4089 (struct bitmap_head_def): Likewise.
4090 (bitmap_list_view, bitmap_tree_view): New prototypes.
4091 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
4092 tree_form fields.
4093 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
4094 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
4095 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
4096 released bitmap element here.
4097 (bitmap_element_free): Remove.
4098 (bitmap_elt_clear_from): Work on splay tree bitmaps.
4099 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
4100 this function similar ones such that linked-list bitmap implementation
4101 functions are grouped.
4102 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
4103 and moved for grouping.
4104 (bitmap_list_insert_element_after): Renamed from
4105 bitmap_elt_insert_after, and moved for grouping.
4106 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
4107 (bitmap_tree_link_left, bitmap_tree_link_right,
4108 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
4109 bitmap_tree_link_element, bitmap_tree_unlink_element,
4110 bitmap_tree_find_element): New functions for splay-tree bitmap
4111 implementation.
4112 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
4113 Renamed and moved, see above entries.
4114 (bitmap_tree_listify_from): New function to convert part of a splay
4115 tree bitmap to a linked-list bitmap.
4116 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
4117 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
4118 (bitmap_find_bit): Remove.
4119 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
4120 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
4121 Handle splay tree bitmaps.
4122 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
4123 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
4124 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
4125 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
4126 bitmap_intersect_compl_p, bitmap_ior_and_compl,
4127 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
4128 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
4129 corresponding changes to use linked-list specific bitmap_element
4130 manipulation functions as applicable for efficiency.
4131 (bitmap_tree_to_vec): New function.
4132 (debug_bitmap_elt_file): New function split out from ...
4133 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
4134 (bitmap_print): Likewise.
4135
4136 PR tree-optimization/63155
4137 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
4138 SSA edge worklists.
4139 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
4140 in tree-view.
4141
4142 2018-10-22 Martin Liska <mliska@suse.cz>
4143
4144 PR tree-optimization/87686
4145 Revert
4146 2018-08-29 Martin Liska <mliska@suse.cz>
4147
4148 * tree-switch-conversion.c (switch_conversion::expand):
4149 Strenghten assumption about gswitch statements.
4150
4151 2018-10-22 Martin Liska <mliska@suse.cz>
4152
4153 * ipa-icf.c (sem_item::compare_attributes): Remove.
4154 (sem_item::compare_referenced_symbol_properties): Use
4155 attribute_list_equal instead.
4156 (sem_function::equals_wpa): Likewise.
4157 * ipa-icf.h: Remove compare_attributes.
4158
4159 2018-10-22 Richard Biener <rguenther@suse.de>
4160
4161 PR middle-end/87682
4162 * mem-stats.h (mem_usage::operator==): Fix pasto.
4163
4164 2018-10-22 Richard Biener <rguenther@suse.de>
4165
4166 PR tree-optimization/87640
4167 * tree-vrp.c (set_value_range_with_overflow): Decompose
4168 incomplete result.
4169 (extract_range_from_binary_expr_1): Adjust.
4170
4171 2018-10-22 Martin Jambor <mjambor@suse.cz>
4172
4173 * tree-eh.h (stmt_could_throw_p): Add function parameter.
4174 (stmt_can_throw_external): Likewise.
4175 (stmt_can_throw_internal): Likewise.
4176 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
4177 (lower_eh_constructs_2): Likewise.
4178 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
4179 (stmt_can_throw_external): Likewise.
4180 (stmt_can_throw_internal): Likewise.
4181 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
4182 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
4183 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
4184 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
4185 (pass_lower_eh_dispatch::execute): Pass cfun to
4186 stmt_can_throw_external.
4187 (cleanup_empty_eh): Likewise.
4188 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
4189 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
4190 stmt_can_throw_external instead of pushing it to cfun.
4191 (symbol_table::create_edge): Likewise.
4192 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
4193 stmt_can_throw_internal.
4194 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
4195 to stmt_could_throw_p.
4196 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
4197 stmt_can_throw_internal.
4198 (pass_store_merging::execute): Likewise.
4199 * gimple-ssa-strength-reduction.c
4200 (find_candidates_dom_walker::before_dom_children): Pass cfun to
4201 stmt_could_throw_p.
4202 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
4203 stmt_can_throw_internal.
4204 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
4205 to stmt_can_throw_external.
4206 (check_stmt): Pass cfun to stmt_could_throw_p.
4207 (check_stmt): Pass cfun to stmt_can_throw_external.
4208 (pass_nothrow::execute): Likewise.
4209 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
4210 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
4211 stmt_can_throw_internal.
4212 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
4213 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
4214 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
4215 * tree-complex.c (expand_complex_libcall): Pass cfun to
4216 stmt_could_throw_p and to stmt_can_throw_internal.
4217 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
4218 * tree-inline.c (copy_edges_for_bb): Likewise.
4219 (maybe_move_debug_stmts_to_successors): Likewise.
4220 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
4221 stmt_could_throw_p.
4222 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
4223 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
4224 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
4225 stmt_can_throw_internal.
4226 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
4227 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
4228 stmt_could_throw_p.
4229 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
4230 stmt_can_throw_internal.
4231 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
4232 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
4233 stmt_could_throw_p.
4234 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
4235 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
4236 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4237 (convert_mult_to_fma_1): Likewise.
4238 (convert_to_divmod): Likewise.
4239 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
4240 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
4241 * tree-ssa-propagate.c
4242 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
4243 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
4244 (maybe_optimize_range_tests): Likewise.
4245 (linearize_expr_tree): Likewise.
4246 (reassociate_bb): Likewise.
4247 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4248 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
4249 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
4250 (handle_char_store): Likewise.
4251 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
4252 stmt_can_throw_internal.
4253 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
4254 stmt_could_throw_p.
4255 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4256 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
4257 (vectorizable_simd_clone_call): Likewise.
4258 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
4259 (gimple_stringop_fixed_value): Likewise.
4260
4261 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
4262
4263 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
4264 literal pool references.
4265 (s390_check_qrst_address): Adapt to the new behavior of
4266 s390_loadrelative_operand_p ().
4267
4268 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4269
4270 PR target/72782
4271 * config/i386/sse.md (*andnot<mode>3_bcst): New.
4272
4273 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4274
4275 PR target/72782
4276 * config/i386/sse.md (*<code><mode>3_bcst): New.
4277
4278 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4279
4280 PR target/72782
4281 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
4282 V4DI, V16SI and V8DI.
4283 (*sub<mode>3<mask_name>_bcst): New.
4284 (*add<mode>3<mask_name>_bcst): Likewise.
4285
4286 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
4287 Jinsong Ji <jji@us.ibm.com>
4288
4289 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
4290 __m64 with __vector unsigned long long for compatibility.
4291 (_mm_movemask_epi8): Likewise.
4292 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
4293 (_mm_cvttps_pi32): Likewise.
4294 (_mm_cvtpi32_ps): Likewise.
4295 (_mm_cvtps_pi16): Likewise.
4296 (_mm_loadh_pi): Likewise.
4297 (_mm_storeh_pi): Likewise.
4298 (_mm_movehl_ps): Likewise.
4299 (_mm_movelh_ps): Likewise.
4300 (_mm_loadl_pi): Likewise.
4301 (_mm_storel_pi): Likewise.
4302 (_mm_movemask_ps): Likewise.
4303 (_mm_shuffle_pi16): Likewise.
4304
4305 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4306
4307 PR target/72782
4308 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
4309 __builtin_ia32_vfnmsubpd512_mask.
4310 (_mm512_mask_fnmsub_round_pd): Likewise.
4311 (_mm512_fnmsub_pd): Likewise.
4312 (_mm512_mask_fnmsub_pd): Likewise.
4313 (_mm512_maskz_fnmsub_round_pd): Use
4314 __builtin_ia32_vfnmsubpd512_maskz.
4315 (_mm512_maskz_fnmsub_pd): Likewise.
4316 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
4317 (_mm512_mask_fnmsub_round_ps): Likewise.
4318 (_mm512_fnmsub_ps): Likewise.
4319 (_mm512_mask_fnmsub_ps): Likewise.
4320 (_mm512_maskz_fnmsub_round_ps): Use
4321 __builtin_ia32_vfnmsubps512_maskz.
4322 (_mm512_maskz_fnmsub_ps): Likewise.
4323 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
4324 __builtin_ia32_vfnmsubpd256_mask.
4325 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
4326 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4327 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
4328 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
4329 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
4330 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
4331 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
4332 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
4333 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
4334 __builtin_ia32_vfnmsubpd.
4335 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
4336 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
4337 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
4338 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
4339 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
4340 * config/i386/i386-builtin.def: Add
4341 __builtin_ia32_vfnmsubpd256_mask,
4342 __builtin_ia32_vfnmsubpd256_maskz,
4343 __builtin_ia32_vfnmsubpd128_mask,
4344 __builtin_ia32_vfnmsubpd128_maskz,
4345 __builtin_ia32_vfnmsubps256_mask,
4346 __builtin_ia32_vfnmsubps256_maskz,
4347 __builtin_ia32_vfnmsubps128_mask,
4348 __builtin_ia32_vfnmsubps128_maskz,
4349 __builtin_ia32_vfnmsubpd512_mask,
4350 __builtin_ia32_vfnmsubpd512_maskz,
4351 __builtin_ia32_vfnmsubps512_mask,
4352 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
4353 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
4354 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
4355 __builtin_ia32_vfnmsubpd256.
4356 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
4357 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
4358 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
4359 Likewise.
4360 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
4361 Likewise.
4362 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
4363 Likewise.
4364 (fmai_vmfnmsub_<mode><round_name>): Likewise.
4365
4366 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4367
4368 PR target/72782
4369 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
4370 __builtin_ia32_vfnmaddpd512_mask.
4371 (_mm512_mask_fnmadd_round_pd): Likewise.
4372 (_mm512_fnmadd_pd): Likewise.
4373 (_mm512_mask_fnmadd_pd): Likewise.
4374 (_mm512_maskz_fnmadd_round_pd): Use
4375 __builtin_ia32_vfnmaddpd512_maskz.
4376 (_mm512_maskz_fnmadd_pd): Likewise.
4377 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
4378 (_mm512_mask_fnmadd_round_ps): Likewise.
4379 (_mm512_fnmadd_ps): Likewise.
4380 (_mm512_mask_fnmadd_ps): Likewise.
4381 (_mm512_maskz_fnmadd_round_ps): Use
4382 __builtin_ia32_vfnmaddps512_maskz.
4383 (_mm512_maskz_fnmadd_ps): Likewise.
4384 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
4385 __builtin_ia32_vfnmaddpd256_mask.
4386 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
4387 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
4388 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
4389 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4390 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4391 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
4392 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
4393 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
4394 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
4395 __builtin_ia32_vfnmaddpd.
4396 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
4397 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
4398 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
4399 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
4400 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
4401 * config/i386/i386-builtin.def: Add
4402 __builtin_ia32_vfnmaddpd256_mask,
4403 __builtin_ia32_vfnmaddpd256_maskz,
4404 __builtin_ia32_vfnmaddpd128_mask,
4405 __builtin_ia32_vfnmaddpd128_maskz,
4406 __builtin_ia32_vfnmaddps256_mask,
4407 __builtin_ia32_vfnmaddps256_maskz,
4408 __builtin_ia32_vfnmaddps128_mask,
4409 __builtin_ia32_vfnmaddps128_maskz,
4410 __builtin_ia32_vfnmaddpd512_mask,
4411 __builtin_ia32_vfnmaddpd512_maskz,
4412 __builtin_ia32_vfnmaddps512_mask,
4413 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
4414 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
4415 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
4416 __builtin_ia32_vfnmaddpd256.
4417 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
4418 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
4419 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
4420 Likewise.
4421 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
4422 Likewise.
4423 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
4424 Likewise.
4425 (fmai_vmfnmadd_<mode><round_name>): Likewise.
4426
4427 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4428
4429 PR target/72782
4430 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
4431 __builtin_ia32_vfmsubpd512_mask.
4432 (_mm512_mask_fmsub_round_pd): Likewise.
4433 (_mm512_fmsub_pd): Likewise.
4434 (_mm512_mask_fmsub_pd): Likewise.
4435 (_mm512_maskz_fmsub_round_pd): Use
4436 __builtin_ia32_vfmsubpd512_maskz.
4437 (_mm512_maskz_fmsub_pd): Likewise.
4438 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
4439 (_mm512_mask_fmsub_round_ps): Likewise.
4440 (_mm512_fmsub_ps): Likewise.
4441 (_mm512_mask_fmsub_ps): Likewise.
4442 (_mm512_maskz_fmsub_round_ps): Use
4443 __builtin_ia32_vfmsubps512_maskz.
4444 (_mm512_maskz_fmsub_ps): Likewise.
4445 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
4446 __builtin_ia32_vfmsubpd256_mask.
4447 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
4448 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4449 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
4450 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4451 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4452 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
4453 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
4454 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
4455 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
4456 __builtin_ia32_vfmsubpd.
4457 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
4458 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
4459 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
4460 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
4461 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
4462 * config/i386/i386-builtin.def: Add
4463 __builtin_ia32_vfmsubpd256_mask,
4464 __builtin_ia32_vfmsubpd256_maskz,
4465 __builtin_ia32_vfmsubpd128_mask,
4466 __builtin_ia32_vfmsubpd128_maskz,
4467 __builtin_ia32_vfmsubps256_mask,
4468 __builtin_ia32_vfmsubps256_maskz,
4469 __builtin_ia32_vfmsubps128_mask,
4470 __builtin_ia32_vfmsubps128_maskz,
4471 __builtin_ia32_vfmsubpd512_mask,
4472 __builtin_ia32_vfmsubpd512_maskz,
4473 __builtin_ia32_vfmsubps512_mask,
4474 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
4475 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
4476 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
4477 __builtin_ia32_vfmsubpd256.
4478 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
4479 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
4480 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
4481 Likewise.
4482 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
4483 Likewise.
4484 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
4485 Likewise.
4486 (fmai_vmfmsub_<mode><round_name>): Likewise.
4487
4488 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4489
4490 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
4491 Remove plus. Renamed to ...
4492 (*sub<mode>3<mask_name>_bcst): This.
4493 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
4494 (*add<mode>3<mask_name>_bcst): This.
4495
4496 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4497
4498 PR target/72782
4499 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
4500
4501 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4502
4503 PR target/87662
4504 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
4505 (_mm_or_epi32): Likewise.
4506 (_mm256_xor_epi32): Likewise.
4507 (_mm_xor_epi32): Likewise.
4508 (_mm256_or_epi64): Likewise.
4509 (_mm_or_epi64): Likewise.
4510 (_mm256_xor_epi64): Likewise.
4511 (_mm_xor_epi64): Likewise.
4512
4513 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
4514
4515 PR target/72782
4516 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
4517
4518 2018-10-20 Jakub Jelinek <jakub@redhat.com>
4519
4520 PR middle-end/87647
4521 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
4522
4523 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
4524
4525 * doc/ux.texi: Move @section directly after @node.
4526
4527 2018-10-19 Jakub Jelinek <jakub@redhat.com>
4528
4529 PR middle-end/85488
4530 PR middle-end/87649
4531 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
4532 depend closely nested inside of loop with ordered clause with
4533 a parameter.
4534
4535 2018-10-19 David Malcolm <dmalcolm@redhat.com>
4536
4537 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
4538 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
4539 * doc/ux.texi: New file.
4540
4541 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
4542
4543 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
4544 be the first CR field allocated.
4545
4546 2018-10-19 Richard Biener <rguenther@suse.de>
4547
4548 PR target/87657
4549 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
4550 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
4551
4552 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4553
4554 PR target/72782
4555 * config/i386/sse.md
4556 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
4557 (*add<mode>3<mask_name>_bcst_2): Likewise.
4558
4559 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4560
4561 * config/i386/sse.md
4562 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4563 Replace nonimmediate_operand with register_operand.
4564 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4565 Likewise.
4566 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4567 Likewise.
4568
4569 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
4570
4571 PR rtl-optimization/87596
4572 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
4573 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
4574 for instructions in FROM..TO range.
4575
4576 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
4577
4578 * cfgexpand.c (expand_one_var): Use specific wording in error message
4579 for non-local frame variables.
4580 * stor-layout.c (layout_decl): Do not issue a warning for them.
4581
4582 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
4583
4584 * haifa-sched.c (priority): Add force_recompute parameter.
4585 (apply_replacement): Call priority () with force_recompute = true.
4586 (restore_pattern): Likewise.
4587
4588 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4589
4590 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
4591 HOST_BITS_PER_WIDE_INT.
4592 (test_vector_ops_duplicate): Likewise.
4593
4594 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4595
4596 PR target/72782
4597 * config/i386/sse.md (VF_AVX512): New.
4598 (avx512bcst): Likewise.
4599 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4600 Likewise.
4601 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4602 Likewise.
4603 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4604 Likewise.
4605
4606 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
4607
4608 * doc/invoke.texi (-dumpversion): Improve grammar.
4609 (-dumpfullversion): Make more consistent with -dumpversion.
4610
4611 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
4612
4613 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
4614 Set JUMP_LABEL to the jump insn.
4615 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
4616 Predict emitted jump and add label to jump insn.
4617
4618 2018-10-18 David Malcolm <dmalcolm@redhat.com>
4619
4620 PR tree-optimization/87562
4621 * input.c (get_substring_ranges_for_loc): Use
4622 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
4623 getting the linemap for the endpoint. Verify that it's either
4624 in the same linemap as the start point's spelling location, or
4625 at least in the same file.
4626
4627 2018-10-18 Richard Biener <rguenther@suse.de>
4628
4629 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
4630 feed width-specific load/store costs through ix86_vec_cost.
4631 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
4632 (k8_cost): Likewise.
4633 (bdver_cost): Likewise.
4634 (znver1_cost): Likewise.
4635 (btver1_cost): Likewise.
4636 (btver2_cost): Likewise.
4637
4638 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4639
4640 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
4641 to simplify subreg of vec_merge.
4642
4643 2018-10-18 Richard Biener <rguenther@suse.de>
4644
4645 * config/i386/i386.c: Fix costing of vector FMA.
4646
4647 2018-10-18 Richard Biener <rguenther@suse.de>
4648
4649 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
4650 and argument.
4651 (ix86_builtin_vectorization_cost): For vec_construct properly
4652 cost insertion into SSE regs.
4653 (...): Adjust calls to ix86_vec_cost.
4654
4655 2018-10-18 Richard Biener <rguenther@suse.de>
4656
4657 PR middle-end/87087
4658 Revert
4659 2018-02-07 Richard Biener <rguenther@suse.de>
4660
4661 PR tree-optimization/84204
4662 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
4663 this place.
4664
4665 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4666
4667 PR target/87537
4668 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
4669 of vec_duplicate.
4670 (test_vector_ops_duplicate): Add test for a scalar subreg of a
4671 VEC_MERGE of a VEC_DUPLICATE.
4672
4673 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4674
4675 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
4676 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
4677 * doc/standards.texi (C Language): Document C2X.
4678 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
4679 (rl78_option_override): Handle "GNU C2X" language name.
4680
4681 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4682
4683 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
4684 Document C17 as published in 2018.
4685
4686 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
4687
4688 PR middle-end/87623
4689 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
4690 bail out if both sides do not have the same storage order.
4691
4692 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4693
4694 * bitmap.c (bitmap_head::dump): New.
4695 * bitmap.h (bitmap_head): Add dump().
4696 * gimple-ssa-evrp-analyze.c
4697 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4698 (evrp_range_analyzer::set_ssa_range_info): Same.
4699 (evrp_range_analyzer::record_ranges_from_phis): Same.
4700 (evrp_range_analyzer::record_ranges_from_stmt): Same.
4701 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4702 * gimple-ssa-sprintf.c (get_int_range): Same.
4703 (format_integer): Same.
4704 (sprintf_dom_walker::handle_gimple_call): Same.
4705 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4706 (ipcp_vr_lattice::top_p): Same.
4707 (ipcp_vr_lattice::bottom_p): Same.
4708 (ipcp_vr_lattice::set_to_bottom): Same.
4709 (ipa_vr_operation_and_type_effects): Same.
4710 (propagate_vr_across_jump_function): Same.
4711 (ipcp_store_vr_results): Same.
4712 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4713 (ipa_print_node_jump_functions_for_edge): Same.
4714 (ipa_get_value_range): Same.
4715 (ipa_compute_jump_functions_for_edge): Same.
4716 (ipa_write_jump_function): Same.
4717 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4718 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4719 Same.
4720 * vr-values.c (set_value_range_to_nonnegative): Same.
4721 (set_value_range_to_truthvalue): Same.
4722 (vr_values::get_value_range): Same.
4723 (vr_values::set_defs_to_varying): Same.
4724 (vr_values::update_value_range): Same.
4725 (symbolic_range_based_on_p): Same.
4726 (vr_values::op_with_boolean_value_range_p): Same.
4727 (vr_values::extract_range_for_var_from_comparison_expr): Same.
4728 (vr_values::extract_range_from_ssa_name): Same.
4729 (vr_values::extract_range_from_binary_expr): Same.
4730 (vr_values::extract_range_from_unary_expr): Same.
4731 (vr_values::extract_range_from_cond_expr): Same.
4732 (vr_values::extract_range_from_comparison): Same.
4733 (vr_values::check_for_binary_op_overflow): Same.
4734 (vr_values::extract_range_basic): Same.
4735 (vr_values::extract_range_from_assignment): Same.
4736 (compare_ranges): Same.
4737 (compare_range_with_value): Same.
4738 (vr_values::adjust_range_with_scev): Same.
4739 (vrp_valueize): Same.
4740 (vrp_valueize_1): Same.
4741 (vr_values::get_vr_for_comparison): Same.
4742 (vr_values::compare_name_with_value): Same.
4743 (vr_values::compare_names): Same.
4744 (vr_values::vrp_evaluate_conditional): Same.
4745 (find_case_label_ranges): Same.
4746 (vr_values::vrp_visit_switch_stmt): Same.
4747 (vr_values::extract_range_from_phi_node): Same.
4748 (vr_values::simplify_div_or_mod_using_ranges): Same.
4749 (vr_values::simplify_bit_ops_using_ranges): Same.
4750 (test_for_singularity): Same.
4751 (range_fits_type_p): Same.
4752 (vr_values::simplify_cond_using_ranges_1): Same.
4753 (vr_values::simplify_switch_using_ranges): Same.
4754 (vr_values::simplify_float_conversion_using_ranges): Same.
4755 (vr_values::two_valued_val_range_p): Same.
4756 (vr_values::add_equivalence): Move to value_range::equiv_add.
4757 * vr-values.h (vr_values::add_equivalence): Remove.
4758 (VR_INITIALIZER): Remove.
4759 * tree-vrp.c (value_range::set): New.
4760 (value_range::equiv_add): New.
4761 (value_range::value_range): New.
4762 (value_range::deep_copy): New.
4763 (value_range::check): New.
4764 (value_range::equal_p): New.
4765 (value_range::ignore_equivs_equal_p): New.
4766 (value_range::operator==): New.
4767 (value_range::operator!=): New.
4768 (value_range::symbolic_p): New.
4769 (value_range::numeric_p): New.
4770 (value_range::set_undefined): New.
4771 (value_range::set_varying): New.
4772 (value_range::may_contain_p): New.
4773 (value_range::equiv_clear): New.
4774 (value_range::singleton_p): New.
4775 (value_range::intersect): New.
4776 (value_range::dump): New.
4777 (value_range::set_and_canonicalize): New.
4778 (set_value_range): Adjust for value_range API.
4779 (set_value_range_to_undefined): Same.
4780 (set_value_range_to_varying): Same.
4781 (set_and_canonicalize_value_range): Same.
4782 (set_value_range_to_nonnull): Same.
4783 (set_value_range_to_null): Same.
4784 (range_is_null): Same.
4785 (range_is_nonnull): Same.
4786 (range_int_cst_p): Same.
4787 (range_int_cst_singleton_p): Same.
4788 (symbolic_range_p): Same.
4789 (range_includes_zero_p): Same.
4790 (value_range_constant_singleton): Same.
4791 (vrp_set_zero_nonzero_bits): Same.
4792 (ranges_from_anti_range): Same.
4793 (extract_range_into_wide_ints): Same.
4794 (extract_range_from_multiplicative_op): Same.
4795 (set_value_range_with_overflow): Same.
4796 (extract_range_from_binary_expr_1): Same.
4797 (extract_range_from_unary_expr): Same.
4798 (dump_value_range): Same.
4799 (debug_value_range): Same.
4800 (vrp_prop::check_array_ref): Same.
4801 (vrp_prop::check_mem_ref): Same.
4802 (vrp_prop::vrp_initialize): Same.
4803 (vrp_prop::visit_stmt): Same.
4804 (intersect_ranges): Same.
4805 (vrp_prop::visit_phi): Same.
4806 (vrp_prop::vrp_finalize): Same.
4807 (determine_value_range_1): Same.
4808 (determine_value_range): Same.
4809 (vrp_intersect_ranges_1): Rename to...
4810 (vrp_intersect_1): this.
4811 (vrp_intersect_ranges): Rename to...
4812 (value_range::intersect_helper): ...this.
4813 (vrp_meet_1): Rename to...
4814 (value_range::union_helper): ...this.
4815 (vrp_meet): Rename to...
4816 (value_range::union_): ...this.
4817 (copy_value_range): Remove.
4818 * tree-vrp.h (struct value_range): Rewrite into a proper class.
4819 (value_range::vrtype): New.
4820 (value_range::type): New.
4821 (value_range::equiv): New.
4822 (value_range::min): New.
4823 (value_range::max): New.
4824 (value_range::varying_p): New.
4825 (value_range::undefined_p): New.
4826 (value_range::null_p): New.
4827 (value_range::equiv_add): New.
4828 (copy_value_range): Remove.
4829
4830 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4831
4832 * Makefile.in (SELFTEST_TARGETS): New.
4833 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4834 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4835 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4836 c/Make-lang.in.
4837 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4838 (selftest-c++-gdb, selftest-c++-valgrind): Move to
4839 cp/Make-lang.in.
4840 * configure: Regenerate.
4841 * configure.ac (selftest_languages): New.
4842
4843 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4844
4845 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4846 overflow wraps argument.
4847 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4848 wide_int_range_multiplicative_op.
4849 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4850 overflow wraps argument.
4851 (wide_int_range_multiplicative_op): Same.
4852 (wide_int_range_lshift): Same.
4853 (wide_int_range_div): Same.
4854 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4855 (wide_int_range_lshift): Same.
4856 (wide_int_range_div): Same.
4857
4858 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4859
4860 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4861 use sign as argument.
4862 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4863 wide_int_range_shift_undefined_p.
4864
4865 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4866
4867 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4868 Rename to...
4869 (@despeculate_copy<ALLI_TI:mode>): ... This.
4870 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4871 switch statement.
4872
4873 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4874
4875 * config.gcc: Obsolete *-*-solaris2.10*.
4876 * doc/install.texi (Specific, *-*-solaris2*): Document it.
4877
4878 2018-10-12 Jeff Law <law@redhat.com>
4879
4880 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4881 reg + sym +- const_int addressing modes.
4882
4883 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4884
4885 * common.opt (fdiagnostics-minimum-margin-width=): New option.
4886 * diagnostic-show-locus.c (layout::layout): Apply the minimum
4887 margin width.
4888 (layout::start_annotation_line): Only print up to 3 of the
4889 margin character, to avoid touching the left-hand side.
4890 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4891 minimum margin width, as set by test_diagnostic_context's ctor.
4892 (selftest::test_fixit_insert_containing_newline): Likewise.
4893 (selftest::test_fixit_insert_containing_newline_2): Likewise.
4894 (selftest::test_line_numbers_multiline_range): Clear
4895 dc.min_margin_width.
4896 * diagnostic.c (diagnostic_initialize): Initialize
4897 min_margin_width.
4898 * diagnostic.h (struct diagnostic_context): Add field
4899 "min_margin_width".
4900 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4901 * opts.c (common_handle_option): Handle
4902 OPT_fdiagnostics_minimum_margin_width_.
4903 * selftest-diagnostic.c
4904 (selftest::test_diagnostic_context::test_diagnostic_context):
4905 Initialize min_margin_width to 6.
4906 * toplev.c (general_init): Initialize global_dc->min_margin_width.
4907
4908 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4909
4910 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4911 Fix usage of "error_at_rich_loc" in the comment.
4912
4913 2018-10-15 Renlin Li <renlin.li@arm.com>
4914
4915 PR target/87563
4916 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4917 if-conversioned loop when it contains ifn with types not
4918 supported by backend.
4919 * internal-fn.c (expand_direct_optab_fn): Add an assert.
4920 (direct_internal_fn_supported_p): New helper function.
4921 * internal-fn.h (direct_internal_fn_supported_p): Declare.
4922
4923 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4924
4925 PR target/87572
4926 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4927 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4928 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4929
4930 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
4931
4932 PR tree-optimization/87022
4933 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4934 bits in dist vector rather than the first one.
4935
4936 2018-10-15 Richard Biener <rguenther@suse.de>
4937
4938 PR middle-end/87610
4939 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4940 (visit_loadstore): When a used restrict tag escaped verify that
4941 the points-to solution of "other" pointers do not include
4942 escaped.
4943 (compute_dependence_clique): If a used restrict tag escaped
4944 communicated that down to visit_loadstore.
4945
4946 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
4947
4948 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4949 into reg if it isn't a general operand.
4950
4951 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4952
4953 PR target/87599
4954 * config/i386/sse.md (*vec_dupv2di): Add register source to
4955 movddup.
4956
4957 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4958
4959 PR target/87572
4960 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4961 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4962 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4963 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4964
4965 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
4966
4967 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4968 (notice_args_size): Set it in the current trace if no insn that can
4969 throw internally has been seen yet.
4970 (connect_traces): When connecting args_size between traces, allow the
4971 incoming values not to match if there is an insn setting it before the
4972 first insn that can throw internally; in that case, force the creation
4973 of a CFI note on this latter insn.
4974
4975 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
4976
4977 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4978 the base class, because using the injected-class-name was not clearly
4979 specified until DR 176.
4980
4981 2018-10-12 Paul Koning <ni1d@arrl.net>
4982
4983 * config/pdp11/pdp11.md (doloop_end): New expander.
4984 (doloop_end_insn): renamed from "doloop_end".
4985 (addqi3): New pattern.
4986 (subqi3): New pattern.
4987 * config/pdp11/predicates.md (incdec_operand): New predicate.
4988
4989 2018-10-12 Yury Gribov <tetra2005@gmail.com>
4990
4991 PR middle-end/81376
4992 * real.c (format_helper::can_represent_integral_type_p): New function
4993 * real.h (format_helper::can_represent_integral_type_p): Ditto.
4994 * match.pd: New pattern.
4995
4996 2018-10-12 Alexandre Oliva <oliva@adacore.com>
4997
4998 * configure.ac: Introduce --enable-large-address-aware
4999 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
5000 * doc/install.texi: Document it.
5001 * configure, config.in: Rebuilt.
5002 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
5003 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
5004 (LINK_SPEC): Insert it.
5005 * config/i386/mingw-w64.h: Likewise.
5006
5007 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
5008
5009 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
5010
5011 PR rtl-optimization/87600
5012 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
5013
5014 2018-10-12 Paul Koning <ni1d@arrl.net>
5015
5016 * doc/md.texi (doloop_end): Document that the pattern code may
5017 need to check operand mode.
5018
5019 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
5020
5021 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
5022 to zero-extend between int and floating-point registers.
5023 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
5024 ldp into floating-point registers. Add type and arch attributes.
5025 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
5026 Use f_loads for type attribute.
5027
5028 2018-10-11 Martin Sebor <msebor@redhat.com>
5029
5030 * doc/extend.texi (attribute packed): Correct typos.
5031
5032 2018-10-11 Martin Sebor <msebor@redhat.com>
5033
5034 * doc/extend.texi (attribute flatten): Mention interaction with
5035 noinline.
5036
5037 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
5038
5039 PR target/87156
5040 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
5041 Set new_decl virtual flag to zero.
5042
5043 2018-10-11 Martin Sebor <msebor@redhat.com>
5044
5045 PR middle-end/87593
5046 * doc/extend.texi (attribute format_arg): Discuss using multiple
5047 attributes on a single function.
5048
5049 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
5050
5051 PR tree-optimization/86829
5052 * match.pd (sin (atan (x))): New simplification rules.
5053 (cos (atan (x))): Likewise.
5054 * real.c (build_sinatan_real): New function.
5055 * real.h (build_sinatan_real): Prototype.
5056
5057 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
5058
5059 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
5060 function.
5061 (fold_mergeeo_helper): New helper function.
5062 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
5063 intrinsics. Correct some whitespace indentation issues.
5064
5065 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
5066
5067 PR target/87511
5068 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
5069 Use HOST_WIDE_INT_1U for shift.
5070
5071 2018-10-11 Doug Rupp <rupp@adacore.com>
5072 Olivier Hainque <hainque@adacore.com>
5073
5074 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
5075 Pass --relax to the linker for RTPs.
5076 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
5077
5078 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
5079 Jan Hubicka <jh@suse.cz>
5080 Martin Jambor <mjambor@suse.cz>
5081
5082 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
5083 the same elements are repeated rather than printing all of them.
5084 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
5085 "repeated" elements.
5086 * read-rtl-function.c (test_loading_repeat): New function.
5087 (read_rtl_function_c_tests): Call test_loading_repeat.
5088 * rtl-tests.c (test_dumping_repeat): New function.
5089 (rtl_tests_c_tests): Call test_dumping_repeat.
5090
5091 2018-10-11 Richard Biener <rguenther@suse.de>
5092
5093 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
5094 bdver?_cost): Unify to ...
5095 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
5096 * config/i386/i386.c (processor_cost_table): Adjust.
5097
5098 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
5099
5100 PR middle-end/87574
5101 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
5102 the thunk when expanding to GIMPLE.
5103
5104 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
5105
5106 * varasm.c (mergeable_string_section): Don't try to move zero-length
5107 strings to the merge section.
5108
5109 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
5110
5111 PR target/87573
5112 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
5113
5114 2018-10-10 Jakub Jelinek <jakub@redhat.com>
5115
5116 PR target/87550
5117 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
5118 to special_args set.
5119
5120 2018-10-10 Richard Biener <rguenther@suse.de>
5121
5122 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
5123 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
5124 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
5125 and recursing and pattern terminating the recursion on SSE
5126 vector width using ix86_expand_reduc.
5127 (reduc_sminmax_scal_<mode>): Split into part reducing to half
5128 width and recursing and SSE2 vector variant doing the final
5129 reduction with ix86_expand_reduc.
5130 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
5131 with terminating the recursion at AVX level, splitting that
5132 to SSE there.
5133
5134 2018-10-09 David Malcolm <dmalcolm@redhat.com>
5135
5136 * genmatch.c (error_cb): Rename to...
5137 (diagnostic_cb): ...this, converting int params to enums.
5138 (fatal_at): Update for renaming.
5139 (warning_at): Likewise.
5140 (main): Likewise.
5141 * input.c (selftest::ebcdic_execution_charset::apply):
5142 Update for renaming of...
5143 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
5144 to...
5145 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
5146 converting level and reason to enums.
5147 (class selftest::lexer_error_sink): Rename to...
5148 (class selftest::lexer_test_options): ...this, renaming field
5149 "m_errors" to "m_diagnostics".
5150 (selftest::lexer_test_options::apply): Update for renaming of...
5151 (selftest::lexer_test_options::on_error): ...this, renaming to...
5152 (selftest::lexer_test_options::on_diagnostic): ...this
5153 converting level and reason to enums.
5154 (selftest::test_lexer_string_locations_raw_string_unterminated):
5155 Update for renamings.
5156 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
5157 "reason".
5158
5159 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
5160
5161 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
5162 * config/rs6000/pmmintrin.h: New file.
5163
5164 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
5165
5166 PR tree-optimization/86659
5167 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
5168
5169 2018-10-09 Richard Biener <rguenther@suse.de>
5170
5171 PR tree-optimization/63155
5172 * tree-ssa-structalias.c: Include tree-ssa.h.
5173 (get_constraint_for_ssa_var): For undefs return nothing_id.
5174 (find_func_aliases): Cleanup PHI handling.
5175
5176 2018-10-09 Richard Biener <rguenther@suse.de>
5177
5178 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
5179 replacements.
5180
5181 2018-10-09 Martin Liska <mliska@suse.cz>
5182
5183 * asan.c (asan_emit_stack_protection): If a stack variable
5184 is located in a same file as current function, then emit
5185 line info into variable definition string.
5186
5187 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5188
5189 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
5190 information.
5191
5192 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5193
5194 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
5195 on the thunk.
5196
5197 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5198
5199 PR tree-optimization/86659
5200 * gimple-match.h (struct gimple_match_op): Add reverse field.
5201 (gimple_match_op::set_op): New overloaded method.
5202 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
5203 the REF_REVERSE_STORAGE_ORDER flag on the value.
5204 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
5205 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
5206
5207 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
5208
5209 PR middle-end/63155
5210 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
5211 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
5212
5213 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
5214
5215 PR target/87517
5216 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
5217 Defined with __builtin_ia32_vfmaddsubpd512_mask.
5218
5219 2018-10-08 Richard Biener <rguenther@suse.de>
5220
5221 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
5222 cost the same as AVX128 ones.
5223
5224 2018-10-08 Paul Koning <ni1d@arrl.net>
5225
5226 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
5227 (expand_block_move): New function.
5228 * config/pdp11/pdp11.c (output_block_move): Remove.
5229 (expand_block_move): New function.
5230 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
5231 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
5232 (*movmemhi1): Remove.
5233
5234 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
5235
5236 * config/s390/2827.md: Increase latencies for some FP instructions.
5237
5238 2018-10-08 Richard Biener <rguenther@suse.de>
5239
5240 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
5241 Open a dump scope.
5242 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
5243 * tree-vectorizer.h (dump_stmt_cost): Adjust.
5244 (add_stmt_cost): Dump return value of the hook.
5245
5246 2018-10-08 Richard Biener <rguenther@suse.de>
5247
5248 PR tree-optimization/63155
5249 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
5250 (ssa_propagation_engine::ssa_propagate): Remove redundant
5251 bitmap bit clearing.
5252
5253 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
5254
5255 PR rtl-optimization/86939
5256 PR rtl-optimization/87479
5257 * ira.h (non_conflicting_reg_copy_p): New prototype.
5258 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
5259 (make_hard_regno_dead): Don't add conflicts for register
5260 ignore_reg_for_conflicts.
5261 (make_object_dead): Likewise.
5262 (non_conflicting_reg_copy_p): New function.
5263 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
5264 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
5265 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
5266 (make_hard_regno_dead): Don't add conflicts for register
5267 ignore_reg_for_conflicts. Remove special conflict handling of
5268 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
5269 check_pic_pseudo_p and update callers.
5270 (mark_pseudo_dead): Don't add conflicts for register
5271 ignore_reg_for_conflicts.
5272 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
5273
5274 2018-10-05 Andrew Waterman <andrew@sifive.com>
5275 Jim Wilson <jimw@sifive.com>
5276
5277 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
5278 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
5279 new pattern using HONOR_SNANS that emits one extra instruction.
5280
5281 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
5282
5283 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
5284 patterns): Merge SI and DI patterns to a GPR pattern.
5285 (unnamed define_insn and define_split for record form of that): Merge
5286 to a single define_insn_and_split pattern.
5287
5288 2018-10-05 David Malcolm <dmalcolm@redhat.com>
5289
5290 PR c++/56856
5291 * input.c (expand_location_to_spelling_point): Add param "aspect"
5292 and use rather than hardcoding LOCATION_ASPECT_CARET.
5293 (get_substring_ranges_for_loc): Handle the case of a single token
5294 within a macro expansion.
5295 * input.h (expand_location_to_spelling_point): Add "aspect" param,
5296 defaulting to LOCATION_ASPECT_CARET.
5297
5298 2018-10-05 Paul Koning <ni1d@arrl.net>
5299
5300 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
5301 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
5302 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
5303 (pdp11_guard_type): New function.
5304
5305 2018-10-05 Paul Koning <ni1d@arrl.net>
5306
5307 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
5308 * config/pdp11/pdp11.opt (mfloat32): Remove.
5309 (mfloat64): Remove.
5310 * doc/invoke.texi (pdp11 -mfloat32): Remove:
5311 (pdp11 -mfloat64): Remove.
5312
5313 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
5314
5315 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
5316 (*cmp<mode>_cc_i387): Ditto.
5317 (*cmpu<mode>_cc_i387): Ditto.
5318 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5319 * config/i386/i386.c (ix86_expand_fp_compare): Remove
5320 "scratch" argument.
5321 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
5322 Emit x86_sahf_1 pattern.
5323 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
5324 (ix86_expand_carry_flag_compare): Ditto.
5325
5326 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
5327
5328 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
5329 to reg_or_0_operand. Add "C" constraint.
5330 (*cmpxf_cc_i387): Ditto.
5331 (*cmp<mode>_i387): Change operand 2 predicate
5332 to nonimm_or_0_operand. Add "C" constraint.
5333 (*cmp<mode>_cc_i387): Ditto.
5334 (*cmp<mode>_0_i387): Remove insn pattern.
5335 (*cmp<mode>_0_cc_i387): Ditto.
5336
5337 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
5338
5339 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
5340 * config/i386/predicates.md (nonimm_or_0_operand): Rename
5341 from vector_move_operand. Update all uses.
5342
5343 2018-10-05 Martin Sebor <msebor@redhat.com>
5344
5345 PR tree-optimization/87490
5346 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
5347 consistently.
5348
5349 2018-10-05 Richard Biener <rguenther@suse.de>
5350
5351 PR tree-optimization/63155
5352 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
5353 vertical space in dumpfiles.
5354 * tree-ssa-propagate.h
5355 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
5356 * tree-ssa-propagate.c (cfg_blocks_back): New global.
5357 (ssa_edge_worklist_back): Likewise.
5358 (curr_order): Likewise.
5359 (cfg_blocks_get): Remove abstraction.
5360 (cfg_blocks_add): Likewise.
5361 (cfg_blocks_empty_p): Likewise.
5362 (add_ssa_edge): Add to current or next worklist based on
5363 RPO index.
5364 (add_control_edge): Likewise.
5365 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
5366 into ...
5367 (ssa_propagation_engine::ssa_propagate): ... here. Unify
5368 iteration from CFG and SSA edge worklist so we process
5369 everything in RPO order, prioritizing forward progress
5370 over iteration.
5371 (ssa_prop_init): Allocate new worklists, do not dump
5372 immediate uses.
5373 (ssa_prop_fini): Free new worklists.
5374
5375 2018-10-05 Richard Biener <rguenther@suse.de>
5376
5377 * tree-core.h (tree_block::abstract_flag): Remove.
5378 (tree_block::block_num): Make full 32bits.
5379 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
5380 * tree.h (BLOCK_ABSTRACT): Remove.
5381 * dwarf2out.c (gen_lexical_block_die): Remove dead code
5382 resulting from BLOCK_ABSTRACT being always false.
5383 (gen_inlined_subroutine_die): Likewise.
5384 (gen_block_die): Likewise.
5385 * tree.c (block_ultimate_origin): Likewise.
5386 * tree-pretty-print.c (dump_block_node): Remove code dealing
5387 with BLOCK_ABSTRACT.
5388 * tree-ssa-live.c (dump_scope_block): Likewise.
5389 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
5390 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
5391
5392 2018-10-05 Richard Biener <rguenther@suse.de>
5393
5394 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
5395 is asked for initialize mode to the component mode of the
5396 vector type.
5397
5398 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
5399
5400 PR target/87522
5401 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
5402 assembler for -mavx.
5403 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
5404
5405 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
5406
5407 PR target/87509
5408 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
5409 RS6000_BTM_DFP.
5410 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
5411 to be DImode. When using mffscrn, force the operand to a register.
5412
5413 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
5414
5415 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
5416 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
5417 X87MODEF mode iterator.
5418 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
5419 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
5420 X87MODEF mode iterator.
5421
5422 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
5423
5424 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
5425 -Wno-prio-ctor-dtor.
5426
5427 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5428
5429 * Makefile.in (OBJS): Add opt-problem.o.
5430 * dump-context.h: Include "selftest.h.
5431 (selftest::temp_dump_context): New forward decl.
5432 (class dump_context): Make friend of class
5433 selftest::temp_dump_context.
5434 (dump_context::dump_loc_immediate): New decl.
5435 (class dump_pretty_printer): Move here from dumpfile.c.
5436 (class temp_dump_context): Move to namespace selftest.
5437 (temp_dump_context::temp_dump_context): Add param
5438 "forcibly_enable_dumping".
5439 (selftest::verify_dumped_text):
5440 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
5441 (selftest::verify_item):
5442 (ASSERT_IS_TEXT): Move here from dumpfile.c.
5443 (ASSERT_IS_TREE): Likewise.
5444 (ASSERT_IS_GIMPLE): Likewise.
5445 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
5446 to...
5447 (dump_context::dump_loc_immediate): ...this new function.
5448 (class dump_pretty_printer): Move to dump-context.h.
5449 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
5450 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
5451 (temp_dump_context::temp_dump_context): Move to "selftest"
5452 namespace. Add param "forcibly_enable_dumping", and use it to
5453 conditionalize the use of m_pp;
5454 (selftest::verify_dumped_text): Make non-static.
5455 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
5456 (selftest::verify_item): Make non-static.
5457 (ASSERT_IS_TEXT): Move to dump-context.h.
5458 (ASSERT_IS_TREE): Likewise.
5459 (ASSERT_IS_GIMPLE): Likewise.
5460 (selftest::test_capture_of_dump_calls): Pass "true" for new
5461 param of temp_dump_context.
5462 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
5463 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
5464 TDF_COMPARE_DEBUG.
5465 * opt-problem.cc: New file.
5466 * opt-problem.h: New file.
5467 * optinfo-emit-json.cc
5468 (selftest::test_building_json_from_dump_calls): Pass "true" for
5469 new param of temp_dump_context.
5470 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
5471 (optinfo::emit_for_opt_problem): New function.
5472 (optinfo::emit): Clarity which emit_item is used.
5473 * optinfo.h (optinfo::get_dump_location): New accessor.
5474 (optinfo::emit_for_opt_problem): New decl.
5475 (optinfo::emit): Make const.
5476 * selftest-run-tests.c (selftest::run_tests): Call
5477 selftest::opt_problem_cc_tests.
5478 * selftest.h (selftest::opt_problem_cc_tests): New decl.
5479 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
5480 bool to opt_result, converting fprintf messages to
5481 opt_result::failure_at calls. Add "stmt" param for use by the
5482 failure_at calls.
5483 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
5484 (runtime_alias_check_p): Convert return type from bool to
5485 opt_result, converting dump_printf calls to
5486 opt_result::failure_at, using the statement DDR_A for their
5487 location.
5488 (find_data_references_in_stmt): Convert return type from bool to
5489 opt_result, converting "return false" to opt_result::failure_at
5490 with a new message.
5491 * tree-data-ref.h: Include "opt-problem.h".
5492 (dr_analyze_innermost): Convert return type from bool to opt_result,
5493 and add a const gimple * param.
5494 (find_data_references_in_stmt): Convert return type from bool to
5495 opt_result.
5496 (runtime_alias_check_p): Likewise.
5497 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
5498 dr_analyze_innermost.
5499 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
5500 Convert return type from bool to opt_result, adding a message for
5501 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
5502 (vect_analyze_data_ref_dependence): Convert return type from bool
5503 to opt_result. Change sense of return type from "false"
5504 effectively meaning "no problems" to "false" meaning a problem,
5505 so that "return false" becomes "return opt_result::success".
5506 Convert "return true" calls to opt_result::failure_at, using
5507 the location of statement A rather than vect_location.
5508 (vect_analyze_data_ref_dependences): Convert return type from bool
5509 to opt_result.
5510 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
5511 calls to opt_result::failure_at, using the stmt location rather
5512 than vect_location.
5513 (vect_verify_datarefs_alignment): Convert return type from bool
5514 to opt_result.
5515 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
5516 into multiple more-tightly-scoped copies.
5517 (vect_analyze_data_refs_alignment): Convert return type from bool
5518 to opt_result.
5519 (vect_analyze_data_ref_accesses): Likewise, converting a
5520 "return false" to a "return opt_result::failure_at", adding a
5521 new message.
5522 (vect_prune_runtime_alias_test_list): Convert return type from
5523 bool to opt_result, converting dump_printf_loc to
5524 opt_result::failure_at. Add a %G to show the pertinent statement,
5525 and use the stmt's location rather than vect_location.
5526 (vect_find_stmt_data_reference): Convert return type from
5527 bool to opt_result, converting dump_printf_loc to
5528 opt_result::failure_at, using stmt's location.
5529 (vect_analyze_data_refs): Convert return type from bool to
5530 opt_result. Convert "return false" to "return
5531 opt_result::failure_at", adding messages as needed.
5532 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
5533 type from bool to opt_result.
5534 (vect_determine_vf_for_stmt): Likewise.
5535 (vect_determine_vectorization_factor): Likewise, converting
5536 dump_printf_loc to opt_result::failure_at, using location of phi
5537 rather than vect_location.
5538 (vect_analyze_loop_form_1): Convert return type from bool to
5539 opt_result, converting dump_printf_loc calls, retaining the use of
5540 vect_location.
5541 (vect_analyze_loop_form): Convert return type from loop_vec_info
5542 to opt_loop_vec_info.
5543 (vect_analyze_loop_operations): Convert return type from bool to
5544 opt_result, converting dump_printf_loc calls, using the location
5545 of phi/stmt rather than vect_location where available. Convert
5546 various "return false" to "return opt_result::failure_at" with
5547 "unsupported phi" messages.
5548 (vect_get_datarefs_in_loop): Convert return type from bool to
5549 opt_result. Add a message for the
5550 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
5551 (vect_analyze_loop_2): Convert return type from bool to
5552 opt_result. Ensure "ok" is set to a opt_result::failure_at before
5553 each "goto again;", adding new messages where needed.
5554 Add "unsupported grouped {store|load}" messages.
5555 (vect_analyze_loop): Convert return type from loop_vec_info to
5556 opt_loop_vec_info.
5557 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
5558 bool to opt_result.
5559 * tree-vect-stmts.c (process_use): Likewise, converting
5560 dump_printf_loc call and using stmt location, rather than
5561 vect_location.
5562 (vect_mark_stmts_to_be_vectorized): Likeise.
5563 (vect_analyze_stmt): Likewise, adding a %G.
5564 (vect_get_vector_types_for_stmt): Convert return type from bool to
5565 opt_result, converting dump_printf_loc calls and using stmt
5566 location, rather than vect_location.
5567 (vect_get_mask_type_for_stmt): Convert return type from tree to
5568 opt_tree, converting dump_printf_loc calls and using stmt location.
5569 * tree-vectorizer.c: Include "opt-problem.h.
5570 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
5571 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
5572 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
5573 enabled, use it to report at the top level "couldn't vectorize
5574 loop" followed by the problem.
5575 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
5576 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
5577 to opt_result.
5578 (vect_analyze_stmt): Likewise.
5579 (vect_get_vector_types_for_stmt): Likewise.
5580 (tree vect_get_mask_type_for_stmt): Likewise.
5581 (vect_analyze_data_ref_dependences): Likewise.
5582 (vect_enhance_data_refs_alignment): Likewise.
5583 (vect_analyze_data_refs_alignment): Likewise.
5584 (vect_verify_datarefs_alignment): Likewise.
5585 (vect_analyze_data_ref_accesses): Likewise.
5586 (vect_prune_runtime_alias_test_list): Likewise.
5587 (vect_find_stmt_data_reference): Likewise.
5588 (vect_analyze_data_refs): Likewise.
5589 (vect_analyze_loop): Convert return type from loop_vec_info to
5590 opt_loop_vec_info.
5591 (vect_analyze_loop_form): Likewise.
5592 (vect_analyze_slp): Convert return type from bool to opt_result.
5593
5594 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5595
5596 * doc/invoke.texi (-fopt-info): Document new "internals"
5597 sub-option.
5598 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
5599 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
5600 MSG_ALL_KINDS.
5601 (optinfo_verbosity_options): Add "internals".
5602 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
5603 (dump_context::apply_dump_filter_p): New member function.
5604 (dump_context::dump_loc): Use apply_dump_filter_p rather than
5605 explicitly masking the dump_kind.
5606 (dump_context::begin_scope): Increment the scope depth first. Use
5607 apply_dump_filter_p rather than explicitly masking the dump_kind.
5608 (dump_context::emit_item): Use apply_dump_filter_p rather than
5609 explicitly masking the dump_kind.
5610 (dump_dec): Likewise.
5611 (dump_hex): Likewise.
5612 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
5613 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
5614 (opt_info_switch_p): Update handling of default
5615 MSG_OPTIMIZED_LOCATIONS to cope with default of
5616 MSG_PRIORITY_USER_FACING.
5617 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
5618 masking the dump_kind.
5619 (selftest::test_capture_of_dump_calls): Update test_dump_context
5620 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
5621 than MSG_ALL. Generalize scope test to be run at all four
5622 combinations of with/without MSG_PRIORITY_USER_FACING and
5623 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
5624 for each of the two values.
5625 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
5626 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
5627 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
5628 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
5629 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
5630 with MSG_PRIORITY_*.
5631 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
5632 dump messages as MSG_PRIORITY_USER_FACING.
5633 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
5634 about the interaction with MSG_PRIORITY_*.
5635
5636 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
5637
5638 * varasm.c (output_constant): Add new parameter merge_strings.
5639 Make strings properly zero terminated in merge string sections.
5640 (mergeable_string_section): Don't fail if the last char is non-zero.
5641 (assemble_variable_contents): Handle merge string sections.
5642 (assemble_variable): Likewise.
5643 (assemble_constant_contents): Likewise.
5644 (output_constant_def_contents): Likewise.
5645 (output_constructor_array_range,
5646 output_constructor_regular_field): Adjust call to output_constant.
5647 (output_object_block): Adjust call to assemble_constant_contents
5648 and assemble_variable_contents.
5649
5650 2018-10-04 Martin Liska <mliska@suse.cz>
5651
5652 PR c/87483
5653 * cgraphunit.c (process_function_and_variable_attributes):
5654 Warn about a function with alias attribute and a body.
5655
5656 2018-10-04 Martin Liska <mliska@suse.cz>
5657
5658 PR ipa/82625
5659 * multiple_target.c (redirect_to_specific_clone): New function.
5660 (ipa_target_clone): Use it.
5661 * tree-inline.c: Fix comment.
5662
5663 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5664
5665 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
5666 fields.
5667 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
5668 (gcc::dump_manager::register_pass): New member function, adapted
5669 from loop body in gcc::pass_manager::register_pass, adding a
5670 call to update_dfi_for_opt_info.
5671 (gcc::dump_manager::opt_info_enable_passes): Store the
5672 -fopt-info options into the new fields. Move the loop
5673 bodies into...
5674 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
5675 function.
5676 * dumpfile.h (struct opt_pass): New forward decl.
5677 (gcc::dump_manager::register_pass): New decl.
5678 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
5679 (class gcc::dump_manager): Add fields "m_optgroup_flags",
5680 "m_optinfo_flags", and "m_optinfo_filename".
5681 * passes.c (gcc::pass_manager::register_pass): Move all of the
5682 dump-handling code to gcc::dump_manager::register_pass.
5683
5684 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
5685
5686 PR rtl-optimization/87466
5687 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
5688 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
5689 * doc/tm.texi: Regenerate.
5690 * ira-lives.c (process_bb_node_lives): Use the new target hook.
5691 * lra-lives.c (process_bb_lives): Likewise.
5692 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5693 Define.
5694
5695 2018-10-04 Tamar Christina <tamar.christina@arm.com>
5696
5697 * params.c (add_params): Fix initialization.
5698
5699 2018-10-04 Martin Liska <mliska@suse.cz>
5700
5701 PR gcov-profile/84107
5702 * tree-profile.c (init_ic_make_global_vars):
5703 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5704 Come up with new ic_tuple* variables. Emit
5705 __gcov_indirect_call{,_topn} variables.
5706 (gimple_gen_ic_profiler): Access the variable
5707 and emit gimple.
5708 (gimple_gen_ic_func_profiler): Access
5709 __gcov_indirect_call.callee field.
5710 (gimple_init_gcov_profiler): Use ptr_type_node.
5711 * value-prof.c (gimple_ic): Use ptr_type_node.
5712
5713 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5714
5715 PR tree-optimization/85787
5716 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5717 malloc_candidate_p into this function and add support for
5718 detecting multiple phis.
5719 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5720
5721 2018-10-04 Martin Liska <mliska@suse.cz>
5722
5723 PR ipa/87491
5724 * ipa-inline.c (inline_to_all_callers_1):
5725 Call ultimate_alias_target for node being inlined.
5726
5727 2018-10-03 Jeff Law <law@redhat.com>
5728
5729 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5730 target's wchar_t.
5731 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5732 * tree.h (get_typenode_from_name): Prototype.
5733
5734 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5735
5736 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5737 Change operand 2 predicate to nonimmediate_operand.
5738 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5739
5740 2018-10-03 Martin Sebor <msebor@redhat.com>
5741 Jeff Law <law@redhat.com>
5742
5743 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5744 initialize it.
5745 (get_string_length): Detect unterminated arrays.
5746 (format_string): Same.
5747 (format_directive): Warn about unterminated arrays.
5748 (handle_gimple_call): Mark statements with no_warning as needed.
5749
5750 2018-10-03 Jim Wilson <jimw@sifive.com>
5751
5752 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5753 also define __riscv_abi_rve. Delete trailing white space.
5754
5755 2018-10-03 Paul Koning <ni1d@arrl.net>
5756
5757 Enable LRA register allocator for PDP11.
5758 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5759 (R): Likewise.
5760 (D): Likewise.
5761 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5762 * config/pdp11/pdp11.opt (-mlra): New option.
5763 * doc/invoke.texi (PDP-11 Options): Document -mlra.
5764
5765 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5766
5767 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
5768 (*<absneg:code>extend<mode>xf2): Ditto.
5769
5770 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5771
5772 PR tree-optimization/87415
5773 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
5774 precision fields.
5775
5776 2018-10-02 Jeff Law <law@redhat.com>
5777
5778 * gimple-fold.c (get_range_strlen): Only set *nonstr when
5779 an unterminated string is discovered. Bubble up range
5780 even for unterminated strings.
5781 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
5782 indicates the string was not terminated via NONSTR.
5783
5784 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5785
5786 * tree-vrp.c (extract_range_from_unary_expr): Special case all
5787 pointer conversions.
5788 Do not do anything special for anti-ranges.
5789
5790 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
5791
5792 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
5793 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
5794
5795 2018-10-03 Martin Liska <mliska@suse.cz>
5796
5797 PR gcov-profile/86109
5798 * coverage.c (coverage_begin_function): Do not
5799 mark lambdas as artificial.
5800 * tree-core.h (struct GTY): Remove tm_clone_flag
5801 and introduce new lambda_function.
5802 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
5803
5804 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5805
5806 PR target/87474
5807 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
5808 P8_VECTOR and VSX are enabled.
5809
5810 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5811
5812 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
5813 0x3907 as CPU model number.
5814
5815 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5816
5817 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
5818 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
5819 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
5820 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
5821 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
5822 * config/s390/s390.md: Likewise. Rename also the cpu attribute
5823 value from arch12 to z14.
5824
5825 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5826
5827 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5828 (isinfxf2): Ditto.
5829 (isinf<mode>2): Ditto.
5830
5831 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5832
5833 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5834 before emitting fxam. Perform calculations in XFmode.
5835
5836 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5837
5838 * match.pd (((X /[ex] A) +- B) * A): New transformation.
5839
5840 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5841
5842 PR middle-end/87319
5843 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5844 * tree.c (signed_or_unsigned_type_for): Handle complex.
5845
5846 2018-10-02 Jeff Law <law@redhat.com>
5847
5848 * gimple-fold.c (get_range_strlen): Remove dead code.
5849
5850 2018-10-02 Martin Sebor <msebor@redhat.com>
5851 Jeff Law <law@redhat.com>
5852
5853 * builtins.c (unterminated_array): Add new arguments.
5854 If argument is not terminated, bubble up size and exact
5855 state to callers.
5856 (expand_builtin_strnlen): Detect, avoid expanding
5857 and diagnose unterminated arrays.
5858 (c_strlen): Fill in offset of start of unterminated strings.
5859 * builtins.h (unterminated_array): Update prototype.
5860
5861 2018-10-02 Richard Biener <rguenther@suse.de>
5862
5863 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5864 of haddv4df, first reduce to SSE width and exploit the fact
5865 that we only need element zero with the reduction result.
5866 (reduc_plus_scal_v2df): Likewise.
5867
5868 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5869
5870 * dojump.h (do_jump): Delete.
5871 (do_jump_1): Likewise.
5872 (split_comparison): Move around.
5873 * dojump.c (do_jump): Make static.
5874 (do_jump_1): Likewise.
5875 (jumpifnot): Move around.
5876 (jumpifnot_1): Likewise.
5877 (jumpif): Likewise.
5878 (jumpif_1): Likewise.
5879 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5880
5881 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5882
5883 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5884 insns in the delay slot and add_insn_after for the jump insn.
5885
5886 2018-10-02 Richard Biener <rguenther@suse.de>
5887
5888 * tree-inline.c (expand_call_inline): Use the location of
5889 the callee declaration for the inline-entry marker.
5890 * final.c (notice_source_line): Remove special-casing of
5891 NOTE_INSN_INLINE_ENTRY.
5892
5893 2018-10-01 Carl Love <cel@us.ibm.com>
5894
5895 PR 69431
5896 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5897 (__builtin_mtfsb0): New.
5898 (__builtin_mtfsb1): New.
5899 ( __builtin_set_fpscr_rn): New.
5900 (__builtin_set_fpscr_drn): New.
5901 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5902 (rs6000_expand_set_fpscr_rn_builtin): Add.
5903 (rs6000_expand_set_fpscr_drn_builtin): Add.
5904 (rs6000_expand_builtin): Add case statement entries for
5905 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5906 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5907 RS6000_BUILTIN_MFFSL.
5908 (rs6000_init_builtins): Add ftype initialization and def_builtin
5909 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5910 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5911 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5912 rs6000_mffscdrn): Add define_insn.
5913 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5914 * doc/extend.texi: Add documentation for the builtins.
5915
5916 2018-10-01 Richard Biener <rguenther@suse.de>
5917
5918 PR tree-optimization/87465
5919 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5920 causing branch miscounts.
5921
5922 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5923
5924 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5925 aarch64_option_default_param): New.
5926 (params.h): Include.
5927 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5928 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5929 stack-clash protection validation code.
5930
5931 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5932
5933 * params.c (validate_param): New.
5934 (add_params): Use it.
5935 (set_param_value): Refactor param validation into validate_param.
5936 (diagnostic.h): Include.
5937 * diagnostic.h (diagnostic_ready_p): New.
5938
5939 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5940
5941 * params.c (set_param_value):
5942 Add index of parameter being validated.
5943 * common/common-target.def (option_validate_param): New.
5944 * common/common-targhooks.h (default_option_validate_param): New.
5945 * common/common-targhooks.c (default_option_validate_param): New.
5946 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5947 * doc/tm.texi: Regenerate.
5948
5949 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5950
5951 PR target/86486
5952 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5953 Add validation for stack-clash parameters and set defaults.
5954
5955 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5956
5957 PR target/86486
5958 * configure.ac: Add stack-clash-protection-guard-size.
5959 * doc/install.texi: Document it.
5960 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5961 * params.def: Update comment for guard-size.
5962 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5963 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5964 * configure: Regenerate.
5965
5966 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5967
5968 PR target/86486
5969 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5970 STACK_DYNAMIC_OFFSET): New.
5971 * config/aarch64/aarch64.c (aarch64_layout_frame):
5972 Update outgoing args size.
5973 (aarch64_stack_clash_protection_alloca_probe_range,
5974 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5975
5976 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5977
5978 PR target/86486
5979 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5980 probe ranges.
5981 * target.def (stack_clash_protection_alloca_probe_range): New.
5982 (stack_clash_protection_final_dynamic_probe): Remove.
5983 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5984 (default_stack_clash_protection_final_dynamic_probe): Remove.
5985 * targhooks.c: Likewise.
5986 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5987 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5988 * doc/tm.texi: Regenerate.
5989
5990 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5991
5992 PR target/86486
5993 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5994 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5995 aarch64_clamp_to_uimm12_shift): New.
5996 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5997 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5998
5999 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6000
6001 PR target/86486
6002 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
6003
6004 2018-10-01 Jeff Law <law@redhat.com>
6005 Richard Sandiford <richard.sandiford@linaro.org>
6006 Tamar Christina <tamar.christina@arm.com>
6007
6008 PR target/86486
6009 * config/aarch64/aarch64.md
6010 (probe_stack_range): Add k (SP) constraint.
6011 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
6012 STACK_CLASH_MAX_UNROLL_PAGES): New.
6013 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
6014 stack probes for stack clash.
6015 (aarch64_allocate_and_probe_stack_space): New.
6016 (aarch64_expand_prologue): Use it.
6017 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
6018 (aarch64_sub_sp): Add emit_move_imm optional param.
6019
6020 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
6021
6022 PR tree-optimization/87261
6023 * match.pd: Remove trailing whitespace.
6024 Add (x & y) | ~(x | y) -> ~(x ^ y),
6025 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
6026
6027 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6028
6029 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
6030 constraints.
6031 (ashlsi3_insn): Update instruction constraints.
6032 (ashrsi3_insn): Likewise.
6033 (rotrsi3): Likewise.
6034 (add_shift): Likewise.
6035 * config/arc/constraints.md (Csz): New 32 bit constraint. It
6036 avoids placing in the limm field small constants which, otherwise,
6037 could end into a small instruction.
6038
6039 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6040
6041 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
6042 destination register is not odd-even.
6043 (umaddsidi4_split): Likewise.
6044
6045 2018-10-01 Richard Biener <rguenther@suse.de>
6046
6047 * tree-inline.c (expand_call_inline): Store origin of fn
6048 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
6049 * tree.c (block_ultimate_origin): Simplify and do some
6050 checking.
6051
6052 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
6053
6054 * config/i386/mmx.md (EMMS): New int iterator.
6055 (emms): New int attribute.
6056 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
6057 EMMS int iterator. Explicitly declare clobbers.
6058 (mmx_emms): Remove expander.
6059 (mmx_femms): Ditto.
6060 * config/i386/predicates.md (emms_operation): Remove predicate.
6061 (vzeroall_pattern): New predicate.
6062 (vzeroupper_pattern): Rename from vzeroupper_operation.
6063 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
6064 vzeroupper_pattern and vzeroall_pattern predicates.
6065
6066 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
6067
6068 PR rtl-optimization/86939
6069 * ira-lives.c (make_hard_regno_born): Rename from this...
6070 (make_hard_regno_live): ... to this. Remove update to conflict
6071 information. Update function comment.
6072 (make_hard_regno_dead): Add conflict information update. Update
6073 function comment.
6074 (make_object_born): Rename from this...
6075 (make_object_live): ... to this. Remove update to conflict information.
6076 Update function comment.
6077 (make_object_dead): Add conflict information update. Update function
6078 comment.
6079 (mark_pseudo_regno_live): Call make_object_live.
6080 (mark_pseudo_regno_subword_live): Likewise.
6081 (mark_hard_reg_dead): Update function comment.
6082 (mark_hard_reg_live): Call make_hard_regno_live.
6083 (process_bb_node_lives): Likewise.
6084 * lra-lives.c (make_hard_regno_born): Rename from this...
6085 (make_hard_regno_live): ... to this. Remove update to conflict
6086 information. Remove now uneeded check_pic_pseudo_p argument.
6087 Update function comment.
6088 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
6089 to conflict information. Update function comment.
6090 (mark_pseudo_live): Remove update to conflict information. Update
6091 function comment.
6092 (mark_pseudo_dead): Add conflict information update.
6093 (mark_regno_live): Call make_hard_regno_live.
6094 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
6095 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
6096
6097 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
6098
6099 PR target/87370
6100 * config/i386/i386.c (construct_container): Use TImode for
6101 BLKmode values in 2 integer registers.
6102
6103 2018-09-29 Jeff Law <law@redhat.com>
6104
6105 * builtins.c (unterminated_array): Pass in c_strlen_data * to
6106 c_strlen rather than just a tree *.
6107 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
6108 Update recursive calls appropriately. If caller did not provide a
6109 suitable data pointer, create a local one. When a non-terminated
6110 string is discovered, bubble up information about the string via the
6111 c_strlen_data object.
6112 * builtins.h (c_strlen): Update prototype.
6113 (c_strlen_data): New structure.
6114 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
6115 For a type 2 call, if c_strlen indicates a non-terminated string
6116 use the length of the non-terminated string.
6117 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
6118
6119 2018-09-29 Jakub Jelinek <jakub@redhat.com>
6120
6121 PR target/87467
6122 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
6123 __m512d type for __A argument rather than __m512.
6124
6125 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
6126
6127 * match.pd (simple_comparison): Don't optimize if either operand is
6128 a function pointer when target needs function pointer canonicalization.
6129
6130 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6131
6132 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
6133 power5 .. power9 to remove indirection.
6134 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
6135 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
6136 ASM_CPU_476_SPEC): Delete.
6137 (ASM_CPU_SPEC): Adjust.
6138 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
6139 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
6140
6141 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6142
6143 * config.in: Delete HAVE_AS_DCI.
6144 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
6145 * config/rs6000/rs6000.h: Ditto.
6146 * configure.ac: Delete HAVE_AS_DCI.
6147 * configure: Regenerate.
6148
6149 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6150
6151 * config.in (HAVE_AS_LWSYNC): Delete.
6152 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6153 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
6154 do it as a .long .
6155 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6156 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
6157 as a .long .
6158 * configure.ac: Delete HAVE_AS_LWSYNC.
6159 * configure: Regenerate.
6160
6161 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
6162 Pierre-Marie de Rodat <derodat@adacore.com>
6163
6164 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
6165 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
6166 (cgraph_node::create_thunk): Add indirect_offset parameter.
6167 (thunk_adjust): Likewise.
6168 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
6169 and initialize the corresponding field with it.
6170 (cgraph_node::dump): Dump indirect_offset field.
6171 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
6172 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
6173 (thunk_adjust): Add indirect_offset parameter and deal with it.
6174 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
6175 pass it to thunk_adjust. Do not call the target hook if it's non-zero
6176 or if the thunk is external or local. Fix formatting. Do not chain
6177 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
6178 if any, in the GIMPLE representation.
6179 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
6180 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
6181 (input_node): Read indirect_offset field.
6182 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
6183 call to thunk_adjust.
6184 * tree-nested.c (struct nesting_info): Add thunk_p field.
6185 (create_nesting_tree): Set it.
6186 (convert_all_function_calls): Copy static chain from targets to thunks.
6187 (finalize_nesting_tree_1): Return early for thunks.
6188 (unnest_nesting_tree_1): Do not finalize thunks.
6189 (gimplify_all_functions): Do not gimplify thunks.
6190
6191 2018-09-28 David Malcolm <dmalcolm@redhat.com>
6192
6193 * opt-suggestions.c (option_proposer::build_option_suggestions):
6194 Release "option_values".
6195
6196 2018-09-28 David Malcolm <dmalcolm@redhat.com>
6197
6198 * coverage.c (get_coverage_counts): Convert problem-reporting dump
6199 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
6200 * dumpfile.c (kind_as_string): New function.
6201 (dump_loc): Rather than a hardcoded prefix of "note: ", use
6202 kind_as_string to vary the prefix based on dump_kind.
6203 (selftest::test_capture_of_dump_calls): Update for above.
6204
6205 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
6206
6207 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
6208 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
6209
6210 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
6211
6212 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
6213 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
6214 INVALID_REGNUM instead of FPSR_REG.
6215 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
6216 * config/i386/i386.md: Update comment of FP compares.
6217 (fldenv): Do not clobber FPSR_REG.
6218
6219 2018-09-28 Richard Biener <rguenther@suse.de>
6220
6221 * tree.h (BLOCK_ORIGIN): New.
6222 * omp-expand.c (grid_expand_target_grid_body): Assign
6223 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
6224 * tree-inline.c (remap_block): Likewise.
6225 * auto-profile.c (get_function_decl_from_block): Simplify
6226 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
6227 * langhooks.c (lhd_print_error_function): Likewise.
6228 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
6229 Likewise.
6230 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6231 * tree.c (block_nonartificial_location): Likewise.
6232 (block_ultimate_origin): Likewise.
6233 * tree-pretty-print.c (percent_K_format): Likewise. Remove
6234 no longer needed LTO case.
6235
6236 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
6237 Jan Hubicka <jh@suse.cz>
6238 Martin Jambor <mjambor@suse.cz>
6239
6240 * simplify-rtx.c (simplify_merge_mask): New function.
6241 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
6242 same masks are used in op1 or op2.
6243 (test_vec_merge): New function.
6244 (test_vector_ops): Call test_vec_merge.
6245
6246 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
6247
6248 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
6249 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
6250 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
6251 (cypress_costs): Set it.
6252 (supersparc_costs): Likewise.
6253 (hypersparc_costs): Likewise.
6254 (leon_cost): Likewise.
6255 (leon3_costs): Likewise.
6256 (sparclet_costs): Likewise.
6257 (ultrasparc_costs): Likewise.
6258 (ultrasparc_costs): Likewise.
6259 (niagara_costs): Likewise.
6260 (niagara2_costs): Likewise.
6261 (niagara3_costs): Likewise.
6262 (niagara4_costs): Likewise.
6263 (niagara7_costs): Likewise.
6264 (m8_costs): Likewise.
6265 (TARGET_CAN_FOLLOW_JUMP): Define.
6266 (pass_work_around_errata::gate): Minor tweak.
6267 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
6268 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
6269 Automaitcally clear MASK_FSMULD mask for V7 processors.
6270 (sparc_can_follow_jump): New static function.
6271 (output_ubranch): Deal with CROSSING_JUMP_P.
6272 (sparc_use_sched_lookahead): Rewrite using switch statement.
6273 (sparc_issue_rate): Reorder.
6274 (sparc_branch_cost): New function.
6275
6276 2018-09-27 Martin Sebor <msebor@redhat.com>
6277
6278 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
6279 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
6280 (int_fits_type_p): Same.
6281
6282 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
6283
6284 * config/i386/i386.md (FPCR_REG): Remove.
6285 (UNSPEC_FLDCW): Remove.
6286 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
6287 (x86_fldcw_1): Remove insn pattern.
6288 (fnstenv): Do not clobber FPCR_REG.
6289 (fldenv): Ditto.
6290 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
6291 (CALL_USED_REGISTERS): Ditto.
6292 (REG_ALLOC_ORDER): Ditto.
6293 (REG_CLASS_CONTENTS): Ditto.
6294 (HI_REGISTER_NAMES): Ditto.
6295 (ADDITIONAL_REGISTER_NAMES): Use defines instead
6296 of numerical constants.
6297 * config/i386/i386.c (regclass_map): Remove fpsr register.
6298 (dbx_register_map): Ditto.
6299 (dbx64_register_map): Ditto.
6300 (svr4_dbx_register_map): Ditto.
6301 (print_reg): Do not handle FPCR_REG.
6302
6303 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
6304
6305 PR target/87149
6306 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
6307 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
6308 Delete, always treat as true.
6309 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6310 Ditto. Simplify remaining code.
6311 * config/powerpcspe/powerpcspe.h: Ditto.
6312 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
6313 Simplify remaining code.
6314 (rs6000_expand_builtin): Ditto.
6315 * config/rs6000/rs6000.h: Ditto.
6316 * configure.ac: Ditto.
6317 * configure: Regenerate.
6318
6319 2018-09-27 Martin Liska <mliska@suse.cz>
6320
6321 * coverage.c (get_coverage_counts): Revert the formatting
6322 of missing profile opt info.
6323
6324 2018-09-27 Richard Biener <rguenther@suse.de>
6325
6326 PR debug/37801
6327 PR debug/87440
6328 * dwarf2out.c (set_block_origin_self): Do not mark outermost
6329 block as we do not output that.
6330 (gen_inlined_subroutine_die): Elide the originally outermost
6331 block, matching what we do for concrete instances.
6332 (decls_for_scope): Add parameter specifying whether to recurse
6333 to subblocks.
6334
6335 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
6336 Tom de Vries <tom@codesourcery.com>
6337
6338 PR 82089
6339
6340 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
6341 STORE_FLAG_VALUE == 1.
6342
6343 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
6344
6345 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
6346 constant definitions.
6347 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
6348 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
6349 ("speculation_barrier"): New expander definition.
6350
6351 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
6352
6353 PR gcov-profile/86957
6354 * common.opt: New warning option -Wmissing-profile.
6355 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
6356 * doc/invoke.texi: Document -Wmissing-profile.
6357
6358 2018-09-26 Jim Wilson <jimw@sifive.com>
6359
6360 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
6361 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
6362
6363 2018-09-26 Martin Sebor <msebor@redhat.com>
6364
6365 * tree.c (zerop): Change return type to bool.
6366 (integer_zerop, integer_onep, integer_each_onep): Same.
6367 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6368 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6369 (real_onep, real_minus_onep, chain_index): Same.
6370 (print_type_hash_statistics, type_list_equal): Same.
6371 * tree.h (zerop): Same.
6372 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
6373 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6374 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6375 (real_onep, real_minus_onep, chain_index): Same.
6376 (print_type_hash_statistics, type_list_equal): Same.
6377
6378 2018-09-26 Jim Wilson <jimw@sifive.com>
6379
6380 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
6381
6382 2018-09-26 Jakub Jelinek <jakub@redhat.com>
6383
6384 PR target/87414
6385 * config/i386/i386.c: Include debug.h and dwarf2out.h.
6386 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
6387 call.
6388
6389 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
6390
6391 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
6392
6393 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
6394
6395 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
6396 and FP_SECOND_SSE_REGS.
6397 (REG_CLASS_NAMES): Ditto.
6398 (REG_CLASS_CONTENTS): Ditto.
6399 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
6400 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
6401 (ix86_preferred_output_reload_class): Ditto.
6402 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
6403 clobber constraint to "=&f".
6404 (fix_truncdi_i387): Ditto.
6405 (lrintxfdi2): Ditto.
6406 (fistdi2_<rounding>): Ditto.
6407 (fpremxf4_i387): Change "=u" constraint to "=f".
6408 (fprem1xf4_i387): Ditto.
6409 (sincosxf3): Ditto.
6410 (fptanxf4_i387): Ditto.
6411 (fxtractxf3_i387): Ditto.
6412 (fscalexf4_i387): Ditto.
6413 (atan2xf3): Change "u" constraint to "f".
6414 (fyl2xxf3_i387): Ditto.
6415 (fyl2xp1xf3_i387): Ditto.
6416
6417 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
6418
6419 PR target/87439
6420 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
6421 for removed I387_MASK_PM entity.
6422
6423
6424 2018-09-26 Jeff Law <law@redhat.com>
6425 Revert
6426 2018-09-26 Alexey Neyman <stilor@att.net>
6427
6428 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6429 headers are no longer pulled in by <isl/val.h>.
6430
6431 2018-09-26 Richard Biener <rguenther@suse.de>
6432
6433 PR debug/87443
6434 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
6435 or concrete instance DIE to the tree. Create abstract origin
6436 attributes also for concrete instances.
6437
6438 2018-09-26 Alexey Neyman <stilor@att.net>
6439
6440 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6441 headers are no longer pulled in by <isl/val.h>.
6442
6443 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
6444
6445 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
6446 Use new helper functions.
6447 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
6448 Use new helper functions.
6449 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
6450 aarch_mm_needs_release): New declarations.
6451 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
6452 aarch_mm_needs_release): New.
6453
6454 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
6455
6456 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
6457 (arm32_output_mi_thunk): Deal with long calls.
6458
6459 2018-09-26 Richard Biener <rguenther@suse.de>
6460
6461 PR debug/87428
6462 PR debug/87362
6463 * tree-inline.c (expand_call_inline): When the location
6464 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
6465 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
6466 the inserted BLOCK to make inlined_function_outer_scope_p
6467 recognize it.
6468 * dwarf2out.c (add_call_src_coords_attributes): Do not add
6469 coords for reserved locations.
6470
6471 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6472
6473 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
6474 (*call_indirect_nonlocal_sysv<mode>): Ditto.
6475 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
6476 (*sibcall_nonlocal_sysv<mode>): Ditto.
6477 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
6478 (<bd>_<mode>): Ditto.
6479 (<bd>tf_<mode>): Ditto.
6480
6481 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6482
6483 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
6484 control string as a list of templates instead of as C code.
6485 (*altivec_movti): Ditto.
6486 * config/rs6000/darwin.md (movdf_low_di): Ditto.
6487
6488 2018-09-25 Jim Wilson <jimw@sifive.com>
6489
6490 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
6491 when target symbol is weak.
6492
6493 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6494
6495 PR c/87387
6496 * builtins.c (unterminated_array): Simplify.
6497 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
6498 where pointer arithmetic is safe.
6499
6500 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6501
6502 PR target/86987
6503 * config/rs6000/altivec.md (altivec_vspltb): Use
6504 const_0_to_15_operand instead of u5bit_cint_operand.
6505 (*altivec_vspltb_internal): Ditto.
6506 (altivec_vspltb_direct): Ditto.
6507 (altivec_vsplth): Use const_0_to_7_operand instead of
6508 u5bit_cint_operand.
6509 (*altivec_vsplth_internal): Ditto.
6510 (altivec_vsplth_direct): Ditto.
6511 (altivec_vspltw): Use const_0_to_3_operand instead of
6512 u5bit_cint_operand.
6513 (*altivec_vspltw_internal): Ditto.
6514 (altivec_vspltw_direct): Ditto.
6515 (altivec_vspltsf): Ditto.
6516 (*altivec_vspltsf_internal): Ditto.
6517 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
6518 various splats with the proper size immediate. Reorder the various
6519 cases by ascending size of immediate, and put all such together.
6520
6521 2018-09-25 Richard Biener <rguenther@suse.de>
6522
6523 PR debug/83941
6524 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
6525 GC-ification.
6526 (maybe_create_die_with_external_ref): Do not create
6527 DW_TAG_imported_unit here.
6528 (add_abstract_origin_attribute): Handle external BLOCK refs.
6529 (dwarf2out_abstract_function): Simplify LTO case.
6530 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
6531 rather than using maybe_create_die_with_external_ref.
6532
6533 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
6534
6535 PR target/71278
6536 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
6537 (frndintxf2_mask_pm_i387): Ditto.
6538 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
6539 Enable for !flag_trapping_math.
6540 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
6541 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
6542 Change operand 1 predicate to nonimmediate_operand.
6543 (attr "i387_cw"): Remove mask_pm.
6544 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
6545 (enum ix86_entity): Remove I387_MASK_PM.
6546 * config/i386/i386.c (ix86_i387_mode_needed): Do not
6547 handle I387_MASK_PM.
6548 (ix86_mode_needed): Ditto.
6549 (ix86_mode_after): Ditto.
6550 (ix86_mode_entry): Ditto.
6551 (ix86_mode_exit): Ditto.
6552 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
6553
6554 2018-09-25 Jakub Jelinek <jakub@redhat.com>
6555
6556 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
6557 to_update_switch_stmts to vNULL instead of calling create on them
6558 immediately.
6559
6560 2018-09-25 Richard Biener <rguenther@suse.de>
6561
6562 PR tree-optimization/87402
6563 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
6564 (visit_phi): Re-instantiate handling of supposed to be VARYING
6565 but non-VARYING backedge value.
6566
6567 2018-09-25 Richard Biener <rguenther@suse.de>
6568
6569 PR debug/83941
6570 * dwarf2out.c (struct sym_off_pair): New.
6571 (external_die_map): New global.
6572 (lookup_decl_die): When in LTO create DIEs lazily from the
6573 external_die_map.
6574 (lookup_block_die): New function, create DIEs lazily in LTO.
6575 (equate_block_to_die): New function.
6576 (dwarf2out_die_ref_for_decl): During WPA get the association
6577 from the external DIE map.
6578 (dwarf2out_register_external_die): Record mapping into the
6579 external DIE map.
6580 (maybe_create_die_with_external_ref): New function split out from
6581 DIE generation part of old dwarf2out_register_external_die.
6582 (add_abstract_origin_attribute): Do not return the DIE. When
6583 in LTO reference externals directly.
6584 (dwarf2out_abstract_function): When in LTO ignore calls for
6585 decls with external DIEs (already present abstract instances).
6586 (gen_call_site_die): Adjust.
6587 (add_high_low_attributes): Likewise.
6588 (gen_lexical_block_die): Likewise.
6589 (gen_inlined_subroutine_die): Likewie.
6590 (gen_block_die): Likewise.
6591 (dwarf2out_inline_entry): Likewise.
6592 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
6593 DIEs.
6594
6595 2018-09-25 Martin Liska <mliska@suse.cz>
6596
6597 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
6598 integers and not by a float value.
6599
6600 2018-09-25 Martin Liska <mliska@suse.cz>
6601
6602 PR fortran/87394
6603 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
6604 instead of NULL.
6605 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
6606 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
6607 * godump.c (go_format_type): Remove extra parenthesis.
6608
6609 2018-09-25 Martin Liska <mliska@suse.cz>
6610
6611 * alias.c (set_dest_equal_p): Remove unused function.
6612 * config/i386/i386.c (def_builtin_pure2): Likewise.
6613 * diagnostic-show-locus.c (class layout): Remove
6614 unused field.
6615 (layout::layout): Likewise here.
6616 * dump-context.h (class temp_dump_context): Likewise.
6617 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
6618 (add_AT_loclistsptr): Likewise.
6619 (add_AT_offset): Likewise.
6620 (get_AT_hi_pc): Likewise.
6621 (is_comdat_die): Likewise.
6622 (type_is_enum): Likewise.
6623 (ceiling): Likewise.
6624 (add_AT_vms_delta): Likewise.
6625 (is_class_die): Likewise.
6626 * edit-context.c (class line_event): Remove unused field.
6627 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
6628 unused function.
6629 * ipa-cp.c (ipa_get_vr_lat): Likewise.
6630 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
6631 (ok_for_base_p_nonstrict): Likewise.
6632 * tree-chrec.c (is_not_constant_evolution): Likewise.
6633 (chrec_fold_poly_cst): Likewise.
6634 * tree-if-conv.c (has_pred_critical_p): Likewise.
6635 * tree-ssa-coalesce.c (print_exprs): Likewise.
6636 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
6637 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
6638 * tree-vrp.c (value_ranges_intersect_p): Likewise.
6639 (value_range_nonnegative_p): Likewise.
6640
6641 2018-09-25 Martin Liska <mliska@suse.cz>
6642
6643 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6644 Do not handle "GNU Pascal".
6645 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6646 Likewise.
6647 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
6648 from documentation. Likewise.
6649 * dbxout.c (dbxout_range_type): Likewise.
6650 * doc/cpp.texi: Likewise.
6651 * doc/extend.texi: Likewise.
6652 * doc/frontends.texi: Likewise.
6653 * doc/invoke.texi: Remove Pascal entry.
6654 * tree.def (CLEANUP_POINT_EXPR): Likewise.
6655 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
6656
6657 2018-09-25 Martin Liska <mliska@suse.cz>
6658
6659 PR middle-end/86078
6660 * doc/invoke.texi: Document all parameters and remove default
6661 of the parameters.
6662
6663 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
6664
6665 PR bootstrap/87417
6666 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
6667 contains HOST_WIDE_INTs when computing its size.
6668
6669 2018-09-24 Jim Wilson <jimw@sifive.com>
6670
6671 PR target/87391
6672 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
6673 not TARGET_RVE.
6674 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
6675
6676 2018-09-24 Andrew Pinski <apinski@marvell.com>
6677
6678 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
6679 access prev before checking it for NULLness in the
6680 AARCH64_FUSE_CMP_BRANCH case.
6681
6682 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
6683
6684 PR target/82699
6685 * config/i386/i386.c (rest_of_insert_endbranch): Set
6686 endbr_queued_at_entrance to true and don't insert ENDBR if
6687 x86_function_profiler will be called.
6688 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
6689 is true.
6690 * config/i386/i386.h (machine_function): Add
6691 endbr_queued_at_entrance.
6692
6693 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6694
6695 * genattrtab.c (mk_attr_alt): Use alternative_mask.
6696 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6697 types.
6698 (check_attr_test): Use alternative_mask.
6699 (get_attr_value): Likewise.
6700 (compute_alternative_mask): Use alternative_mask and XWINT.
6701 (make_alternative_compare): Use alternative_mask.
6702 (attr_alt_subset_p): Use XWINT.
6703 (attr_alt_subset_of_compl_p): Likewise.
6704 (attr_alt_intersection): Use alternative_mask and XWINT.
6705 (attr_alt_union): Likewise.
6706 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6707 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6708 (simplify_test_exp): Use alternative_mask and XWINT.
6709 (write_test_expr): Use alternative_mask and XWINT, adjust bit
6710 number calculation to support 64 bits. Generate code that
6711 checks 64-bit masks.
6712 (main): Use alternative_mask.
6713 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6714
6715 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6716
6717 PR target/80080
6718 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6719 RETURN+USE when returning via %r14.
6720
6721 2018-09-24 Martin Liska <mliska@suse.cz>
6722
6723 * gcov.c (output_lines): Print colorization legend
6724 for both flag_use_colors and flag_use_hotness_colors.
6725 Reword the help.
6726
6727 2018-09-24 Martin Liska <mliska@suse.cz>
6728
6729 * coverage.c (get_coverage_counts): Use warning_at
6730 with current_function_decl location. Use %qD in warning
6731 message.
6732
6733 2018-09-24 Martin Liska <mliska@suse.cz>
6734
6735 * memory-block.h (memory_block_pool::release): Annotate with
6736 valgrind that the memory is not accessible.
6737
6738 2018-09-24 Martin Liska <mliska@suse.cz>
6739
6740 PR sanitizer/85774
6741 * asan.c: Make asan_handled_variables extern.
6742 * asan.h: Likewise.
6743 * cfgexpand.c (expand_stack_vars): Make sure
6744 a representative is unpoison if another
6745 variable in the partition is handled by
6746 use-after-scope sanitization.
6747
6748 2018-09-24 Richard Biener <rguenther@suse.de>
6749
6750 PR tree-optimization/63155
6751 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6752 the worklist when the edge of the respective argument isn't
6753 executable.
6754
6755 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6756
6757 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6758 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6759 (MASK_CLASS_P): Update for rename.
6760 (MAYBE_MASK_CLASS_P): Ditto.
6761 (REG_CLASS_NAMES): Update.
6762 (REG_CLASS_CONTENT): Update.
6763 * config/i386/i386.c (regclass_map): Update for MASK_REG
6764 and ALL_MASK_REGS rename.
6765 * config/i386/constraints.md (Yk): Update for rename.
6766 (k): Ditto.
6767
6768 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6769
6770 * config/i386/i386.h (enum reg_class): Remove
6771 EVEX_SSE_REGS and MOD4_SSE_REGS.
6772 (REG_CLASS_NAMES): Update.
6773 (REG_CLASS_CONTENT): Update.
6774 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
6775 registers as ALL_SSE_REGS.
6776 (ix86_additional_allocno_class_p): Remove.
6777 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
6778 (ix86_register_priority): Lower priority of EVEX SSE registers.
6779 Use IN_RANGE macro where appropriate.
6780 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
6781 AVX-5124VNNIW checks.
6782 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
6783 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
6784 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
6785 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
6786 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
6787 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
6788 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
6789 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
6790 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
6791 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
6792 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
6793 * config/i386/constraints.md (Yh): Remove.
6794
6795 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6796
6797 * config/i386/i386.c (regclass_map): Declare integer REX registers
6798 as GENERAL_REGS.
6799
6800 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
6801
6802 * doc/service.texi (Service): Switch the fsf.org link to https.
6803
6804 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
6805
6806 PR target/86798
6807 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6808 Define to speculation_safe_value_not_needed.
6809
6810 2018-09-21 Florian Weimer <fweimer@redhat.com>
6811
6812 PR middle-end/81035
6813 * doc/extend.texi (Common Function Attributes): Mention that
6814 noreturn suppresses tail call optimization.
6815
6816 2018-09-21 Jeff Law <law@redhat.com>
6817
6818 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
6819 vr_values::cleanup_edges_and_switches.
6820 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
6821 vr_values class.
6822 (identify_jump_threads): Remove EDGE_IGNORE handling.
6823 (execute_vrp): Move handling of to_remove_edges and
6824 to_update_switch_stmts into vr_values class member functions.
6825 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6826 (to_update_switch_stmts): Likewise.
6827 * vr-values.c: Include cfghooks.h.
6828 (vr_values::vr_values): Initialize to_remove_edges and
6829 to_update_switch_stmts.
6830 (vr_values::~vr_values): Verify to_remove_edges and
6831 to_update_switch_stmts are empty.
6832 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6833 (vr_values::cleanup_edges_and_switches): New member function.
6834 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6835 function. Add new data members.
6836
6837 2018-09-21 David Malcolm <dmalcolm@redhat.com>
6838
6839 PR tree-optimization/87309
6840 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6841 calls with pflags and alt_flags.
6842 (selftest::test_capture_of_dump_calls): Add test of interaction of
6843 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6844
6845 2018-09-21 Olivier Hainque <hainque@adacore.com>
6846
6847 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6848
6849 2018-09-21 Olivier Hainque <hainque@adacore.com>
6850
6851 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6852
6853 2018-09-21 Olivier Hainque <hainque@adacore.com>
6854
6855 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6856 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6857 (VXWORKS_LIBS_RTP): Minor reordering.
6858
6859 2018-09-21 Olivier Hainque <hainque@adacore.com>
6860
6861 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6862 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6863
6864 2018-09-21 Olivier Hainque <hainque@adacore.com>
6865
6866 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6867 (PTRDIFF_TYPE): Likewise.
6868
6869 2018-09-21 Olivier Hainque <hainque@adacore.com>
6870
6871 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6872 triplet, similar to support for VxWorks7.
6873 * config/vxworks-dummy.h: Provide a default definition
6874 of TARGET_VXWORKS64 to 0.
6875
6876 2018-09-21 Olivier Hainque <hainque@adacore.com>
6877
6878 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6879 * config/vxworks-dummy.h: here.
6880
6881 2018-09-21 Olivier Hainque <hainque@adacore.com>
6882
6883 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6884
6885 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
6886 Bo Zhou <zbo.zhou@hisilicon.com>
6887
6888 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6889 * config/aarch64/aarch64-tune.md: Regenerated.
6890 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6891 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6892 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6893
6894 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
6895 Julian Brown <julian@codesourcery.com>
6896
6897 * builtins.c (get_builtin_sync_mem): Handle address spaces.
6898
6899 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6900
6901 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6902 if the call takes a static chain.
6903
6904 2018-09-21 Martin Liska <mliska@suse.cz>
6905
6906 * auto-profile.c (autofdo_source_profile::read): Do not
6907 set sum_all.
6908 (read_profile): Do not add working sets.
6909 (read_autofdo_file): Remove sum_all.
6910 (afdo_callsite_hot_enough_for_early_inline): Remove const
6911 qualifier.
6912 * coverage.c (struct counts_entry): Remove gcov_summary.
6913 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6914 do not support GCOV_TAG_PROGRAM_SUMMARY.
6915 (get_coverage_counts): Remove summary and expected
6916 arguments.
6917 * coverage.h (get_coverage_counts): Likewise.
6918 * doc/gcov-dump.texi: Remove -w option.
6919 * gcov-dump.c (dump_working_sets): Remove.
6920 (main): Do not support '-w' option.
6921 (print_usage): Likewise.
6922 (tag_summary): Likewise.
6923 * gcov-io.c (gcov_write_summary): Do not dump
6924 histogram.
6925 (gcov_read_summary): Likewise.
6926 (gcov_histo_index): Remove.
6927 (gcov_histogram_merge): Likewise.
6928 (compute_working_sets): Likewise.
6929 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6930 it not obsolete.
6931 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6932 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6933 (GCOV_HISTOGRAM_SIZE): Remove.
6934 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6935 (struct gcov_summary): Simplify rapidly just
6936 to runs and sum_max fields.
6937 (gcov_histo_index): Remove.
6938 (NUM_GCOV_WORKING_SETS): Likewise.
6939 (compute_working_sets): Likewise.
6940 * gcov-tool.c (print_overlap_usage_message): Remove
6941 trailing empty line.
6942 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6943 (output_lines): Remove program related line.
6944 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6945 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6946 histogram.
6947 (input_profile_summary): Do not read it.
6948 (merge_profile_summaries): And do not merge it.
6949 (input_symtab): Do not call removed function.
6950 * modulo-sched.c (sms_schedule): Do not print sum_max.
6951 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6952 removed when histogram method was invented.
6953 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6954 mode.
6955 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6956 GCOV coding style.
6957 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6958 and dump selected value.
6959 * profile.c (add_working_set): Remove.
6960 (get_working_sets): Likewise.
6961 (find_working_set): Likewise.
6962 (get_exec_counts): Do not work with working sets.
6963 (read_profile_edge_counts): Do not inform as sum_max is removed.
6964 (compute_branch_probabilities): Likewise.
6965 (compute_value_histograms): Remove argument for call of
6966 get_coverage_counts.
6967 * profile.h: Do not make gcov_summary const.
6968
6969 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
6970
6971 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6972
6973 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6974
6975 PR tree-optimization/86990
6976 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6977 Check that the entire merged store group is made of constants only for
6978 overlapping stores.
6979
6980 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
6981
6982 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6983 (VTABLE_VERIFICATION_SPEC): Likewise.
6984 (SANITIZER_EARLY_SPEC): Likewise.
6985 (SANITIZER_SPEC): Likewise.
6986 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6987 * doc/invoke.texi (Link Options): Document -r.
6988
6989 2018-09-20 Richard Biener <rguenther@suse.de>
6990
6991 PR middle-end/87054
6992 * gimplify.c (gimplify_expr): Retain alignment of
6993 addressable lvalue in dereference.
6994
6995 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
6996
6997 PR bootstrap/87013
6998 * configure.ac: Check for .loc is_stmt support.
6999 * configure, config.in: Rebuilt.
7000 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
7001 if not supported.
7002
7003 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
7004
7005 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
7006 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
7007 -misel=no.
7008
7009 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
7010
7011 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7012 VECTOR_OTHER.
7013 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
7014 case VECTOR_OTHER.
7015
7016 2018-09-20 Marek Polacek <polacek@redhat.com>
7017
7018 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
7019
7020 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7021
7022 PR tree-optimization/87288
7023 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
7024 into account when determining PEELING_FOR_NITERS.
7025
7026 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7027
7028 PR tree-optimization/86877
7029 * tree-vect-loop.c (vect_analyze_loop_2): Call
7030 vect_verify_datarefs_alignment.
7031
7032 2018-09-19 Marek Polacek <polacek@redhat.com>
7033
7034 * doc/invoke.texi: Document -Wclass-conversion.
7035
7036 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
7037
7038 * config/pa/pa.c (pa_adjust_priority): Delete.
7039 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
7040
7041 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
7042 (atomic_storehi): Likewise.
7043 (atomic_storesi): Likewise.
7044 (atomic_loaddi): Restore compare and swap exchange loop code.
7045
7046 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
7047
7048 PR rtl-optimization/86902
7049 * combine.c (try_combine): When changing the CC mode used, don't change
7050 an unrelated mode in other_insn to that new CC mode.
7051
7052 2018-09-19 David Malcolm <dmalcolm@redhat.com>
7053
7054 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
7055 with %T in place of calls to dump_generic_expr.
7056 (prune_runtime_alias_test_list): Likewise.
7057 (create_runtime_alias_checks): Likewise.
7058 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
7059 (vect_analyze_data_ref_dependence): Likewise.
7060 (vect_slp_analyze_data_ref_dependence): Likewise.
7061 (vect_record_base_alignment): Likewise. Use %G in place of call
7062 to dump_gimple_stmt.
7063 (vect_compute_data_ref_alignment): Likewise.
7064 (verify_data_ref_alignment): Likewise.
7065 (vect_find_same_alignment_drs): Likewise.
7066 (vect_analyze_group_access_1): Likewise.
7067 (vect_analyze_data_ref_accesses): Likewise.
7068 (dependence_distance_ge_vf): Likewise.
7069 (dump_lower_bound): Likewise.
7070 (vect_prune_runtime_alias_test_list): Likewise.
7071 (vect_find_stmt_data_reference): Likewise.
7072 (vect_analyze_data_refs): Likewise.
7073 (vect_create_addr_base_for_vector_ref): Likewise.
7074 (vect_create_data_ref_ptr): Likewise.
7075 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
7076 (vect_can_advance_ivs_p): Likewise.
7077 (vect_update_ivs_after_vectorizer): Likewise.
7078 (vect_gen_prolog_loop_niters): Likewise.
7079 (vect_prepare_for_masked_peels): Likewise.
7080 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7081 (vect_determine_vectorization_factor): Likewise.
7082 (vect_is_simple_iv_evolution): Likewise.
7083 (vect_analyze_scalar_cycles_1): Likewise.
7084 (vect_analyze_loop_operations): Likewise.
7085 (report_vect_op): Likewise.
7086 (vect_is_slp_reduction): Likewise.
7087 (check_reduction_path): Likewise.
7088 (vect_is_simple_reduction): Likewise.
7089 (vect_create_epilog_for_reduction): Likewise.
7090 (vect_finalize_reduction:): Likewise.
7091 (vectorizable_induction): Likewise.
7092 (vect_transform_loop_stmt): Likewise.
7093 (vect_transform_loop): Likewise.
7094 (optimize_mask_stores): Likewise.
7095 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
7096 (vect_split_statement): Likewise.
7097 (vect_recog_over_widening_pattern): Likewise.
7098 (vect_recog_average_pattern): Likewise.
7099 (vect_determine_min_output_precision_1): Likewise.
7100 (vect_determine_precisions_from_range): Likewise.
7101 (vect_determine_precisions_from_users): Likewise.
7102 (vect_mark_pattern_stmts): Likewise.
7103 (vect_pattern_recog_1): Likewise.
7104 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7105 (vect_record_max_nunits): Likewise.
7106 (vect_build_slp_tree_1): Likewise.
7107 (vect_build_slp_tree_2): Likewise.
7108 (vect_print_slp_tree): Likewise.
7109 (vect_analyze_slp_instance): Likewise.
7110 (vect_detect_hybrid_slp_stmts): Likewise.
7111 (vect_detect_hybrid_slp_1): Likewise.
7112 (vect_slp_analyze_operations): Likewise.
7113 (vect_slp_analyze_bb_1): Likewise.
7114 (vect_transform_slp_perm_load): Likewise.
7115 (vect_schedule_slp_instance): Likewise.
7116 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7117 (vect_mark_stmts_to_be_vectorized): Likewise.
7118 (vect_init_vector_1): Likewise.
7119 (vect_get_vec_def_for_operand): Likewise.
7120 (vect_finish_stmt_generation_1): Likewise.
7121 (vect_check_load_store_mask): Likewise.
7122 (vectorizable_call): Likewise.
7123 (vectorizable_conversion): Likewise.
7124 (vectorizable_operation): Likewise.
7125 (vectorizable_load): Likewise.
7126 (vect_analyze_stmt): Likewise.
7127 (vect_is_simple_use): Likewise.
7128 (vect_get_vector_types_for_stmt): Likewise.
7129 (vect_get_mask_type_for_stmt): Likewise.
7130 * tree-vectorizer.c (increase_alignment): Likewise.
7131
7132 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
7133
7134 * doc/rtl.texi: Adjust vec_select description.
7135 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
7136 non-constant selectors.
7137
7138 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
7139
7140 * config/aarch64/aarch64-protos.h
7141 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
7142 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
7143 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
7144 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
7145 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
7146 (AARCH64_FL_PROFILE): Move index so flags are ordered.
7147 (AARCH64_ISA_RCPC8_4): New flag.
7148 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
7149 to aarch64_offset_9bit_signed_unscaled_p.
7150 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
7151 and use stlur.
7152 * config/aarch64/constraints.md (Ust): New constraint.
7153 * config/aarch64/predicates.md.
7154 (aarch64_9bit_offset_memory_operand): New predicate.
7155 (aarch64_rcpc_memory_operand): New predicate.
7156
7157 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
7158
7159 PR rtl-optimization/87361
7160 * rtlanal.c (nonzero_bits1): Revert accidental change.
7161
7162 2018-09-19 Richard Biener <rguenther@suse.de>
7163
7164 PR tree-optimization/87349
7165 PR tree-optimization/87342
7166 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
7167
7168 2018-09-18 Marek Polacek <polacek@redhat.com>
7169
7170 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
7171 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
7172
7173 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
7174
7175 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
7176
7177 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
7178
7179 PR rtl-optimization/86882
7180 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
7181
7182 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
7183
7184 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
7185 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
7186
7187 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
7188
7189 PR other/87353
7190 * doc/invoke.texi (Link Options): Fix formatting and grammar.
7191
7192 2018-09-18 Richard Biener <rguenther@suse.de>
7193
7194 PR middle-end/63155
7195 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
7196 (compute_samebase_partition_bases): Likewise.
7197 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
7198 (gimple_can_coalesce_p): Simplify.
7199
7200 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
7201
7202 Handle a library implementation of ffs calling __builtin_ffs.
7203 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
7204 (mmix_init_libfuncs): New function: make __builtin_ffs expand
7205 to __ffsdi2.
7206
7207 2018-09-17 David Malcolm <dmalcolm@redhat.com>
7208
7209 * diagnostic-show-locus.c (class layout_range): Add field
7210 "m_original_idx".
7211 (layout_range::layout_range): Add "original_idx" param and use it
7212 to initialize new field.
7213 (make_range): Use 0 for original_idx.
7214 (layout::layout): Pass in index to calls to
7215 maybe_add_location_range.
7216 (layout::maybe_add_location_range): Add param "original_idx" and
7217 pass it on to layout_range.
7218 (layout::print_any_labels): Pass on range->m_original_idx to
7219 get_text call.
7220 (gcc_rich_location::add_location_if_nearby): Use 0 for
7221 original_idx.
7222 * gcc-rich-location.h (text_range_label::get_text): Update for new
7223 param.
7224 (range_label_for_type_mismatch::get_text): Likewise.
7225
7226 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
7227
7228 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
7229
7230 2018-09-17 David Malcolm <dmalcolm@redhat.com>
7231
7232 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
7233 format_string_diagnostic_t.
7234 (fmtwarn_n): Likewise.
7235 * substring-locations.c
7236 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
7237 (format_warning_n_va): Convert to...
7238 (format_string_diagnostic_t::emit_warning_n_va): ...this.
7239 (format_warning_va): Convert to...
7240 (format_string_diagnostic_t::emit_warning_va): ...this.
7241 (format_warning_at_substring): Convert to...
7242 (format_string_diagnostic_t::emit_warning): ...this.
7243 (format_warning_at_substring_n): Convert to...
7244 (format_string_diagnostic_t::emit_warning_n): ...this.
7245 * substring-locations.h (class format_string_diagnostic_t): New
7246 class.
7247 (format_warning_va): Convert to
7248 format_string_diagnostic_t::emit_warning_va.
7249 (format_warning_n_va): Convert to
7250 format_string_diagnostic_t::emit_warning_n_va.
7251 (format_warning_at_substring): Convert to
7252 format_string_diagnostic_t::emit_warning.
7253 (format_warning_at_substring_n): Convert to
7254 format_string_diagnostic_t::emit_warning_n.
7255
7256 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
7257 Bernd Schmidt <bernds_cb1@t-online.de>
7258
7259 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
7260 SImode args.
7261
7262 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
7263
7264 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
7265 operand 0 predicate to nonimmediate operand.
7266 (rint<mode>2_frndint): Remove insn pattern.
7267 (rint<mode>2): Change operand 1 predicate to general_operand.
7268 Extend operand 1 to XFmode and generate rintxf2 insn.
7269 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
7270 Do not use X87MODEF mode macro.
7271 (frndintxf2_<rounding>_i387): Rename from
7272 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
7273 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
7274 to XFmode and generate significandxf3 insn.
7275
7276 2018-09-17 Richard Biener <rguenther@suse.de>
7277
7278 PR tree-optimization/87328
7279 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
7280 visiting unexecutable backedges when not iterating.
7281 (do_rpo_vn): Mark all edges not executable even when not
7282 iterating.
7283
7284 2018-09-17 Martin Jambor <mjambor@suse.cz>
7285
7286 PR c/63886
7287 * doc/invoke.texi (Warning Options): Likewise.
7288
7289 2018-09-17 Richard Biener <rguenther@suse.de>
7290
7291 PR tree-optimization/87301
7292 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
7293 clean EH info from leftover copy assignments.
7294
7295 2018-09-17 Martin Liska <mliska@suse.cz>
7296
7297 PR gcov-profile/85871
7298 * gcov.c (output_intermediate_file): Fix out of bounds
7299 access.
7300
7301 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
7302
7303 * config/arc/arc.c: Object attributes for core4 not reflected
7304 correctly.
7305 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
7306 core3).
7307
7308 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
7309
7310 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
7311
7312 2018-09-17 Martin Liska <mliska@suse.cz>
7313
7314 * doc/gcov.texi: Document new option --use-hotness-colors.
7315 * gcov.c (struct source_info): Declare new field.
7316 (source_info::source_info): Set default for maximum_count.
7317 (print_usage): Add new -q option.
7318 (process_args): Process it.
7319 (accumulate_line_info): Save src->maximum_count.
7320 (output_line_beginning): Make color line number if
7321 flag_use_hotness_colors is set.
7322 (output_line_details): Pass default argument value.
7323 (output_lines): Pass src->maximum_count.
7324
7325 2018-09-17 Martin Liska <mliska@suse.cz>
7326
7327 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
7328 Use processor_names table.
7329 * config/i386/i386.c (ix86_default_align): Use
7330 processor_cost_table for alignment values.
7331 (ix86_option_override_internal): Use processor_names.
7332 (ix86_function_specific_print): Likewise.
7333 * config/i386/i386.h (struct processor_costs):
7334 Add alignment values.
7335 (struct ptt): Remove and replace with const char *.
7336 * config/i386/x86-tune-costs.h (struct processor_costs):
7337 Declare default alignments for all costs.
7338
7339 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
7340
7341 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
7342 symbolics or VR_VARYING ranges for ABS_EXPR.
7343 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
7344 when range will wrap.
7345
7346 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
7347
7348 PR middle-end/86864
7349 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
7350 before and after a JUMP_TABLE_DATA.
7351
7352 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
7353
7354 PR middle-end/87188
7355 * dojump.c (do_compare_and_jump): Canonicalize function pointers
7356 when one operand is a function pointer. Use POINTER_TYPE_P and
7357 FUNC_OR_METHOD_TYPE_P.
7358 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
7359 * fold-const.c (build_range_check): Likewise.
7360 * match.pd (simple_comparison): Likewise.
7361
7362 2018-09-14 David Malcolm <dmalcolm@redhat.com>
7363
7364 PR c/82967
7365 * spellcheck.c (get_edit_distance_cutoff): New function.
7366 (selftest::test_edit_distance_unit_test_oneway): Rename to...
7367 (selftest::test_get_edit_distance_one_way): ...this.
7368 (selftest::test_get_edit_distance_unit): Rename to...
7369 (selftest::test_get_edit_distance_both_ways): ...this.
7370 (selftest::test_edit_distances): Move tests to this new function,
7371 and test some more pairs of strings. Update for above renaming.
7372 (selftest::get_old_cutoff): New function.
7373 (selftest::test_get_edit_distance_cutoff): New function.
7374 (selftest::assert_suggested_for): New function.
7375 (ASSERT_SUGGESTED_FOR): New macro.
7376 (selftest::assert_not_suggested_for): New function.
7377 (ASSERT_NOT_SUGGESTED_FOR): New macro.
7378 (selftest::test_suggestions): New function.
7379 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
7380 tests to selftest::test_edit_distances and call it. Add calls to
7381 selftest::test_get_edit_distance_cutoff and
7382 selftest::test_suggestions.
7383 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
7384 (best_match::consider): Replace hard-coded cutoff calculation with
7385 a call to...
7386 (best_match::get_cutoff): New declaration.
7387 (best_match::get_best_meaningful_candidate): Likewise.
7388
7389 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7390
7391 * builtins.c (fold_builtin_strlen): Remove TODO comment.
7392
7393 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7394
7395 revert:
7396 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7397
7398 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7399 terminated string literal.
7400
7401 2018-09-14 Martin Sebor <msebor@redhat.com>
7402
7403 * builtins.c (unterminated_array): Handle ARRAY_REF.
7404 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
7405 * builtins.h (unterminated_array): Declare extern.
7406 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
7407 arrays.
7408 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
7409 calls.
7410
7411 2018-09-14 Martin Sebor <msebor@redhat.com>
7412 Jeff Law <law@redhat.com>
7413
7414 * builtins.c (unterminated_array): New.
7415 (expand_builtin_strcpy): Adjust.
7416 (expand_builtin_strcpy_args): Detect unterminated arrays.
7417 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
7418 unterminated arrays.
7419 * gimple-fold.h (get_maxval_strlen): Add argument.
7420 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
7421
7422 * gimple-fold.c (get_range_strlen): Add argument.
7423 (get_maxval_strlen): Adjust.
7424 * gimple-fold.h (get_range_strlen): Add argument.
7425
7426 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
7427
7428 * config/i386/movdirintrin.h: Fix copyright year.
7429
7430 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
7431
7432 * reg-stack.c: Include regs.h.
7433 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
7434 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
7435 FIRST_STACK_REG, not DFmode.
7436 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
7437 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
7438 (change stack): Default register mode to the reg_raw_mode of
7439 FIRST_STACK_REG, not DFmode.
7440 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
7441 (*swapxf): Rename from swapxf.
7442
7443 2018-09-14 Carl Love <cel@us.ibm.com>
7444
7445 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
7446 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
7447
7448 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
7449
7450 PR target/87224
7451 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
7452 alternatives.
7453
7454 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
7455
7456 PR target/85628
7457 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
7458
7459 2018-09-14 Jason Merrill <jason@redhat.com>
7460
7461 Fix --enable-gather-detailed-mem-stats.
7462 * hash-table.c (hash_table_usage): Change from variable to function.
7463 * hash-table.h: Adjust.
7464 * Makefile.in: Add missing dependencies on hash-table.h.
7465
7466 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7467
7468 PR tree-optimization/87259
7469 PR lto/87283
7470 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
7471 execute_cse_reciprocals_1 has tried transforming.
7472
7473 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
7474
7475 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
7476 VR_VARYING for PLUS/MINUS_EXPR.
7477
7478 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
7479
7480 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
7481 formatting.
7482
7483 2018-09-14 Richard Biener <rguenther@suse.de>
7484
7485 PR middle-end/63155
7486 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
7487 bits for the merged partition.
7488
7489 2018-09-13 Martin Sebor <msebor@redhat.com>
7490 Bernd Edlinger <bernd.edlinger@hotmail.de>
7491
7492 * builtins.h (c_srlen): Add argument.
7493 * builtins.c (warn_string_no_nul): New function.
7494 (c_strlen): Add argument and use it. Update recursive calls.
7495 Pass DECL argument to string_constant to get info on non
7496 terminated strings. Update *NONSTR as needed.
7497 (fold_builtin_strlen): Add argument to calls to c_strlen.
7498 Warn for unterminated arrays.
7499 (warn_string_no_null): Add prototype.
7500 * expr.c (string_constant): Update arguments. Update recursive
7501 calls appropriately. Detect missing NUL terminator and outermost
7502 declaration its missing in.
7503 Improve checks for arrays with nonzero lower bound or elements
7504 that are not a single byte. Simplify offset computation.
7505 Simplify checks for non-NUL terminated strings.
7506 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
7507 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
7508
7509 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
7510
7511 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
7512 correctly.
7513 * fold-const.c (c_getstr): Fix function comment. Remove unused third
7514 argument. Fix range checks.
7515 * fold-const.h (c_getstr): Adjust protoype.
7516 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
7517 string is constant but contains no NUL byte.
7518
7519 * expr.c (string_constant): Adjust function comment.
7520 Remove bogus check for zero termination.
7521
7522 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
7523
7524 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
7525 (get_constant_size): Don't make STRING_CSTs larger than they are.
7526 (check_string_literal): New check function for STRING_CSTs.
7527 (output_constant): Use it.
7528
7529 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
7530
7531 PR target/86812
7532 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
7533
7534 2018-09-13 Richard Biener <rguenther@suse.de>
7535
7536 PR tree-optimization/87263
7537 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
7538 (struct unwind_state): Add max_rpo field.
7539 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
7540 Compute max_rpo, the max RPO number a block can be backwards reached
7541 from. Re-write non-iterating mode to a RPO ordered worklist approach,
7542 separating it from the iterating mode.
7543
7544 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7545
7546 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
7547 (rfs_decision): New scheduling decision.
7548
7549 2018-09-13 Richard Biener <rguenther@suse.de>
7550
7551 PR bootstrap/87134
7552 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
7553 (vn_nary_op_insert_pieces_predicated): Do not write useless
7554 valid_dominated_by_p entry outside of the allocated storage.
7555
7556 2018-09-13 Omar Sandoval <osandov@osandov.com>
7557 Tom de Vries <tdevries@suse.de>
7558
7559 PR debug/86985
7560 * dwarf2out.c (is_c): New function.
7561 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
7562
7563 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
7564
7565 PR target/85628
7566 * config/aarch64/aarch64.md (*aarch64_bfxil):
7567 Define.
7568 * config/aarch64/constraints.md (Ulc): Define.
7569 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
7570 Define.
7571 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
7572 New function.
7573
7574 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7575
7576 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
7577 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
7578 aarch64_layout_frame call.
7579 (aarch64_expand_epilogue): Likewise.
7580 (aarch64_initial_elimination_offset): Likewise.
7581 (aarch64_get_separate_components): Likewise.
7582 (aarch64_use_return_insn_p): Likewise.
7583 (aarch64_layout_frame): Remove unneeded check.
7584
7585 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7586
7587 * configure.ac: Only append
7588 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
7589 gcc_config_arguments if it was never reconfigured or last reconfigure
7590 was with different arguments.
7591 * configure: Regenerated.
7592
7593 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7594 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7595
7596 PR middle-end/87290
7597 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
7598 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
7599
7600 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7601
7602 PR tree-optimization/87287
7603 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
7604 X % C == 0 to X % (unsigned) C == 0 optimization to ...
7605 * match.pd (X % C == 0): ... here. New optimization.
7606
7607 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7608
7609 PR middle-end/82853
7610 * expr.h (maybe_optimize_mod_cmp): Declare.
7611 * expr.c (mod_inv): New function.
7612 (maybe_optimize_mod_cmp): New function.
7613 (do_store_flag): Use it.
7614 * cfgexpand.c (expand_gimple_cond): Likewise.
7615
7616 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
7617 Julian Brown <julian@codesourcery.com>
7618
7619 PR middle-end/86336
7620 * gimplify.c (gimplify_scan_omp_clauses): Set
7621 target_firstprivatize_array_bases in OpenACC parallel and kernels
7622 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
7623 OpenACC data regions.
7624
7625 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
7626
7627 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
7628 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
7629
7630 2018-09-12 Richard Biener <rguenther@suse.de>
7631
7632 PR tree-optimization/87280
7633 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
7634 edge but unreachable target.
7635 (do_rpo_vn): For conservatively handling a PHI only mark
7636 the backedge executable but not the block reachable.
7637
7638 2018-09-12 Richard Biener <rguenther@suse.de>
7639
7640 PR tree-optimization/87266
7641 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
7642 visited blocks.
7643
7644 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
7645
7646 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
7647 constants.
7648 ("trunc<BFP:mode><DFP_ALL:mode>2")
7649 ("trunc<DFP_ALL:mode><BFP:mode>2")
7650 ("extend<BFP:mode><DFP_ALL:mode>2")
7651 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
7652 according to the target operand type.
7653
7654 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7655 Andreas Krebbel <krebbel@linux.ibm.com>
7656
7657 PR tree-optimization/86844
7658 * gimple-ssa-store-merging.c
7659 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7660 there are any overlapping stores in between them, make sure they are
7661 also coalesced or we give up completely.
7662
7663 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7664
7665 PR middle-end/87248
7666 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
7667 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
7668
7669 2018-09-12 Tom de Vries <tdevries@suse.de>
7670
7671 * common.opt (gdescribe-dies): Add option.
7672 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
7673 attribute for artifical and nameless decls.
7674 (dwarf2out_register_external_die): Add description attribute to
7675 external reference die.
7676 (add_desc_attribute): New functions.
7677 (gen_subprogram_die): Add description attribute to
7678 DW_TAG_call_site_parameter.
7679 * tree-pretty-print.c (print_generic_expr_to_str): New function.
7680 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
7681 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
7682 -gno-describe-dies.
7683 (@item -gdescribe-dies): Add.
7684
7685 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7686
7687 * tree-vrp.c (vrp_shift_undefined_p): Remove.
7688 (extract_range_from_binary_expr_1: Call
7689 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
7690 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7691 depend on sign.
7692
7693 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7694
7695 * gimple-ssa-warn-alloca.c
7696 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7697 field for ALLOCA_BOUND_*_LARGE.
7698
7699 2018-09-11 Nathan Sidwell <nathan@acm.org>
7700
7701 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7702
7703 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7704
7705 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7706 for clobbers. Remove obsolete comment.
7707
7708 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7709
7710 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7711 mpxchk, mpxld and mpxst types.
7712 (define_attr length_immediate): Remove all processing of mpx types.
7713 (define_attr prefix_0f): Ditto.
7714 (define_attr memory): Ditto.
7715
7716 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7717
7718 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7719 (log<mode>2): Change operand 1 predicate to general_operand.
7720 Extend operand 1 to XFmode and generate logxf3 insn.
7721 (log10<mode>2): Change operand 1 predicate to general_operand.
7722 Extend operand 1 to XFmode and generate log10xf3 insn.
7723 (log2<mode>2): Change operand 1 predicate to general_operand.
7724 Extend operand 1 to XFmode and generate log2xf3 insn.
7725 (fyl2xp1_extend<mode>xf3_i387): Remove.
7726 (log1p<mode>2): Change operand 1 predicate to general_operand.
7727 Extend operand 1 to XFmode and generate log1pxf3 insn.
7728 (fxtract_extend<mode>xf3_i387): Remove.
7729 (logb<mode>2): Change operand 1 predicate to general_operand.
7730 Extend operand 1 to XFmode and generate logbxf3 insn.
7731 (ilogb<mode>2): Change operand 1 predicate to general_operand.
7732 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7733 (significand<mode>2): Change operand 1 predicate to general_operand.
7734 Extend operand 1 to XFmode and generate significandxf3 insn.
7735
7736 2018-09-11 Nathan Sidwell <nathan@acm.org>
7737
7738 * gcc.c (perror_with_name, pfatal_with_name): Delete.
7739 (load_specs): Use fatal_error.
7740 (DELETE_IF_ORDINARY, process_command): Use error.
7741 (execute, run_attempt): Use fatal_error.
7742
7743 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
7744
7745 * diagnostic-core.h (sorry_at): New prototype.
7746 * diagnostic.c (sorry_at): New function.
7747
7748 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
7749
7750 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7751 by zero as VR_UNDEFINED.
7752
7753 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7754
7755 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7756 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7757 (<sincos>mode2): New expander.
7758 (sincos_extend<mode>xf3_i387): Remove insn pattern.
7759 (sincos -> sin, cos splitters): Remove splitter patterns.
7760 (sincos<mode>3): Change operand 2 predicate to general_operand.
7761 Extend operand 2 to XFmode and generate sincosxf3 insn.
7762 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
7763 Change operand 3 predicate to const1_operand.
7764 (fptan_extend<mode>xf4_i387): Remove insn pattern.
7765 (tanxf2): Update operands in the call to fptanxf4_i387.
7766 (tan<mode>2): Change operand 1 predicate to general_operand.
7767 Extend operand 1 to XFmode and generate tanxf3 insn.
7768 (atan2xf3): Rename from *fpatanxf3_i387.
7769 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
7770 (atan2xf3): Remove expander.
7771 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
7772 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
7773 (atan<mode>2): Change operand 1 predicate to general_operand.
7774 Extend operand 1 to XFmode and generate atanxf3 insn.
7775
7776 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7777
7778 * config/i386/i386.md (x87/SSE constant load splitter): Use
7779 memory_operand instead of nonimmediate_operand for input operand
7780 predicate.
7781
7782 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
7783
7784 * config/i386/i386.md (float partial SSE register stall splitter): Move
7785 splitter near its instruction pattern.
7786 (float_extend partial SSE register stall splitter): Ditto.
7787 (float_truncate partial SSE register stall splitter): Ditto.
7788
7789 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
7790
7791 PR target/86794
7792 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7793 to speculation_safe_value_not_needed.
7794
7795 PR target/85666
7796 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
7797 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
7798 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
7799 leaf_function_p, instead use has_hard_reg_initial_val.
7800
7801 2018-09-09 Nathan Sidwell <nathan@acm.org>
7802
7803 * gcc.h (pfatal_with_name): Don't declare here.
7804 * gcc.c (pfatal_with_name): Make static.
7805
7806 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
7807
7808 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
7809 earlyclobber.
7810
7811 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
7812
7813 PR rtl-optimization/85458
7814 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
7815 priority hook to reduce the priority of EXPR.
7816
7817 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
7818
7819 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
7820 DImode for x87 on 32bit targets. Conditionally disable x87 modes
7821 with X87_ENABLE_FLOAT. Remove preparation code.
7822 (*float<SWI48:mode><MODEF:mode>2): Rename from
7823 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
7824 math using "enabled" attribute.
7825 (*floatdi<MODEF:mode>2_i387): Rename from
7826 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
7827 enable for 32bit targets only.
7828 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7829 splitter.
7830 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7831 as operand 1 predicate. Rewrite as define_insn_and_split.
7832 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7833
7834 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7835
7836 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7837 to fallthru to FLOAT case.
7838
7839 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7840
7841 PR target/86731
7842 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7843 around folding of vec_sl to handle out of range shift values.
7844
7845 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7846
7847 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7848 Update callers to gen_fix_trunc<mode>_i387_fisttp
7849 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7850 nonimmediate_operand.
7851 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7852 and corresponding splitters.
7853 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7854 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7855 (fix_truncdi_i387_with_temp): Remove insn pattern
7856 and corresponding splitters.
7857 (fix_trunc<mode>_i387): Change operand 0 predicate to
7858 nonimmediate_operand.
7859 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7860 and corresponding splitters.
7861 (*fistdi2_1): Remove.
7862 (fistdi2): Ditto.
7863 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7864 (lrintxfdi2): Remove expander. Reimplement as define_insn.
7865 (*fist<mode>2_1): Remove.
7866 (fist<mode>2): Ditto.
7867 (fist<mode>2_with_temp): Remove insn pattern and corresponding
7868 splitters.
7869 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
7870 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7871 (fistdi2_<rounding>): Change operand 0 predicate to
7872 nonimmediate_operand.
7873 (fistdi2_<rounding>_with_temp): Remove insn pattern
7874 and corresponding splitters.
7875 (fist<mode>2_<rounding>): Change operand 0 predicate to
7876 nonimmediate_operand.
7877 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7878 and corresponding splitters.
7879
7880 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7881
7882 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
7883
7884 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7885 the init value.
7886
7887 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7888
7889 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7890 early gimple folding of vec_splat().
7891 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7892 * gimple-fold.h: Add an extern define for tree_vec_extract().
7893
7894 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7895
7896 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7897 wrappers around TREE_TYPE comparisons.
7898
7899 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7900
7901 PR target/80080
7902 * config/s390/predicates.md: Add nonsym_memory_operand.
7903 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7904 contains a SYMBOL_REF, load it into an intermediate pseudo.
7905 (s390_emit_compare_and_swap): Legitimize operand.
7906 * config/s390/s390.md: Use the new nonsym_memory_operand
7907 with UNSPECV_CAS patterns.
7908
7909 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7910
7911 PR target/80080
7912 * config/s390/s390-passes.def: New file.
7913 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7914 declaration.
7915 (make_pass_s390_early_mach): Add declaration.
7916 * config/s390/s390.c (make_pass_s390_early_mach):
7917 (s390_option_override): Remove dynamic registration.
7918 * config/s390/t-s390: Add s390-passes.def.
7919
7920 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7921
7922 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7923 Remove UNSPEC_LTREL_BASE check.
7924 (annotate_constant_pool_refs): Likewise.
7925 (find_constant_pool_ref): Likewise.
7926 (find_ltrel_base): Removed.
7927 (replace_ltrel_base): Removed.
7928 (s390_mainpool_finish): Remove replace_ltrel_base call.
7929 (s390_chunkify_start): Remove pending LTREL_BASE logic.
7930 (s390_chunkify_finish): Remove replace_ltrel_base call.
7931 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7932
7933 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
7934
7935 PR target/86779
7936 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7937 to speculation_safe_value_not_needed.
7938
7939 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
7940 Bernd Schmidt <bernds_cb1@t-online.de>
7941
7942 * config/nvptx/nvptx-opts.h: New file.
7943 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7944 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7945 (ASM_SPEC): Define.
7946 (TARGET_SM35): New macro.
7947 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7948 correct predicate.
7949 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7950 values.
7951 (misa=): New option.
7952 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7953
7954 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
7955
7956 * config/i386/i386.md (truncdfsf2): Remove expander.
7957 (truncdfsf2_with_temp): Ditto.
7958 (truncxf<mode>2): Ditto.
7959 (*truncdfsf_fast_mixed): Remove insn pattern.
7960 (*truncdfsf_fast_i387): Ditto.
7961 (*truncdfsf_mixed): Ditto.
7962 (*truncdfsf_i387): Ditto.
7963 (*truncdfsf2_i387_1): Ditto.
7964 (*truncxfsf2_mixed): Ditto.
7965 (*truncxfdf2_mixed): Ditto.
7966 (*truncxf<mode>2_i387_noop): Ditto. Update callers
7967 to call gen_truncxf<mode>2 instead.
7968 (*truncxf<mode>2_i387): Remove.
7969 (reg->reg splitters): Remove splitter pattern.
7970 (reg->mem splitters): Ditto.
7971
7972 (truncdfsf2): New insn pattern.
7973 (truncxf<mode>2): Ditto.
7974
7975 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7976
7977 * tree-ssa-math-opts.c (is_mult_by): New function.
7978 (is_square_of): Use the above.
7979 (optimize_recip_sqrt): New function.
7980 (pass_cse_reciprocals::execute): Use the above.
7981
7982 2018-09-05 Richard Biener <rguenther@suse.de>
7983
7984 PR bootstrap/87134
7985 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7986 to zero-init the emplaced vec.
7987
7988 2018-09-05 Martin Liska <mliska@suse.cz>
7989
7990 PR tree-optimization/87205
7991 * tree-switch-conversion.c (pass_lower_switch::execute):
7992 Group cases for switch statements.
7993
7994 2018-09-05 Richard Biener <rguenther@suse.de>
7995
7996 PR tree-optimization/87217
7997 * tree-ssa-sccvn.c (vuse_valueize): New.
7998 (vn_reference_lookup_pieces): Use it.
7999 (vn_reference_lookup): Likewise.
8000
8001 2018-09-05 Nathan Sidwell <nathan@acm.org>
8002
8003 PR c++/87137
8004 * stor-layout.c (place_field): Scan forwards to check last
8005 bitfield when ms_bitfield_placement is in effect.
8006
8007 2018-09-05 Richard Biener <rguenther@suse.de>
8008
8009 PR bootstrap/87225
8010 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
8011 return.
8012
8013 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
8014 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8015
8016 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
8017 * config.gcc (extra_objs): Build it.
8018 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
8019 Likewise.
8020 * config/aarch64/aarch64-passes.def
8021 (pass_tag_collision_avoidance): New pass.
8022 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
8023 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
8024 (aarch64_classify_address): Remove static qualifier.
8025 (aarch64_address_info, aarch64_address_type): Move to...
8026 * config/aarch64/aarch64-protos.h: ... here.
8027 (make_pass_tag_collision_avoidance): New function.
8028 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
8029 New tuning flag.
8030
8031 2018-09-05 Martin Liska <mliska@suse.cz>
8032
8033 * doc/gcov.texi: Update documentation of humar
8034 readable mode.
8035 * gcov.c (format_count): Print one decimal place, it provides
8036 more fine number of situations like '1G' vs. '1.4G'.
8037
8038 2018-09-05 Martin Liska <mliska@suse.cz>
8039
8040 PR target/87164
8041 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
8042 * optc-gen.awk: Allow 'Var' for Deprecated options in order
8043 to generate a MASK value.
8044
8045 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
8046
8047 PR debug/86593
8048 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
8049 if frame pointer isn't used.
8050 (compute_frame_pointer_to_fb_displacement): Likewise.
8051
8052 2018-09-04 Jakub Jelinek <jakub@redhat.com>
8053
8054 PR target/87198
8055 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
8056 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
8057 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
8058 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
8059 and OPTION_MASK_ISA_XSAVEC_UNSET.
8060
8061 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
8062
8063 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
8064 XOR operations in NAND case.
8065
8066 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
8067
8068 * wide-int-range.cc (wide_int_range_convert): New.
8069 * wide-int-range.h (wide_int_range_convert): New.
8070 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
8071 code into wide_int_range_convert.
8072 (extract_range_into_wide_ints): Do not munge anti range constants
8073 into the entire domain. Just return the range back.
8074
8075 2018-09-04 Martin Liska <mliska@suse.cz>
8076
8077 * genmatch.c (output_line_directive): Add new argument
8078 fnargs.
8079 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
8080
8081 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
8082
8083 * doc/invoke.texi (Option Summary): Add whitespace.
8084
8085 * doc/invoke.texi (Option Summary): Add -Waligned-new.
8086
8087 2018-09-04 Richard Biener <rguenther@suse.de>
8088
8089 PR tree-optimization/87211
8090 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
8091 backedge value we're supposed to treat as VARYING also number
8092 the PHI to VARYING in case it got a different value-number already.
8093
8094 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
8095
8096 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
8097 (extract_range_from_binary_expr_1): Do not call
8098 vrp_can_optimize_bit_op.
8099 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
8100 static.
8101 (wide_int_range_get_mask_and_bounds): New.
8102 (wide_int_range_optimize_bit_op): New.
8103 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
8104 (wide_int_range_bit_and): Same.
8105 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
8106 (wide_int_range_optimize_bit_op): New.
8107 (wide_int_range_get_mask_and_bounds): New.
8108
8109 2018-09-04 Richard Biener <rguenther@suse.de>
8110
8111 PR tree-optimization/87176
8112 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
8113 variable. When value-numbering a virtual PHI node make sure
8114 to not value-number to the backedge value.
8115
8116 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
8117
8118 * doc/extend.texi (Long Long, Hex Floats): Document support for
8119 long long and hex floats in more recent versions of ISO C++.
8120
8121 2018-09-03 Richard Biener <rguenther@suse.de>
8122
8123 PR tree-optimization/87177
8124 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
8125 cleanup.
8126
8127 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8128
8129 * bb-reorder.c (edge_order): Convert to C-qsort-style
8130 tri-state comparator.
8131 (reorder_basic_blocks_simple): Change std::stable_sort to
8132 gcc_stablesort.
8133
8134 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8135
8136 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
8137 tri-state comparator.
8138 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
8139
8140 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8141
8142 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
8143 (mergesort): ... here as maximum count for using netsort.
8144 (gcc_qsort): Set nlim to 3 if stable sort is requested.
8145 (gcc_stablesort): New.
8146 * system.h (gcc_stablesort): Declare.
8147
8148 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8149
8150 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
8151 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
8152 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
8153
8154 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
8155
8156 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
8157 lxsdx and stxsdx alternatives.
8158 (*mov<mode>_hardfloat64): Ditto.
8159 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
8160
8161 2018-09-03 Richard Biener <rguenther@suse.de>
8162
8163 PR tree-optimization/87200
8164 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
8165 simplify result.
8166
8167 2018-09-03 Martin Liska <mliska@suse.cz>
8168
8169 PR tree-optimization/87201
8170 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8171 Fix parenthesis in an expression.
8172
8173 2018-09-03 Richard Biener <rguenther@suse.de>
8174
8175 PR tree-optimization/87197
8176 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
8177 visited. CSE the VN_INFO hashtable lookup.
8178
8179 PR tree-optimization/87169
8180 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
8181 iterating make sure there's no extra backedges from irreducible
8182 regions feeding the header. Mark the destination block
8183 executable.
8184
8185 2018-09-03 Martin Liska <mliska@suse.cz>
8186
8187 PR driver/83193
8188 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
8189 * common/common-targhooks.c (default_get_valid_option_values):
8190 New function.
8191 * common/common-targhooks.h (default_get_valid_option_values):
8192 Likewise.
8193 * common/config/i386/i386-common.c: Move processor_target_table
8194 from i386.c.
8195 (ix86_get_valid_option_values): New function.
8196 (TARGET_GET_VALID_OPTION_VALUES): New macro.
8197 * config/i386/i386.c (struct ptt): Move to i386-common.c.
8198 (PTA_*): Move all defined masks into i386-common.c.
8199 (ix86_function_specific_restore): Use new processor_cost_table.
8200 * config/i386/i386.h (struct ptt): Moved from i386.c.
8201 (struct pta): Likewise.
8202 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
8203 * doc/tm.texi.in: Likewise.
8204 * opt-suggestions.c (option_proposer::suggest_option):
8205 Pass prefix to build_option_suggestions.
8206 (option_proposer::get_completions): Likewise.
8207 (option_proposer::build_option_suggestions): Use the new target
8208 hook.
8209 * opts.c (struct option_help_tuple): New struct.
8210 (print_filtered_help): Use the new target hook.
8211
8212 2018-09-03 Martin Liska <mliska@suse.cz>
8213
8214 PR middle-end/59521
8215 * predict.c (set_even_probabilities): Add likely_edges
8216 argument and handle cases where we have precisely one
8217 likely edge.
8218 (combine_predictions_for_bb): Catch also likely_edges.
8219 (tree_predict_by_opcode): Handle gswitch statements.
8220 * tree-cfg.h (find_case_label_for_value): New declaration.
8221 (find_taken_edge_switch_expr): Likewise.
8222 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8223 Find pivot in decision tree based on probabily, not by number of
8224 nodes.
8225
8226 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
8227
8228 * doc/standards.texi (Standards): Update Objective-C reference.
8229
8230 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8231
8232 * doc/install.texi (Prerequisites): Update link for MPC.
8233
8234 2018-09-01 Michael Matz <matz@suse.de>
8235
8236 PR tree-optimization/87074
8237 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
8238 PHIs for outer-loop uses.
8239
8240 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8241
8242 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
8243 * doc/invoke.texi (C Dialect Options): Ditto.
8244
8245 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8246
8247 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
8248
8249 2018-08-31 Richard Biener <rguenther@suse.de>
8250
8251 PR tree-optimization/87168
8252 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
8253 (rpo_elim::eliminate_avail): When OP was not visited it must
8254 be available.
8255
8256 2018-08-31 David Malcolm <dmalcolm@redhat.com>
8257
8258 * tree-vrp.c (copy_value_range): Convert param "from" from
8259 "value_range *" to "const value_range *".
8260 (range_is_null): Likewise for param "vr".
8261 (range_int_cst_p): Likewise.
8262 (range_int_cst_singleton_p): Likewise.
8263 (symbolic_range_p): Likewise.
8264 (value_ranges_intersect_p): Likewise for both params.
8265 (value_range_nonnegative_p): Likewise for param "vr".
8266 (value_range_constant_singleton): Likewise.
8267 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
8268 (extract_range_into_wide_ints): Likewise for param "vr".
8269 (extract_range_from_multiplicative_op): Likewise for params "vr0"
8270 and "vr1".
8271 (vrp_can_optimize_bit_op): Likewise.
8272 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
8273 "vr1_".
8274 (extract_range_from_unary_expr): Likewise.
8275 (debug_value_range): Likewise for param "vr".
8276 (value_range::dump): Add "const" qualifier.
8277 (vrp_prop::check_array_ref): Convert local "vr" from
8278 "value_range *" to "const value_range *".
8279 (vrp_prop::check_mem_ref): Likewise.
8280 (vrp_prop::visit_stmt): Likewise for local "old_vr".
8281 (vrp_intersect_ranges_1): Likewise for param "vr_1".
8282 (vrp_intersect_ranges): Likewise.
8283 (simplify_stmt_for_jump_threading): Likewise for local "vr".
8284 (vrp_prop::vrp_finalize): Likewise.
8285 * tree-vrp.h (value_range::dump): Add "const" qualifier.
8286 (vrp_intersect_ranges): Add "const" qualifier to params as above.
8287 (extract_range_from_unary_expr): Likewise.
8288 (value_range_constant_singleton): Likewise.
8289 (symbolic_range_p): Likewise.
8290 (copy_value_range): Likewise.
8291 (extract_range_from_binary_expr_1): Likewise.
8292 (range_int_cst_p): Likewise.
8293 (vrp_set_zero_nonzero_bits): Likewise.
8294 (range_int_cst_singleton_p): Likewise.
8295
8296 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
8297
8298 * config/aarch64/arm_neon.h (vabsd_s64): New.
8299 (vnegd_s64): Likewise.
8300
8301 2018-08-31 Martin Jambor <mjambor@suse.cz>
8302
8303 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
8304
8305 2018-08-31 Martin Liska <mliska@suse.cz>
8306
8307 * ipa-icf.c (sem_item::add_type): Use
8308 sem_item::m_type_hash_cache.
8309 * ipa-icf.h: Move the cache from sem_item_optimizer
8310 to sem_item.
8311
8312 2018-08-31 Nathan Sidwell <nathan@acm.org>
8313
8314 * doc/extend.texi (Backwards Compatibility): Remove implicit
8315 extern C leeway of () being (...).
8316
8317 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8318
8319 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
8320
8321 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
8322
8323 PR target/86684
8324 PR target/87149
8325 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
8326
8327 2018-08-31 Jakub Jelinek <jakub@redhat.com>
8328
8329 PR middle-end/87138
8330 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
8331 gen_int_mode. Formatting fixes.
8332
8333 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
8334
8335 * target.def (custom_function_descriptors): Improve documentation.
8336 * doc/tm.texi.in (Trampolines): Expand discussion of function
8337 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
8338 beginning of the section.
8339 * doc/tm.texi: Regenerated.
8340
8341 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
8342
8343 * cfg.h (class auto_edge_flag): Spell out the template-id of the
8344 base class in the initializer list. This is a workaround for
8345 building with older GCC.
8346 (class auto_bb_flag): Likewise.
8347
8348 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
8349
8350 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
8351 (altivec_vcmpequ<VI_char>_p): Remove star.
8352 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
8353 vector load modes.
8354 (expand_strncmp_vec_sequence): New function.
8355 (emit_final_str_compare_vec): New function.
8356 (expand_strn_compare): Add support for vector strncmp.
8357 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
8358 length specification to bytes.
8359 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
8360 (vcmpnezb_p): New pattern.
8361 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
8362 for option -mstring-compare-inline-limit.
8363
8364 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
8365
8366 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
8367 (PTA_SKYLAKE): Add PTA_AES.
8368 (PTA_GOLDMONT): Likewise.
8369
8370 2018-08-29 Jan Hubicka <jh@suse.cz>
8371
8372 PR lto/86517
8373 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
8374 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
8375
8376 2018-08-29 Jan Hubicka <jh@suse.cz>
8377
8378 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
8379 TYPE_STUB_DECL.
8380 (hash_tree): Do not visit TYPE_STUB_DECL.
8381 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
8382 stream TYPE_STUB_DECL.
8383 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
8384 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
8385 after free_lang_data.
8386 (type_in_anonymous_namespace_p): Likewise.
8387
8388 2018-08-29 Jan Hubicka <jh@suse.cz>
8389
8390 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8391 comment that it has to be even number.
8392 (class sreal): Change m_sig type to int32_t.
8393 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8394 int64_t for temporary calculations.
8395 (sreal_verify_basics): Drop one bit from minimum and maximum.
8396
8397 2018-08-30 Richard Biener <rguenther@suse.de>
8398
8399 PR tree-optimization/87147
8400 * tree-ssa-sccvn.c (SSA_VISITED): New function.
8401 (visit_phi): When the degenerate result is from the backedge and
8402 we didn't visit its definition yet drop to VARYING.
8403 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
8404
8405 2018-08-29 Jan Hubicka <jh@suse.cz>
8406
8407 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
8408 DECL_VINDEX.
8409 (hash_tree): Likewise.
8410
8411 2018-08-29 Jan Hubicka <jh@suse.cz>
8412
8413 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
8414 and TYPE_NEXT_REF_TO.
8415
8416 2018-08-29 Jan Hubicka <jh@suse.cz>
8417
8418 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8419 comment that it has to be even number.
8420 (class sreal): Change m_sig type to int32_t.
8421 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8422 int64_t for temporary calculations.
8423 (sreal_verify_basics): Drop one bit from minimum and maximum.
8424
8425 2018-08-30 Tamar Christina <tamar.christina@arm.com>
8426
8427 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
8428
8429 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
8430
8431 PR middle-end/86995
8432 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
8433 if to_add is negative.
8434
8435 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
8436
8437 PR middle-end/87053
8438 * builtins.c (c_strlen): Improve range checks.
8439
8440 2018-08-29 Martin Sebor <msebor@redhat.com>
8441 Jeff Law <law@redhat.com>
8442
8443 PR tree-optimization/86714
8444 PR tree-optimization/86711
8445 * builtins.c (c_strlen): Add arguments to call to string_constant.
8446 * expr.c (string_constant): Add argument. Detect missing nul
8447 terminator and outermost declaration it's missing in.
8448 * expr.h (string_constant): Add argument.
8449 * fold-const.c (read_from_constant_string): Add arguments to call to
8450 string_constant.
8451 (c_getstr): Likewise.
8452 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8453 to string_constant.
8454 * tree-ssa-strlen.c (get_stridx): Likewise.
8455
8456 2018-08-29 Jan Hubicka <jh@suse.cz>
8457
8458 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
8459 Do not stream DECL_VINDEX.
8460 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
8461 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
8462 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
8463
8464 2018-08-29 Richard Biener <rguenther@suse.de>
8465
8466 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
8467 virtual operands that are not default defs to honor region
8468 boundaries.
8469 (rpo_vn_valueize): Remove ineffective code here.
8470
8471 2018-08-29 Richard Biener <rguenther@suse.de>
8472
8473 PR tree-optimization/87132
8474 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
8475 when skipping defs reachable over backedges.
8476
8477 2018-08-29 Richard Biener <rguenther@suse.de>
8478
8479 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
8480 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
8481 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
8482 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
8483 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
8484 (vn_reference_lookup_3): Remove use of const_parms.
8485 (free_rpo_vn): Do not free const_parms.
8486 (do_rpo_vn): Do not call init_const_parms.
8487 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
8488 SSA_NAME_POINTS_TO_READONLY_MEMORY.
8489 (call_may_clobber_ref_p_1): Likewise.
8490
8491 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
8492
8493 PR other/86726
8494 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
8495 (-O): Ditto.
8496 (-ftree-scev-cprop): Document.
8497
8498 2018-08-29 Jan Hubicka <jh@suse.cz>
8499
8500 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
8501 parameters.
8502 (sreal constructor): Update.
8503 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
8504 sreal:operator/): Update.
8505
8506 2018-08-29 Martin Liska <mliska@suse.cz>
8507
8508 * tree-switch-conversion.c (switch_conversion::expand):
8509 Strenghten assumption about gswitch statements.
8510
8511 2018-08-29 Richard Biener <rguenther@suse.de>
8512
8513 PR tree-optimization/87117
8514 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
8515 re-value-number released SSA VDEFs.
8516
8517 2018-08-29 Richard Biener <rguenther@suse.de>
8518
8519 PR tree-optimization/87126
8520 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
8521
8522 2018-08-28 Jim Wilson <jimw@sifive.com>
8523
8524 * config/riscv/pic.md: Rewrite.
8525 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
8526 invalid address.
8527 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
8528 (SOFTF, default_load, softload, softstore): New.
8529
8530 2018-08-28 Jeff Law <law@redhat.com>
8531
8532 * fold-const.c (fold_binary_loc): Remove recently added assert.
8533
8534 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
8535
8536 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
8537 to OP parmeter of generated function.
8538
8539 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
8540
8541 PR tree-optimization/87009
8542 * match.pd: Add boolean optimizations.
8543
8544 2018-08-28 Martin Sebor <msebor@redhat.com>
8545
8546 PR middle-end/86631
8547 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
8548 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
8549 (pass_walloca::gate): Use it.
8550 (alloca_call_type): Same.
8551 (pass_walloca::execute): Same.
8552 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
8553
8554 2018-08-28 David Malcolm <dmalcolm@redhat.com>
8555
8556 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
8557 GCC_VERSION for usage of "__gcc_dump_printf__" format from
8558 >= 3005 to >= 9000.
8559
8560 2018-08-28 Richard Biener <rguenther@suse.de>
8561
8562 PR tree-optimization/87124
8563 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
8564 constants before looking up avail.
8565
8566 2018-08-28 Jakub Jelinek <jakub@redhat.com>
8567
8568 PR middle-end/87099
8569 * calls.c (maybe_warn_nonstring_arg): Punt early if
8570 warn_stringop_overflow is zero. Don't call get_range_strlen
8571 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
8572 Swap comparison operands to have constants on rhs. Only use
8573 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
8574 increment lenrng[0].
8575
8576 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
8577
8578 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
8579 use of tree_to_shwi. Remove duplicated test for the size being
8580 a whole number of bytes.
8581
8582 2018-08-28 Richard Biener <rguenther@suse.de>
8583
8584 PR tree-optimization/87117
8585 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
8586 Handle removed stmt without LHS (GIMPLE_NOP).
8587
8588 2018-08-28 Richard Biener <rguenther@suse.de>
8589
8590 PR tree-optimization/87117
8591 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
8592 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
8593
8594 2018-08-28 Richard Biener <rguenther@suse.de>
8595
8596 PR tree-optimization/87117
8597 * tree-ssa-pre.c (compute_avail): Do not make expressions
8598 with predicated values available.
8599 (get_expr_value_id): Assert we do not run into predicated value
8600 expressions.
8601
8602 2018-08-28 Richard Biener <rguenther@suse.de>
8603
8604 PR tree-optimization/87117
8605 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
8606 get virtual operands.
8607 (get_expr_operands): Handle STRING_CST like other decls.
8608
8609 2018-08-28 Martin Liska <mliska@suse.cz>
8610
8611 * tree.h: Update documentation of fndecl_built_in_p
8612 functions.
8613
8614
8615 2018-08-27 Jeff Law <law@redhat.com>
8616 PR tree-optimization/87110
8617 * tree-ssa-dse.c (compute_trims): Handle non-constant
8618 TYPE_SIZE_UNIT.
8619
8620 2018-08-27 Martin Sebor <msebor@redhat.com>
8621
8622 PR tree-optimization/86914
8623 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
8624
8625 2018-08-27 Martin Sebor <msebor@redhat.com>
8626
8627 PR tree-optimization/87112
8628 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
8629 the type of the bound argument.
8630
8631 2018-08-27 Jeff Law <law@redhat.com>
8632
8633 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
8634 type does not have a TYPE_SIZE_UNIT.
8635
8636 2018-08-27 Steve Ellcey <sellcey@cavium.com>
8637
8638 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
8639 with include of backend.h.
8640
8641 2018-08-27 Richard Biener <rguenther@suse.de>
8642
8643 PR tree-optimization/86927
8644 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
8645 use const cond reduction code.
8646
8647 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
8648
8649 PR tree-optimization/85758
8650 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
8651
8652 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8653
8654 PR c++/87091
8655 * diagnostic-show-locus.c (class layout_range): Update for
8656 conversion of show_caret_p to a tri-state.
8657 (layout_range::layout_range): Likewise.
8658 (make_range): Likewise.
8659 (layout::maybe_add_location_range): Likewise.
8660 (layout::should_print_annotation_line_p): Don't show annotation
8661 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
8662 (layout::get_state_at_point): Update for conversion of
8663 show_caret_p to a tri-state. Bail out early for
8664 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
8665 underlining or source colorization.
8666 (gcc_rich_location::add_location_if_nearby): Update for conversion
8667 of show_caret_p to a tri-state.
8668 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
8669 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
8670 Likewise.
8671 (selftest::test_one_liner_labels): Likewise.
8672 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
8673 conversion of show_caret_p to a tri-state.
8674 * pretty-print.c (text_info::set_location): Likewise.
8675 * pretty-print.h (text_info::set_location): Likewise.
8676 * substring-locations.c (format_warning_n_va): Likewise.
8677 * tree-diagnostic.c (default_tree_printer): Likewise.
8678 * tree-pretty-print.c (newline_and_indent): Likewise.
8679
8680 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8681
8682 PR c++/87091
8683 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
8684 line above for line-insertion fix-it hints.
8685 (selftest::test_fixit_insert_containing_newline): Update the
8686 expected results, and add a test with line-numbering enabled.
8687
8688 2018-08-27 Martin Liska <mliska@suse.cz>
8689
8690 PR sanitizer/86962
8691 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
8692 params with DECL_HAS_VALUE_EXPR_P.
8693
8694 2018-08-27 Martin Liska <mliska@suse.cz>
8695
8696 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8697 selected expansion strategy.
8698
8699 2018-08-27 Martin Liska <mliska@suse.cz>
8700
8701 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8702 * builtins.c (is_builtin_fn): Likewise.
8703 * attribs.c (diag_attr_exclusions): Use new function
8704 fndecl_built_in_p and remove check for FUNCTION_DECL if
8705 possible.
8706 (builtin_mathfn_code): Likewise.
8707 (fold_builtin_expect): Likewise.
8708 (fold_call_expr): Likewise.
8709 (fold_builtin_call_array): Likewise.
8710 (fold_call_stmt): Likewise.
8711 (set_builtin_user_assembler_name): Likewise.
8712 (is_simple_builtin): Likewise.
8713 * calls.c (gimple_alloca_call_p): Likewise.
8714 (maybe_warn_nonstring_arg): Likewise.
8715 * cfgexpand.c (expand_call_stmt): Likewise.
8716 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8717 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8718 (cgraph_node::verify_node): Likewise.
8719 * cgraphclones.c (build_function_decl_skip_args): Likewise.
8720 (cgraph_node::create_clone): Likewise.
8721 * config/arm/arm.c (arm_insert_attributes): Likewise.
8722 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8723 * dse.c (scan_insn): Likewise.
8724 * expr.c (expand_expr_real_1): Likewise.
8725 * fold-const.c (operand_equal_p): Likewise.
8726 (fold_binary_loc): Likewise.
8727 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8728 * gimple-low.c (lower_stmt): Likewise.
8729 * gimple-pretty-print.c (dump_gimple_call): Likewise.
8730 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8731 Likewise.
8732 * gimple.c (gimple_build_call_from_tree): Likewise.
8733 (gimple_call_builtin_p): Likewise.
8734 (gimple_call_combined_fn): Likewise.
8735 * gimplify.c (gimplify_call_expr): Likewise.
8736 (gimple_boolify): Likewise.
8737 (gimplify_modify_expr): Likewise.
8738 (gimplify_addr_expr): Likewise.
8739 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8740 * ipa-cp.c (determine_versionability): Likewise.
8741 * ipa-fnsummary.c (compute_fn_summary): Likewise.
8742 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8743 * ipa-split.c (visit_bb): Likewise.
8744 (split_function): Likewise.
8745 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8746 * lto-cgraph.c (input_node): Likewise.
8747 * lto-streamer-out.c (write_symbol): Likewise.
8748 * omp-low.c (setjmp_or_longjmp_p): Likewise.
8749 (lower_omp_1): Likewise.
8750 * predict.c (strip_predict_hints): Likewise.
8751 * print-tree.c (print_node): Likewise.
8752 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8753 * trans-mem.c (is_tm_irrevocable): Likewise.
8754 (is_tm_load): Likewise.
8755 (is_tm_simple_load): Likewise.
8756 (is_tm_store): Likewise.
8757 (is_tm_simple_store): Likewise.
8758 (is_tm_abort): Likewise.
8759 (tm_region_init_1): Likewise.
8760 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8761 * tree-cfg.c (verify_gimple_call): Likewise.
8762 (move_stmt_r): Likewise.
8763 (stmt_can_terminate_bb_p): Likewise.
8764 * tree-eh.c (lower_eh_constructs_2): Likewise.
8765 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
8766 * tree-inline.c (remap_gimple_stmt): Likewise.
8767 (copy_bb): Likewise.
8768 (estimate_num_insns): Likewise.
8769 (fold_marked_statements): Likewise.
8770 * tree-sra.c (scan_function): Likewise.
8771 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
8772 (optimize_stack_restore): Likewise.
8773 (pass_fold_builtins::execute): Likewise.
8774 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8775 (mark_all_reaching_defs_necessary_1): Likewise.
8776 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
8777 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8778 (pass_forwprop::execute): Likewise.
8779 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8780 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8781 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
8782 * tree-ssa-strlen.c (get_string_length): Likewise.
8783 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
8784 (find_func_aliases_for_call): Likewise.
8785 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
8786 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
8787 * tree-tailcall.c (find_tail_calls): Likewise.
8788 * tree.c (need_assembler_name_p): Likewise.
8789 (free_lang_data_in_decl): Likewise.
8790 (get_call_combined_fn): Likewise.
8791 * ubsan.c (is_ubsan_builtin_p): Likewise.
8792 * varasm.c (incorporeal_function_p): Likewise.
8793 * tree.h (DECL_BUILT_IN): Remove and replace with
8794 fndecl_built_in_p.
8795 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
8796 (fndecl_built_in_p): New.
8797
8798 2018-08-27 Martin Liska <mliska@suse.cz>
8799
8800 PR tree-optimization/86847
8801 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
8802 Dump also subtree probability.
8803 (switch_decision_tree::do_jump_if_equal): New function.
8804 (switch_decision_tree::emit_case_nodes): Handle special
8805 situations in balanced tree that can be emitted much simpler.
8806 Fix calculation of probabilities that happen in tree expansion.
8807 * tree-switch-conversion.h (struct cluster): Add
8808 is_single_value_p.
8809 (struct simple_cluster): Likewise.
8810 (struct case_tree_node): Add new function has_child.
8811 (do_jump_if_equal): New.
8812
8813 2018-08-27 Martin Liska <mliska@suse.cz>
8814
8815 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
8816 Add new argument to bit_test_cluster constructor.
8817 (bit_test_cluster::emit): Set bits really number of values
8818 handlel by a test.
8819 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
8820 probability argument.
8821 * tree-switch-conversion.h (struct bit_test_cluster):
8822 Add m_handles_entire_switch.
8823
8824 2018-08-27 Martin Liska <mliska@suse.cz>
8825
8826 PR tree-optimization/86702
8827 * tree-switch-conversion.c (jump_table_cluster::emit):
8828 Make probabilities even for values in jump table
8829 according to number of cases handled.
8830 (switch_decision_tree::compute_cases_per_edge): Pass
8831 argument to reset_out_edges_aux function.
8832 (switch_decision_tree::analyze_switch_statement): Likewise.
8833 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8834 Make it static.
8835
8836 2018-08-27 Martin Liska <mliska@suse.cz>
8837
8838 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8839 cfun argument explicitly.
8840 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8841 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8842 function gimple_switch_default_bb.
8843 (convert_switch_statements):
8844 (expand_builtins):
8845 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8846 * stmt.c (label_to_block_fn): Use label_to_block and pass
8847 cfun argument explicitly and use gimple_switch_label_bb.
8848 (expand_case): Likewise.
8849 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8850 cfun argument explicitly. Likewise.
8851 (make_edges_bb): Likewise.
8852 (make_cond_expr_edges): Likewise.
8853 (get_cases_for_edge): Likewise.
8854 (make_gimple_switch_edges): Likewise.
8855 (label_to_block_fn): Likewise.
8856 (label_to_block): Likewise.
8857 (make_goto_expr_edges): Likewise.
8858 (make_gimple_asm_edges): Likewise.
8859 (main_block_label): Likewise.
8860 (group_case_labels_stmt): Likewise.
8861 (find_taken_edge_computed_goto): Likewise.
8862 (find_taken_edge_switch_expr): Likewise.
8863 (gimple_verify_flow_info): Likewise.
8864 (gimple_redirect_edge_and_branch): Likewise.
8865 (gimple_switch_label_bb): New function.
8866 (gimple_switch_default_bb): Likewise.
8867 (gimple_switch_edge): Likewise.
8868 (gimple_switch_default_edge): Likewise.
8869 * tree-cfg.h (label_to_block_fn): Remove and replace ...
8870 (label_to_block): ... with this.
8871 (gimple_switch_label_bb): New.
8872 (gimple_switch_default_bb): Likewise.
8873 (gimple_switch_edge): Likewise.
8874 (gimple_switch_default_edge): Likewise.
8875 * tree-cfgcleanup.c (convert_single_case_switch): Use
8876 new gimple functions and pass new argument to label_to_block.
8877 (cleanup_control_flow_bb):
8878 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8879 cfun argument explicitly.
8880 (make_eh_edges): Likewise.
8881 (redirect_eh_dispatch_edge): Likewise.
8882 (lower_resx): Likewise.
8883 (lower_eh_dispatch): Likewise.
8884 (maybe_remove_unreachable_handlers): Likewise.
8885 (unsplit_eh): Likewise.
8886 (cleanup_empty_eh): Likewise.
8887 (verify_eh_edges): Likewise.
8888 (verify_eh_dispatch_edge): Likewise.
8889 * tree-ssa-dom.c (record_edge_info): Likewise.
8890 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8891 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8892 (thread_through_normal_block): Likewise.
8893 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8894 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8895 * tree-switch-conversion.c (switch_conversion::collect): Use new
8896 gimple functions.
8897 (switch_conversion::check_final_bb): Likewise.
8898 (switch_conversion::gather_default_values): Pass new argument
8899 to label_to_block.
8900 (switch_conversion::build_constructors): Likewise.
8901 (switch_decision_tree::compute_cases_per_edge): Use new
8902 gimple_switch_edge function.
8903 (switch_decision_tree::analyze_switch_statement): Pass new argument
8904 to label_to_block.
8905 (switch_decision_tree::try_switch_expansion): Use
8906 gimple_switch_default_edge.
8907 * tree-vrp.c (find_switch_asserts): Pass new argument
8908 to label_to_block.
8909 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8910 (vr_values::simplify_switch_using_ranges): Likewise.
8911
8912 2018-08-27 Richard Biener <rguenther@suse.de>
8913
8914 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8915 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8916
8917 * tree-ssa-sccvn.h (struct vn_pval): New structure.
8918 (struct vn_nary_op_s): Add unwind_to member. Add
8919 predicated_values flag and put result into a union together
8920 with a linked list of vn_pval.
8921 (struct vn_ssa_aux): Add name member to make maintaining
8922 a map of SSA name to vn_ssa_aux possible. Remove no longer
8923 needed info, dfsnum, low, visited, on_sccstack, use_processed
8924 and range_info_anti_range_p members.
8925 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8926 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8927 New functions.
8928 (vn_valueize): New global.
8929 (vn_context_bb): Likewise.
8930 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8931 VN_INFO_PTR_INFO): Remove.
8932 * tree-ssa-sccvn.c: ... (rewrite)
8933 (pass_fre::execute): For -O2+ initialize loops and run
8934 RPO VN in optimistic mode (iterating). For -O1 and -Og
8935 run RPO VN in non-optimistic mode.
8936 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8937 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8938 * doc/invoke.texi (sccvn-max-scc-size): Remove.
8939 (rpo-vn-max-loop-depth): Document.
8940 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8941 when valuezing the VUSE signals we walked out of the region.
8942 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8943 (phi_translate): Set VN context block to use for availability
8944 lookup.
8945 (compute_avail): Likewise.
8946 (pre_valueize): New function.
8947 (pass_pre::execute): Adjust to the RPO VN API.
8948
8949 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8950 (propagate_constants_for_unrolling): Remove.
8951 (tree_unroll_loops_completely): Perform value-numbering
8952 on the unrolled bodies loop parent.
8953
8954 2018-08-27 Richard Biener <rguenther@suse.de>
8955
8956 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8957 for partial antic compute.
8958
8959 2018-08-27 Jakub Jelinek <jakub@redhat.com>
8960
8961 PR rtl-optimization/87065
8962 * combine.c (simplify_if_then_else): Formatting fix.
8963 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8964 check.
8965 (known_cond): Don't return const_true_rtx for vector modes. Use
8966 CONST0_RTX instead of const0_rtx. Formatting fixes.
8967
8968 2018-08-27 Martin Liska <mliska@suse.cz>
8969
8970 PR gcov-profile/87069
8971 * gcov.c (process_file): Record files already processed
8972 and warn about a file being processed multiple times.
8973
8974 2018-08-27 Martin Liska <mliska@suse.cz>
8975
8976 PR driver/83193
8977 * config/aarch64/aarch64.c (aarch64_override_options_internal):
8978 Set default values for x_aarch64_*_string strings.
8979 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8980 prefix. For -mabi do not print '=ABI' in help and use
8981 <option_value> format for -msve-vector-bits and -moverride
8982 options.
8983
8984 2018-08-26 Jeff Law <law@redhat.com>
8985
8986 * config/mips/frame-header-opt.c: Include "backend.h" rather than
8987 "cfg.h"
8988
8989 2018-08-26 Marek Polacek <polacek@redhat.com>
8990
8991 PR c++/87029, Implement -Wredundant-move.
8992 * doc/invoke.texi: Document -Wredundant-move.
8993
8994 2018-08-25 Martin Sebor <msebor@redhat.com>
8995
8996 PR tree-optimization/87059
8997 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8998 to the same type as the other.
8999 * fold-const.c (fold_binary_loc): Assert expectation.
9000
9001 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
9002
9003 * config/darwin.c (machopic_legitimize_pic_address): Clean up
9004 extraneous parentheses, dead code section and formatting.
9005
9006 2018-08-24 David Malcolm <dmalcolm@redhat.com>
9007
9008 PR c++/87091
9009 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
9010 wide enough for jumps in the line-numbering to be visible.
9011 (layout::print_gap_in_line_numbering): New member function.
9012 (layout::calculate_line_spans): When using line numbering, merge
9013 line spans that are only 1 line apart.
9014 (diagnostic_show_locus): When printing line numbers, show gaps in
9015 line numbering directly, rather than printing headers.
9016 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
9017 line-numbering with multiple line spans.
9018 (selftest::test_fixit_insert_containing_newline_2): Add test of
9019 line-numbering, in which the spans are close enough to be merged.
9020
9021 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
9022
9023 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
9024 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
9025 * tree-vrp.c (range_is_nonnull): Remove.
9026 (range_includes_zero_p): Accept value_range instead of min/max.
9027 (extract_range_from_binary_expr_1): Do not early bail on
9028 POINTER_PLUS_EXPR.
9029 Use range_includes_zero_p instead of range_is_nonnull.
9030 (extract_range_from_unary_expr): Use range_includes_zero_p instead
9031 of range_is_nonnull.
9032 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
9033 special case VR_ANTI_RANGE.
9034 (vrp_finalize): Same.
9035 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
9036 instead of min/max.
9037 (range_is_nonnull): Remove.
9038 * vr-values.c (vrp_stmt_computes_nonzero): Use
9039 range_includes_zero_p instead of range_is_nonnull.
9040 (extract_range_basic): Pass value_range to range_includes_zero_p
9041 instead of range_is_nonnull.
9042
9043 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
9044
9045 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
9046 * emit-rtl.h (rtl_data): Remove return_bnd.
9047 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
9048 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
9049 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
9050 (POINTER_BOUNDS_MODE): Remove definition.
9051 (make_pointer_bounds_mode): Remove.
9052 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
9053 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
9054 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
9055 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
9056 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
9057 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
9058 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
9059
9060 * config/i386/i386-modes.def (BND32, BND64): Remove.
9061 * config/i386/i386.c (dbx_register_map): Remove bound registers.
9062 (dbx64_register_map): Ditto.
9063 (svr4_dbx_register_map): Ditto.
9064 (indirect_thunk_bnd_needed): Remove.
9065 (indirect_thunks_bnd_used): Ditto.
9066 (indirect_return_bnd_needed): Ditto.
9067 (indirect_return_via_cx_bnd): Ditto.
9068 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
9069 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
9070 (output_indirect_thunk): Ditto. Remove need_prefix argument.
9071 (output_indirect_thunk_function): Remove handling of
9072 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
9073 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
9074 (ix86_save_reg): Remove handling of crtl->return_bnd.
9075 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
9076 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
9077 and UNSPEC_BNDLX_ADDR.
9078 (ix86_output_indirect_branch_via_reg): Remove handling of
9079 indirect_thunk_prefix_bnd.
9080 (ix86_output_indirect_branch_via_push): Ditto.
9081 (ix86_output_function_return): Ditto.
9082 (ix86_output_indirect_function_return): Ditto.
9083 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
9084 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
9085 (CALL_USED_REGISTERS): Ditto.
9086 (REG_ALLOC_ORDER): Update for removal of bound registers.
9087 (HI_REGISTER_NAMES): Ditto.
9088 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
9089 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
9090 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
9091 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
9092 (FIRST_PSEUDO_REG): Update.
9093 (BND): Remove mode iterator.
9094 * config/i386/predicates.md (bnd_mem_operator): Remove.
9095
9096 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
9097
9098 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
9099 vectors.
9100
9101 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
9102
9103 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
9104 the case in which the permute needs only a single element and
9105 repeats for every vector of the result. Extend that case to
9106 handle variable-length vectors.
9107 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9108
9109 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
9110
9111 PR debug/79342
9112 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
9113 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
9114
9115 2018-08-24 Richard Biener <rguenther@suse.de>
9116
9117 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
9118 bb_flags_allocated members.
9119 (auto_flag): New RAII class for allocating flags.
9120 (auto_edge_flag): New RAII class for allocating edge flags.
9121 (auto_bb_flag): New RAII class for allocating bb flags.
9122 * cfgloop.c (verify_loop_structure): Allocate temporary edge
9123 flag dynamically.
9124 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
9125 in favor of temporarily allocated BB flag.
9126 * hsa-brig.c: Re-order includes.
9127 * hsa-dump.c: Likewise.
9128 * hsa-regalloc.c: Likewise.
9129 * print-rtl.c: Likewise.
9130 * profile-count.c: Likewise.
9131
9132 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
9133
9134 PR target/86989
9135 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
9136 the TOC register.
9137
9138 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
9139
9140 PR 87073/bootstrap
9141 * wide-int-range.cc (wide_int_range_div): Do not ignore result
9142 from wide_int_range_multiplicative_op.
9143
9144 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9145
9146 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
9147 "permutaion".
9148
9149 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
9150
9151 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
9152 to 'expanded'.
9153
9154 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
9155
9156 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
9157 full GENERIC expression used for replacement.
9158
9159 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
9160
9161 * tree-vrp.c (abs_extent_range): Remove.
9162 (extract_range_into_wide_ints): Pass wide ints by reference.
9163 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
9164 Pass wide ints by reference in all calls to
9165 extract_range_into_wide_ints.
9166 * wide-int-range.cc (wide_int_range_div): New.
9167 * wide-int-range.h (wide_int_range_div): New.
9168 (wide_int_range_includes_zero_p): New.
9169 (wide_int_range_zero_p): New.
9170
9171 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
9172
9173 * config/aarch64/aarch64.md (arches): New enum.
9174 (arch): New enum attr.
9175 (arch_enabled): New attr.
9176 (enabled): Now uses arch_enabled only.
9177 (simd, sve, fp16): Removed attribute.
9178 (fp): Attr now defined in terms of 'arch'.
9179 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
9180 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
9181 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
9182 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
9183 attributes into 'arch'.
9184 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
9185 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
9186 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
9187 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
9188 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
9189 'simd' attribute into 'arch'.
9190 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
9191 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
9192 Convert use of 'fp' attribute to 'arch'.
9193 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
9194 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
9195 into 'arch'.
9196 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
9197 (different modes) Merge 'fp' and 'simd' into 'arch'.
9198 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
9199 'simd' into 'arch'.
9200
9201 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
9202
9203 PR rtl-optimization/87026
9204 * expmed.c (canonicalize_comparison): If we can no longer create
9205 pseudoregisters, don't.
9206
9207 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
9208
9209 PR target/86951
9210 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
9211 prototype.
9212 * config/arm/arm.c (speculation_barrier_libfunc): New static
9213 variable.
9214 (arm_init_libfuncs): Initialize it.
9215 (arm_emit_speculation_barrier): New function.
9216 * config/arm/arm.md (speculation_barrier): Call
9217 arm_emit_speculation_barrier for architectures that do not have
9218 DSB or ISB.
9219 (speculation_barrier_insn): Only match on Armv7 or later.
9220
9221 2018-08-23 Richard Biener <rguenther@suse.de>
9222
9223 PR middle-end/87024
9224 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
9225 calls.
9226
9227 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
9228
9229 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
9230 of single-vector TBLs.
9231 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
9232 one input is given.
9233
9234 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
9235
9236 PR target/85910
9237 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
9238 aarch64_evpc_tbl guard.
9239
9240 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
9241
9242 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
9243 behaviour.
9244
9245 2018-08-22 Martin Sebor <msebor@redhat.com>
9246
9247 PR middle-end/87052
9248 * tree-pretty-print.c (pretty_print_string): Add argument.
9249 (dump_generic_node): Call to pretty_print_string with string size.
9250
9251 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
9252
9253 PR rtl-optimization/86771
9254 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
9255 of two SETs into those two SETs, one to be placed at i2, if that SETs
9256 destination is modified between i2 and i3.
9257
9258 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9259
9260 PR tree-optimization/86725
9261 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
9262 function.
9263 (vect_analyze_scalar_cycles_1): Check it.
9264
9265 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9266
9267 PR tree-optimization/86725
9268 * tree-vect-loop.c (vect_is_simple_reduction): When treating
9269 an outer loop phi as a double reduction, make sure that the
9270 single user of the phi result is an inner loop phi.
9271
9272 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9273
9274 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
9275 grouped stores with gaps to a strided group.
9276
9277 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9278
9279 * tree-vect-stmts.c (get_group_load_store_type)
9280 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
9281 first statement in a group.
9282
9283 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9284
9285 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
9286 the sequence used in gcc/gcc.c.
9287
9288 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9289
9290 PR other/704
9291 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
9292 building it.
9293
9294 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9295
9296 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
9297 Darwin10-specific unwinder-shim.
9298 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
9299 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
9300 New to cater for Darwin10 Rosetta.
9301
9302 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9303
9304 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
9305 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
9306
9307 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9308
9309 PR bootstrap/81033
9310 PR target/81733
9311 PR target/52795
9312 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
9313 (dwarf2out_switch_text_section): Generate a local label for the
9314 second function sub-section and apply it as the second FDE start
9315 label.
9316 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
9317 second sub-section start.
9318
9319 2018-08-22 Richard Biener <rguenther@suse.de>
9320
9321 PR tree-optimization/86988
9322 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
9323
9324 2018-08-22 Richard Biener <rguenther@suse.de>
9325
9326 PR tree-optimization/86945
9327 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
9328
9329 2018-08-22 Alexandre Oliva <oliva@adacore.com>
9330
9331 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
9332 a comment about how uses of r2 for .sdata2 come about.
9333
9334 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
9335
9336 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
9337
9338 2018-08-21 Marek Polacek <polacek@redhat.com>
9339
9340 PR c++/86981, Implement -Wpessimizing-move.
9341 * doc/invoke.texi: Document -Wpessimizing-move.
9342
9343 2018-08-21 Jan Hubicka <jh@suse.cz>
9344
9345 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
9346 * tree.h (is_redundant_typedef): Remove.
9347 * dwarf2out.c (is_redundant_typedef): Turn into static function.
9348
9349 2018-08-21 Jan Hubicka <jh@suse.cz>
9350
9351 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
9352 when possible.
9353
9354 2018-08-21 Tamar Christina <tamar.christina@arm.com>
9355
9356 * expmed.c (extract_low_bits): Reject invalid subregs early.
9357
9358 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
9359
9360 PR middle-end/86121
9361 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
9362 behaviour.
9363
9364 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9365
9366 * config/vxworks.h: Guard vxworks_asm_out_constructor and
9367 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
9368 * config/vxworks.c: Likewise.
9369
9370 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9371
9372 * config/vxworks.c: Set targetm.have_ctors_dtors
9373 if HAVE_INITFINI_ARRAY_SUPPORT.
9374 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
9375 if HAVE_INITFINI_ARRAY_SUPPORT.
9376
9377 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9378
9379 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
9380 default search path for VxWorks < 7.
9381
9382 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
9383
9384 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
9385 (get_format_string): Refer to c_getstr.
9386
9387 2018-08-21 Tom de Vries <tdevries@suse.de>
9388
9389 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9390 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9391 (debuginfo_early_stop): Declare.
9392 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9393 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9394 (debuginfo_early_stop): New function.
9395 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
9396 and debuginfo_early_stop.
9397 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
9398 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
9399 (general_init): Call debuginfo_early_init.
9400 (finalize): Call debuginfo_fini.
9401 (do_compile): Call debuginfo_init.
9402 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
9403 -fdump-early-debug.
9404 (@item -fdump-debug, @item -fdump-earlydebug): Add.
9405
9406 2018-08-21 Tom de Vries <tdevries@suse.de>
9407
9408 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
9409 flag_dump_noaddr and flag_dump_unnumbered.
9410
9411 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
9412
9413 * wide-int-range.cc (wide_int_range_abs): New.
9414 (wide_int_range_order_set): Rename from wide_int_range_min_max.
9415 * wide-int-range.h (wide_int_range_abs): New.
9416 (wide_int_range_min_max): New.
9417 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
9418 case to call wide_int_range_abs.
9419 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
9420 (extract_range_from_abs_expr): Delete.
9421
9422 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
9423
9424 PR target/87033
9425 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
9426 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
9427 for indexed loads.
9428
9429 2018-08-20 Nathan Sidwell <nathan@acm.org>
9430 Jeff Law <law@redhat.com>
9431
9432 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
9433 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
9434
9435 2018-08-20 David Malcolm <dmalcolm@redhat.com>
9436
9437 PR other/84889
9438 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
9439 (decl_attributes): Likewise.
9440 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
9441 instance.
9442 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9443 * diagnostic-core.h (class auto_diagnostic_group): New class.
9444 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
9445 (diagnostic_report_diagnostic): Handle the first diagnostics within
9446 a group.
9447 (emit_diagnostic): Add auto_diagnostic_group instance.
9448 (inform): Likewise.
9449 (inform_n): Likewise.
9450 (warning): Likewise.
9451 (warning_at): Likewise.
9452 (warning_n): Likewise.
9453 (pedwarn): Likewise.
9454 (permerror): Likewise.
9455 (error): Likewise.
9456 (error_n): Likewise.
9457 (error_at): Likewise.
9458 (sorry): Likewise.
9459 (fatal_error): Likewise.
9460 (internal_error): Likewise.
9461 (internal_error_no_backtrace): Likewise.
9462 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
9463 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
9464 * diagnostic.h (struct diagnostic_context): Add fields
9465 "diagnostic_group_nesting_depth",
9466 "diagnostic_group_emission_count", "begin_group_cb",
9467 "end_group_cb".
9468 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
9469 Add auto_diagnostic_group instance(s).
9470 (find_explicit_erroneous_behavior): Likewise.
9471 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
9472 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
9473 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
9474 (gimplify_va_arg_expr): Likewise.
9475 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
9476 (HSA_SORRY_AT): Likewise.
9477 * ipa-devirt.c (compare_virtual_tables): Likewise.
9478 (warn_odr): Likewise.
9479 * multiple_target.c (expand_target_clones): Likewise.
9480 * opts-common.c (cmdline_handle_error): Likewise.
9481 * reginfo.c (globalize_reg): Likewise.
9482 * substring-locations.c (format_warning_n_va): Likewise.
9483 * tree-inline.c (expand_call_inline): Likewise.
9484 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
9485 * tree-ssa-loop-niter.c
9486 (do_warn_aggressive_loop_optimizations): Likewise.
9487 * tree-ssa-uninit.c (warn_uninit): Likewise.
9488 * tree.c (warn_deprecated_use): Likewise.
9489
9490 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
9491
9492 PR target/87014
9493 * config/i386/i386.md (eh_return): Always update EH return
9494 address in word_mode.
9495
9496 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
9497
9498 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
9499 TARGET_SPLIT_COMPLEX_ARG is defined.
9500
9501 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9502
9503 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
9504
9505 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9506
9507 PR target/86984
9508 * expr.c (expand_assignment): Assert that bitpos is positive.
9509 (store_field): Likewise
9510 (expand_expr_real_1): Make sure that bitpos is positive.
9511 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
9512 integer overflow.
9513
9514 2018-08-20 Nathan Sidwell <nathan@acm.org>
9515
9516 * Makefile.in (CPP_ID_DATA_H): Delete.
9517 (CPP_INTERNAL_H): Don't add it.
9518 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
9519 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
9520
9521 2018-08-20 Richard Biener <rguenther@suse.de>
9522
9523 PR tree-optimization/78655
9524 * tree-vrp.c (extract_range_from_binary_expr_1): Make
9525 pointer + offset nonnull if either operand is nonnull work.
9526
9527 2018-08-20 Tom de Vries <tdevries@suse.de>
9528
9529 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
9530 unless the referenced die describes the added property using
9531 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
9532 Otherwise, add a DW_AT_location to the referenced die.
9533
9534 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
9535
9536 PR target/86994
9537 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
9538 register_operand when calling ix86_set_reg_reg_cost.
9539 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
9540 Set *total to 0 for operands that satisfy x86_64_immediate_operand
9541 predicate and to 1 otherwise.
9542
9543 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
9544
9545 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
9546 emit a diagnostic that it is not supported and reset the option.
9547 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
9548 supported and consume the option. (ASM_FINAL_SPEC): New.
9549
9550 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9551
9552 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
9553 a sentence.
9554
9555 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
9556
9557 C-SKY port: Documentation
9558
9559 * doc/extend.texi (C-SKY Function Attributes): New section.
9560 * doc/invoke.texi (Option Summary): Add C-SKY options.
9561 (C-SKY Options): New section.
9562 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
9563
9564 2018-08-17 Jojo <jijie_rong@c-sky.com>
9565 Huibin Wang <huibin_wang@c-sky.com>
9566 Sandra Loosemore <sandra@codesourcery.com>
9567 Chung-Lin Tang <cltang@codesourcery.com>
9568
9569 C-SKY port: Backend implementation
9570
9571 * config/csky/*: New.
9572 * common/config/csky/*: New.
9573
9574 2018-08-17 Jojo <jijie_rong@c-sky.com>
9575 Huibin Wang <huibin_wang@c-sky.com>
9576 Sandra Loosemore <sandra@codesourcery.com>
9577 Chung-Lin Tang <cltang@codesourcery.com>
9578 Andrew Jenner <andrew@codesourcery.com>
9579
9580 C-SKY port: Configury
9581
9582 * config.gcc (csky-*-*): New.
9583 * configure.ac: Add csky to targets for dwarf2 debug_line support.
9584 * configure: Regenerated.
9585
9586 2018-08-17 David Malcolm <dmalcolm@redhat.com>
9587
9588 * dump-context.h: Include "dumpfile.h".
9589 (dump_context::dump_printf_va): Convert final param from va_list
9590 to va_list *. Convert from ATTRIBUTE_PRINTF to
9591 ATTRIBUTE_GCC_DUMP_PRINTF.
9592 (dump_context::dump_printf_loc_va): Likewise.
9593 * dumpfile.c: Include "stringpool.h".
9594 (make_item_for_dump_printf_va): Delete.
9595 (make_item_for_dump_printf): Delete.
9596 (class dump_pretty_printer): New class.
9597 (dump_pretty_printer::dump_pretty_printer): New ctor.
9598 (dump_pretty_printer::emit_items): New member function.
9599 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
9600 function.
9601 (dump_pretty_printer::emit_item): New member function.
9602 (dump_pretty_printer::stash_item): New member function.
9603 (dump_pretty_printer::format_decoder_cb): New member function.
9604 (dump_pretty_printer::decode_format): New member function.
9605 (dump_context::dump_printf_va): Reimplement in terms of
9606 dump_pretty_printer.
9607 (dump_context::dump_printf_loc_va): Convert final param from va_list
9608 to va_list *.
9609 (dump_context::begin_scope): Reimplement call to
9610 make_item_for_dump_printf.
9611 (dump_printf): Update for change to dump_printf_va.
9612 (dump_printf_loc): Likewise.
9613 (selftest::test_capture_of_dump_calls): Convert "stmt" from
9614 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
9615 with %T, %E, and %G.
9616 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
9617 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
9618 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
9619 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
9620 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
9621 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
9622 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
9623 within a dump_printf_loc call to "%wu".
9624 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
9625 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
9626 missing space after "=".
9627 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
9628 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
9629 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
9630 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
9631 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
9632 duplicate "vectorized" from message.
9633
9634 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
9635
9636 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
9637 polyNxK_t element's TYPE_STRING_FLAG.
9638
9639 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9640
9641 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
9642 (they were unnamed before). Fix comments.
9643
9644 2018-08-17 Nathan Sidwell <nathan@acm.org>
9645
9646 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
9647
9648 2018-08-17 Richard Biener <rguenther@suse.de>
9649
9650 PR tree-optimization/86841
9651 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
9652
9653 2018-08-17 Martin Liska <mliska@suse.cz>
9654
9655 * common.opt: Remove Warn, Init and Report for options with
9656 Ignore/Deprecated flag. Warning is done automatically for
9657 Deprecated flags.
9658 * config/i386/i386.opt: Likewise.
9659 * config/ia64/ia64.opt: Likewise.
9660 * config/rs6000/rs6000.opt: Likewise.
9661 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
9662 Remove usage of flag_check_pointer_bounds.
9663 * lto-wrapper.c (merge_and_complain): Do not handle
9664 OPT_fcheck_pointer_bounds.
9665 (append_compiler_options): Likewise.
9666 * opt-functions.awk: Do not handle Deprecated.
9667 * optc-gen.awk: Check that Var, Report and Init are not
9668 used for an option with Ignore/Deprecated flag.
9669 * opts-common.c (decode_cmdline_option): Do not report
9670 CL_ERR_DEPRECATED.
9671 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
9672 options.
9673 * opts.h (struct cl_option): Remove cl_deprecated flag.
9674 (CL_ERR_DEPRECATED): Remove error enum value.
9675
9676 2018-08-17 Richard Biener <rguenther@suse.de>
9677
9678 PR middle-end/86505
9679 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
9680 across a va-arg-pack using call adjust its return value accordingly.
9681
9682 2018-08-16 Martin Sebor <msebor@redhat.com>
9683
9684 PR tree-optimization/86853
9685 * gimple-ssa-sprintf.c (struct format_result): Rename member.
9686 (struct fmtresult): Add member and initialize it in ctors.
9687 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
9688 (format_string): Handle %S the same as %ls. Set MAYFAIL.
9689 (format_directive): Set POSUNDER4K when MAYFAIL is set.
9690 (parse_directive): Handle %C same as %c.
9691 (sprintf_dom_walker::compute_format_length): Adjust.
9692 (is_call_safe): Adjust.
9693
9694 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9695
9696 * builtins.c (c_strlen): Add new parameter eltsize. Use it
9697 for determining how to count the elements.
9698 * builtins.h (c_strlen): Adjust prototype.
9699 * expr.c (string_constant): Add new parameter mem_size.
9700 Set *mem_size appropriately.
9701 * expr.h (string_constant): Adjust protoype.
9702 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9703 * gimple-fold.h (get_range_strlen): Adjust prototype.
9704 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9705 (format_string): Call get_string_length with eltsize.
9706
9707 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9708
9709 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9710 to emit the span, rather than setting it as the prefix.
9711
9712 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9713
9714 * diagnostic-show-locus.c (layout::start_annotation_line): Add
9715 "margin_char" parameter, defaulting to space. Use it in place
9716 of pp_space for the initial part of the margin.
9717 (layout::print_leading_fixits): Use '+' when filling the margin
9718 of line-insertion fix-it hints.
9719
9720 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9721
9722 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9723 Delete.
9724
9725 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9726
9727 * config/rs6000/altivec.md: Don't set length attribute to the default
9728 value.
9729 * config/rs6000/darwin.md: Ditto.
9730 * config/rs6000/dfp.md: Ditto.
9731 * config/rs6000/htm.md: Ditto.
9732 * config/rs6000/rs6000.md: Ditto.
9733 * config/rs6000/sync.md: Ditto.
9734 * config/rs6000/vsx.md: Ditto.
9735
9736 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9737
9738 * config/rs6000/altivec.md: Don't set length attribute to the default
9739 value, for branch instructions.
9740 * config/rs6000/darwin.md: Ditto.
9741 * config/rs6000/rs6000.md: Ditto.
9742
9743 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9744
9745 * config/rs6000/rs6000.md (length): Always define as const_int 4.
9746 (unnamed conditional branch define_insn): Set length to 4 or 8
9747 depending on offset.
9748 (<bd>_<mode>): Similar, for alternative 0.
9749 (<bd>tf_<mode>): Ditto.
9750
9751 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9752
9753 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9754
9755 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
9756
9757 * doc/rtl.texi: Replace old RTX class names with new names.
9758
9759
9760 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
9761
9762 * expmed.h (canonicalize_comparison): New declaration.
9763 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
9764 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
9765 * optabs.c (prepare_cmp_insn): Likewise.
9766 * rtl.h (unsigned_condition_p): New function which checks if a
9767 comparison operator is unsigned.
9768
9769 2018-08-16 Nathan Sidwell <nathan@acm.org>
9770
9771 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
9772 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
9773
9774 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9775
9776 PR target/84711
9777 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
9778 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
9779 (mov<mov>): ..this and enable unconditionally.
9780
9781 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9782
9783 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
9784
9785 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
9786
9787 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
9788 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
9789 "Common" with "Target".
9790
9791 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9792
9793 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
9794 * doc/invoke.texi (mmitigate-rop): Remove.
9795 * config/i386/i386.c: Do not include "regrename.h".
9796 (ix86_rop_should_change_byte_p, reg_encoded_number)
9797 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
9798 Remove.
9799 (ix86_reorg): Remove call to ix86_mitigate_rop.
9800 * config/i386/i386.md (attr "modrm_class"): Remove.
9801 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
9802 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
9803 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
9804
9805 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
9806
9807 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
9808 allow folding of mergeh() and mergel() for the float and double types.
9809 (fold_mergehl_helper): Rework to handle building a permute tree
9810 for float vectors.
9811
9812 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9813
9814 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
9815 for TARGET_SSE.
9816
9817 2018-08-15 David Malcolm <dmalcolm@redhat.com>
9818
9819 * common.opt (fdiagnostics-show-labels): New option.
9820 * diagnostic-show-locus.c (class layout_range): Add field
9821 "m_label".
9822 (class layout): Add field "m_show_labels_p".
9823 (layout_range::layout_range): Add param "label" and use it to
9824 initialize m_label.
9825 (make_range): Pass in NULL for new "label" param of layout_range's
9826 ctor.
9827 (layout::layout): Initialize m_show_labels_p.
9828 (layout::maybe_add_location_range): Pass in loc_range->m_label
9829 when constructing layout_range instances.
9830 (struct line_label): New struct.
9831 (layout::print_any_labels): New member function.
9832 (layout::print_line): Call it if label-printing is enabled.
9833 (selftest::test_one_liner_labels): New test.
9834 (selftest::test_diagnostic_show_locus_one_liner): Call it.
9835 * diagnostic.c (diagnostic_initialize): Initialize
9836 context->show_labels_p.
9837 * diagnostic.h (struct diagnostic_context): Add field
9838 "show_labels_p".
9839 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9840 -fno-diagnostics-show-labels.
9841 * dwarf2out.c (gen_producer_string): Add
9842 OPT_fdiagnostics_show_labels to the ignored options.
9843 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9844 param.
9845 (gcc_rich_location::maybe_add_expr): Likewise.
9846 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9847 label" param, defaulting to NULL.
9848 (gcc_rich_location::add_expr): Add "label" param.
9849 (gcc_rich_location::maybe_add_expr): Likewise.
9850 (class text_range_label): New class.
9851 (class range_label_for_type_mismatch): New class.
9852 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9853 of format_warning_va.
9854 (fmtwarn_n): Likewise for new params of format_warning_n_va.
9855 * lto-wrapper.c (merge_and_complain): Add
9856 OPT_fdiagnostics_show_labels to the "pick one setting" options.
9857 (append_compiler_options): Likewise to the dropped options.
9858 (append_diag_options): Likewise to the passed-on options.
9859 * opts.c (common_handle_option): Handle the new option.
9860 * selftest-diagnostic.c
9861 (test_diagnostic_context::test_diagnostic_context): Enable
9862 show_labels_p.
9863 * substring-locations.c: Include "gcc-rich-location.h".
9864 (format_warning_n_va): Add "fmt_label" and "param_label" params
9865 and use them as appropriate.
9866 (format_warning_va): Add "fmt_label" and "param_label" params,
9867 passing them on to format_warning_n_va.
9868 (format_warning_at_substring): Likewise.
9869 (format_warning_at_substring_n): Likewise.
9870 * substring-locations.h (format_warning_va): Add "fmt_label" and
9871 "param_label" params.
9872 (format_warning_n_va): Likewise.
9873 (format_warning_at_substring): Likewise.
9874 (format_warning_at_substring_n): Likewise.
9875 * toplev.c (general_init): Initialize global_dc->show_labels_p.
9876
9877 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
9878
9879 PR testsuite/86519
9880 * builtins.c (expand_builtin_memcmp): Do not expand the call
9881 when overflow is detected.
9882
9883 2018-08-15 Martin Sebor <msebor@redhat.com>
9884
9885 PR tree-optimization/71625
9886 * config/aarch64/aarch64-builtins.c
9887 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9888
9889 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
9890
9891 * config/s390/s390.c (s390_reorg): Remove loop.
9892
9893 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9894
9895 * config/darwin.c
9896 (darwin_function_switched_text_sections): Delete.
9897 * gcc/config/darwin.h
9898 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9899
9900 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9901
9902 PR target/81685
9903 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9904 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
9905 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9906
9907 2018-08-15 Martin Liska <mliska@suse.cz>
9908
9909 PR tree-optimization/86925
9910 * predict.c (expr_expected_value_1): When taking
9911 later predictor, assign also probability.
9912 Use fold_build2_initializer_loc in order to fold
9913 the expression in -frounding-math.
9914
9915 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
9916
9917 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9918 patterns.
9919 (expand_vec_perm_1): Try the new method.
9920
9921 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
9922
9923 PR target/86547
9924 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9925 Check whether lra_live_max_point is 0 before dividing.
9926
9927 2018-08-14 Martin Sebor <msebor@redhat.com>
9928
9929 PR tree-optimization/86650
9930 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9931 (vrp_prop::check_mem_ref): Same.
9932
9933 2018-08-13 Liu Hao <lh_mouse@126.com>
9934
9935 * pretty-print.c (eat_esc_sequence): Swap the foreground and
9936 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9937 and clear it thereafter, as it only works for DBCS.
9938
9939 2018-08-13 Liu Hao <lh_mouse@126.com>
9940
9941 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9942 handle returned by _get_osf_handle().
9943
9944 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9945
9946 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9947 for folding vec_perm.
9948
9949 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9950
9951 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9952 Add support for gimple-folding of vec_pack() and vec_unpack()
9953 intrinsics.
9954
9955 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9956
9957 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9958 vec_xst variants to the list.
9959 (rs6000_gimple_fold_builtin): Add support for folding unaligned
9960 vector loads and stores.
9961
9962 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
9963
9964 * config.gcc (rs6000-ibm-aix4.x): Delete.
9965 (rs6000-ibm-aix5.1): Delete.
9966 (rs6000-ibm-aix5.2): Delete.
9967 (rs6000-ibm-aix5.3): Delete.
9968 * config/rs6000/aix43.h: Delete.
9969 * config/rs6000/aix51.h: Delete.
9970 * config/rs6000/aix52.h: Delete.
9971 * config/rs6000/t-aix43: Delete.
9972
9973 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
9974
9975 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9976 New function.
9977 (s390_decompose_address): Factor out constant pool ref
9978 decomposition.
9979
9980 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9981
9982 * config/nds32/nds32-predicates.c
9983 (nds32_can_use_bclr_p): Change return type as bool.
9984 (nds32_can_use_bset_p): Ditto.
9985 (nds32_can_use_btgl_p): Ditto.
9986 (nds32_can_use_bitci_p): Ditto.
9987 * config/nds32/nds32-protos.h
9988 (nds32_can_use_bclr_p): Change declaration.
9989 (nds32_can_use_bset_p): Ditto.
9990 (nds32_can_use_btgl_p): Ditto.
9991 (nds32_can_use_bitci_p): Ditto.
9992
9993 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9994
9995 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9996 Support -msched-prolog-epilog option.
9997 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9998
9999 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10000
10001 * common/config/nds32/nds32-common.c
10002 (nds32_option_optimization_table): Enalbe -malways-align.
10003
10004 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10005
10006 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
10007 extra_headers.
10008 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
10009 OPT_misr_secure_ case.
10010 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
10011 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
10012 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
10013 secure attribute.
10014 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
10015 (nds32_isr_info): New field security_level.
10016 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
10017 * config/nds32/nds32.md (return_internal): Consider critical attribute.
10018 * config/nds32/nds32.opt (misr-secure): New option.
10019 * config/nds32/nds32_init.inc: New file.
10020 * config/nds32/nds32_isr.h: New file.
10021
10022 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
10023
10024 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
10025 Update comment for atomic instructions.
10026 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
10027 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
10028 Remove.
10029 (atomic_loaddi): Revise fence expansion to only emit fence prior to
10030 load for __ATOMIC_SEQ_CST model.
10031 (atomic_loaddi_1): Remove float register target.
10032 (atomic_storedi): Handle CONST_INT values.
10033 (atomic_storedi_1): Remove float register source. Add special case
10034 for zero value.
10035 (memory_barrier): New expander and insn.
10036
10037 2018-08-11 Jakub Jelinek <jakub@redhat.com>
10038
10039 PR tree-optimization/86835
10040 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
10041 new_stmt after def_gsi, make sure to insert new_square_stmt after
10042 that stmt, not 2 stmts before it.
10043
10044 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
10045
10046 PR target/82418
10047 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
10048 instead of SWI48.
10049
10050 2018-08-10 Martin Liska <mliska@suse.cz>
10051
10052 PR target/83610
10053 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
10054 function type.
10055 * builtins.c (expand_builtin_expect_with_probability):
10056 New function.
10057 (expand_builtin_expect_with_probability): New function.
10058 (build_builtin_expect_predicate): Add new argumnet probability
10059 for BUILT_IN_EXPECT_WITH_PROBABILITY.
10060 (fold_builtin_expect):
10061 (fold_builtin_2):
10062 (fold_builtin_3):
10063 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
10064 * builtins.h (fold_builtin_expect): Set new argument.
10065 * doc/extend.texi: Document __builtin_expect_with_probability.
10066 * doc/invoke.texi: Likewise.
10067 * gimple-fold.c (gimple_fold_call): Pass new argument.
10068 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
10069 also BUILT_IN_EXPECT_WITH_PROBABILITY.
10070 * predict.c (get_predictor_value): New function.
10071 (expr_expected_value): Add new argument probability. Assume
10072 that predictor and probability are always non-null.
10073 (expr_expected_value_1): Likewise. For __builtin_expect and
10074 __builtin_expect_with_probability set probability. Handle
10075 combination in binary expressions.
10076 (tree_predict_by_opcode): Simplify code by simply calling
10077 get_predictor_value.
10078 (pass_strip_predict_hints::execute): Add handling of
10079 BUILT_IN_EXPECT_WITH_PROBABILITY.
10080 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
10081 new predictor.
10082 * tree.h (DECL_BUILT_IN_P): New function.
10083
10084 2018-08-10 Martin Liska <mliska@suse.cz>
10085
10086 PR tree-optimization/85799
10087 * passes.def: Add argument for pass_strip_predict_hints.
10088 * predict.c (class pass_strip_predict_hints): Add new argument
10089 early_p.
10090 (strip_predictor_early): New function.
10091 (pass_strip_predict_hints::execute): Call the function to
10092 strip predictors.
10093 (strip_predict_hints): New function.
10094 * predict.def: Fix comment.
10095
10096 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
10097
10098 * Makefile.in: Clarify which tm.texi to copy over to assert the
10099 right to grant a GFDL license for all.
10100
10101 2018-08-09 Jeff Law <law@redhat.com>
10102
10103 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
10104 unused variable.
10105
10106 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
10107
10108 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
10109 prototype.
10110
10111 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10112
10113 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
10114 reductions for variable-length vectors.
10115
10116 2018-08-09 David Malcolm <dmalcolm@redhat.com>
10117
10118 PR other/84889
10119 * common.opt (fdiagnostics-show-line-numbers): New option.
10120 * diagnostic-show-locus.c (class layout): Add fields
10121 "m_show_line_numbers_p" and "m_linenum_width";
10122 (num_digits): New function.
10123 (test_num_digits): New function.
10124 (layout::layout): Initialize new fields. Update m_x_offset
10125 logic to handle any left margin.
10126 (layout::print_source_line): Print line number when requested.
10127 (layout::start_annotation_line): New member function.
10128 (layout::print_annotation_line): Call it.
10129 (layout::print_leading_fixits): Likewise.
10130 (layout::print_trailing_fixits): Likewise. Update calls to
10131 move_to_column for new parameter.
10132 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
10133 it to potentially call start_annotation_line.
10134 (layout::show_ruler): Call start_annotation_line.
10135 (selftest::test_line_numbers_multiline_range): New selftest.
10136 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
10137 and selftest::test_line_numbers_multiline_range.
10138 * diagnostic.c (diagnostic_initialize): Initialize
10139 show_line_numbers_p.
10140 * diagnostic.h (struct diagnostic_context): Add field
10141 "show_line_numbers_p".
10142 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10143 -fno-diagnostics-show-line-numbers.
10144 * dwarf2out.c (gen_producer_string): Add
10145 OPT_fdiagnostics_show_line_numbers to the ignored options.
10146 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
10147 one setting" options.
10148 (append_compiler_options): Likewise to the dropped options.
10149 (append_diag_options): Likewise to the passed-on options.
10150 * opts.c (common_handle_option): Handle the new option.
10151 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
10152
10153 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
10154
10155 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
10156 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
10157 third argument of type "const signed char" to descriptions of
10158 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
10159 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
10160 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
10161 __builtin_bcdsub_ov functions.
10162
10163 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10164
10165 PR tree-optimization/86858
10166 * tree-vect-loop.c (vect_is_simple_reduction): Restore
10167 flow_bb_inside_loop_p calls.
10168
10169 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10170
10171 PR tree-optimization/86871
10172 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
10173 instead of gimple_assign_lhs.
10174
10175 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
10176
10177 PR target/86887
10178 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
10179 register constraint to operand 0.
10180 (add<mode>3_carryinC): Likewise.
10181 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
10182
10183 2018-08-09 Martin Liska <mliska@suse.cz>
10184
10185 PR c/86895
10186 * common.opt: Remove extra line.
10187
10188 2018-08-09 Martin Liska <mliska@suse.cz>
10189
10190 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
10191 at the end of a line, make first letter capital and end up
10192 a sentence with a dot.
10193 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
10194 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
10195 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
10196 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
10197 (PARAM_MAX_ISL_OPERATIONS): Likewise.
10198 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
10199 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
10200 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
10201 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
10202 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
10203 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
10204 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
10205 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
10206 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
10207 (PARAM_TREE_REASSOC_WIDTH): Likewise.
10208 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
10209 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
10210 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
10211
10212 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
10213
10214 PR target/84332
10215 * config/s390/s390.c (s390_option_override_internal): Reduce the
10216 stack-clash-protection-probe-interval param if it would be too big
10217 for z900.
10218
10219 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
10220
10221 PR target/46179
10222 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
10223 * config/m68k/m68k.c (handle_move_double): Don't call
10224 m68k_final_prescan_insn.
10225 (m68k_adjust_decorated_operand): Renamed from
10226 m68k_final_prescan_insn, remove first and third operand and
10227 simplify.
10228 (print_operand): Call it.
10229 (print_operand_address): Call it.
10230
10231 2018-08-08 Nathan Sidwell <nathan@acm.org>
10232
10233 * diagnostic.c (diagnostic_report_current_module): Use
10234 linemap_included_from & linemap_included_from_linemap.
10235
10236 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
10237
10238 * config/aarch64/aarch64-cores.def: Add phecda core.
10239 * config/aarch64/aarch64-tune.md: Regenerate.
10240 * doc/invoke.texi: Add phecda core.
10241
10242 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
10243
10244 PR target/85295
10245 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
10246 definitions.
10247 * config/s390/s390.md ("movti"): Add more alternatives for
10248 constant to GPR copies.
10249
10250 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
10251
10252 * config/s390/s390.c: Fix whitespace damage throughout the file.
10253 * config/s390/s390.h: Likewise.
10254 * config/s390/tpf.h: Likewise.
10255
10256 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
10257
10258 * config/s390/s390.c (s390_loadrelative_operand_p):
10259 Remove TARGET_CPU_ZARCH usages.
10260 (s390_rtx_costs): Likewise.
10261 (s390_legitimate_constant_p): Likewise.
10262 (s390_cannot_force_const_mem): Likewise.
10263 (legitimate_reload_constant_p): Likewise.
10264 (s390_preferred_reload_class): Likewise.
10265 (legitimize_pic_address): Likewise.
10266 (legitimize_tls_address): Likewise.
10267 (s390_split_branches): Removed.
10268 (s390_add_execute): Removed.
10269 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
10270 (s390_mainpool_start): Likewise.
10271 (s390_mainpool_finish): Likewise.
10272 (s390_mainpool_cancel): Removed.
10273 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
10274 (s390_chunkify_cancel): Likewise.
10275 (s390_return_addr_rtx): Likewise.
10276 (s390_register_info): Remove split_branches_pending_p uages.
10277 (s390_optimize_register_info): Likewise.
10278 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
10279 split_branches_pending_p usages.
10280 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
10281 (s390_load_got): Likewise.
10282 (s390_expand_split_stack_prologue): Likewise.
10283 (output_asm_nops): Likewise.
10284 (s390_function_profiler): Likewise.
10285 (s390_emit_call): Likewise.
10286 (s390_conditional_register_usage): Likewise.
10287 (s390_optimize_prologue): Likewise.
10288 (s390_reorg): Remove TARGET_CPU_ZARCH and
10289 split_branches_pending_p usages.
10290 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
10291 usages.
10292 (s390_output_indirect_thunk_function): Likewise.
10293 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
10294 (TARGET_CPU_ZARCH_P): Removed.
10295 (struct machine_function): Remove split_branches_pending_p.
10296 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
10297
10298 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
10299
10300 * common/config/s390/s390-common.c (processor_flags_table):
10301 Remove flags.
10302 * config.gcc: Remove with_arch/with_tune support.
10303 * config/s390/2064.md: Remove cpu attribute comparisons.
10304 * config/s390/driver-native.c (s390_host_detect_local_cpu):
10305 Remove MTN.
10306 * config/s390/linux.h (ASM_SPEC):
10307 Remove -march support.
10308 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
10309 Use a table to get an arch level.
10310 * config/s390/s390-opts.h (enum processor_type):
10311 Remove enum values.
10312 * config/s390/s390.c
10313 (processor_table): Remove entries, add arch_level values.
10314 (s390_issue_rate): Remove cases.
10315 (s390_option_override): Adjust
10316 s390_option_override_internal() call.
10317 (s390_option_override_internal): Remove deprecation warning.
10318 (s390_valid_target_attribute_tree): Adjust
10319 s390_option_override_internal() call.
10320 * config/s390/s390.h (struct s390_processor):
10321 Share with s390-c.c, add arch_level field.
10322 * config/s390/s390.md:
10323 Remove occurrences in cpu attribute.
10324 * config/s390/s390.opt: Remove -march/-mtune support.
10325 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
10326 * doc/invoke.texi: Remove deprecation warning.
10327
10328 2018-08-08 Luis Machado <luis.machado@linaro.org>
10329
10330 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
10331 global.
10332 (qdf24xx_tunings): Set vector cost structure to
10333 qdf24xx_vector_cost.
10334
10335 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
10336 <register_sextend>: Set to 3.
10337
10338 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
10339
10340 PR target/86838
10341 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
10342 * config/aarch64/aarch64-simd.md
10343 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
10344 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
10345 (aarch64_frecpx<mode>): ...this new pattern.
10346 * config/aarch64/aarch64-simd-builtins.def: Remove comment
10347 about aarch64_frecp<FRECP:frecp_suffix><mode>.
10348
10349 2018-08-07 Martin Liska <mliska@suse.cz>
10350
10351 PR middle-end/83023
10352 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
10353 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
10354 * predict.def (PRED_MALLOC_NONNULL): New predictor.
10355 * doc/extend.texi: Document that malloc attribute adds
10356 hit to compiler.
10357
10358 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
10359
10360 PR target/86785
10361 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10362 Define to speculation_safe_value_not_needed.
10363
10364 2018-08-06 Jeff Law <law@redhat.com>
10365
10366 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
10367 the vr_values instance to cprop_into_stmt.
10368 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
10369 (cprop_operand): Also query EVRP to determine if OP is a constant.
10370
10371 2018-08-06 Nathan Sidwell <nathan@acm.org>
10372
10373 * diagnostic.c (diagnostic_report_current_module): Reroll
10374 included-at loop. Translate text.
10375
10376 2018-08-06 David Malcolm <dmalcolm@redhat.com>
10377
10378 * function-tests.c (selftest::test_expansion_to_rtl): Call
10379 free_after_compilation.
10380
10381 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10382
10383 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
10384
10385 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
10386
10387 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
10388 loops with memory block operations from getting unrolled.
10389
10390 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
10391
10392 PR target/86807
10393 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10394 Define to speculation_safe_value_not_needed.
10395
10396 2018-08-06 Jeff Law <law@redhat.com>
10397
10398 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
10399 assert.
10400
10401 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10402
10403 PR target/86662
10404 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
10405 with all enabled __intN types.
10406
10407 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
10408
10409 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10410
10411 * alias.c (record_set): Check for clobber high.
10412 * cfgexpand.c (expand_gimple_stmt): Likewise.
10413 * combine-stack-adj.c (single_set_for_csa): Likewise.
10414 * combine.c (find_single_use_1): Likewise.
10415 (set_nonzero_bits_and_sign_copies): Likewise.
10416 (get_combine_src_dest): Likewise.
10417 (is_parallel_of_n_reg_sets): Likewise.
10418 (try_combine): Likewise.
10419 (record_dead_and_set_regs_1): Likewise.
10420 (reg_dead_at_p_1): Likewise.
10421 (reg_dead_at_p): Likewise.
10422 * dce.c (deletable_insn_p): Likewise.
10423 (mark_nonreg_stores_1): Likewise.
10424 (mark_nonreg_stores_2): Likewise.
10425 * df-scan.c (df_find_hard_reg_defs): Likewise.
10426 (df_uses_record): Likewise.
10427 (df_get_call_refs): Likewise.
10428 * dwarf2out.c (mem_loc_descriptor): Likewise.
10429 * haifa-sched.c (haifa_classify_rtx): Likewise.
10430 * ira-build.c (create_insn_allocnos): Likewise.
10431 * ira-costs.c (scan_one_insn): Likewise.
10432 * ira.c (equiv_init_movable_p): Likewise.
10433 (rtx_moveable_p): Likewise.
10434 (interesting_dest_for_shprep): Likewise.
10435 * jump.c (mark_jump_label_1): Likewise.
10436 * postreload-gcse.c (record_opr_changes): Likewise.
10437 * postreload.c (reload_cse_simplify): Likewise.
10438 (struct reg_use): Add source expr.
10439 (reload_combine): Check for clobber high.
10440 (reload_combine_note_use): Likewise.
10441 (reload_cse_move2add): Likewise.
10442 (move2add_note_store): Likewise.
10443 * print-rtl.c (print_pattern): Likewise.
10444 * recog.c (decode_asm_operands): Likewise.
10445 (store_data_bypass_p): Likewise.
10446 (if_test_bypass_p): Likewise.
10447 * regcprop.c (kill_clobbered_value): Likewise.
10448 (kill_set_value): Likewise.
10449 * reginfo.c (reg_scan_mark_refs): Likewise.
10450 * reload1.c (maybe_fix_stack_asms): Likewise.
10451 (eliminate_regs_1): Likewise.
10452 (elimination_effects): Likewise.
10453 (mark_not_eliminable): Likewise.
10454 (scan_paradoxical_subregs): Likewise.
10455 (forget_old_reloads_1): Likewise.
10456 * reorg.c (find_end_label): Likewise.
10457 (try_merge_delay_insns): Likewise.
10458 (redundant_insn): Likewise.
10459 (own_thread_p): Likewise.
10460 (fill_simple_delay_slots): Likewise.
10461 (fill_slots_from_thread): Likewise.
10462 (dbr_schedule): Likewise.
10463 * resource.c (update_live_status): Likewise.
10464 (mark_referenced_resources): Likewise.
10465 (mark_set_resources): Likewise.
10466 * rtl.c (copy_rtx): Likewise.
10467 * rtlanal.c (reg_referenced_p): Likewise.
10468 (single_set_2): Likewise.
10469 (noop_move_p): Likewise.
10470 (note_stores): Likewise.
10471 * sched-deps.c (sched_analyze_reg): Likewise.
10472 (sched_analyze_insn): Likewise.
10473
10474 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10475
10476 * cse.c (invalidate_reg): New function extracted from...
10477 (invalidate): ...here.
10478 (canonicalize_insn): Check for clobber high.
10479 (invalidate_from_clobbers): invalidate clobber highs.
10480 (invalidate_from_sets_and_clobbers): Likewise.
10481 (count_reg_usage): Check for clobber high.
10482 (insn_live_p): Likewise.
10483 * cselib.c (cselib_expand_value_rtx_1):Likewise.
10484 (cselib_invalidate_regno): Check for clobber in setter.
10485 (cselib_invalidate_rtx): Pass through setter.
10486 (cselib_invalidate_rtx_note_stores):
10487 (cselib_process_insn): Check for clobber high.
10488 * cselib.h (cselib_invalidate_rtx): Add operand.
10489
10490 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10491
10492 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
10493 (mark_not_eliminable): Likewise.
10494 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
10495 * lra-lives.c (process_bb_lives): Check for clobber high.
10496 * lra.c (new_insn_reg): Remember clobber highs.
10497 (collect_non_operand_hard_regs): Check for clobber high.
10498 (lra_set_insn_recog_data): Likewise.
10499 (add_regs_to_insn_regno_info): Likewise.
10500 (lra_update_insn_regno_info): Likewise.
10501
10502 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10503
10504 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
10505 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
10506
10507 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10508
10509 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
10510 (copy_insn_1): Likewise.
10511 (gen_hard_reg_clobber_high): New gen function.
10512 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
10513 * genemit.c (gen_exp): Likewise.
10514 (gen_emit_seq): Pass through info.
10515 (gen_insn): Check for CLOBBER_HIGH.
10516 (gen_expand): Pass through info.
10517 (gen_split): Likewise.
10518 (output_add_clobbers): Likewise.
10519 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
10520 (remove_clobbers): Likewise.
10521 * rtl.h (gen_hard_reg_clobber_high): New declaration.
10522
10523 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10524
10525 * doc/rtl.texi (clobber_high): Add.
10526 (parallel): Add in clobber high
10527 * rtl.c (rtl_check_failed_code3): Add function.
10528 * rtl.def (CLOBBER_HIGH): Add expression.
10529 * rtl.h (RTL_CHECKC3): Add macro.
10530 (rtl_check_failed_code3): Add declaration.
10531 (XC3EXP): Add macro.
10532
10533 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
10534
10535 PR target/86386
10536 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
10537 cfun->machine->max_used_stack_alignment if needed.
10538
10539 2018-08-04 Martin Sebor <msebor@redhat.com>
10540
10541 PR tree-optimization/86571
10542 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
10543 NaN output to 4.
10544
10545 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
10546
10547 PR target/86799
10548 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10549 Define.
10550
10551 2018-08-03 Jeff Law <law@redhat.com>
10552
10553 PR target/86795
10554 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10555 Define to speculation_safe_value_not_needed.
10556
10557 2018-08-03 David Malcolm <dmalcolm@redhat.com>
10558
10559 * doc/gcov.texi (-x): Remove duplicate "to".
10560 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
10561 (-Wif-not-aligned): Remove duplicate "is".
10562 (-flto): Remove duplicate "the".
10563 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
10564 duplicate "v5.00.b".
10565 (MSP430 Options): Remove duplicate "and" from the description
10566 of "-mgprel-sec=regexp".
10567 (x86 Options): Remove duplicate copies of "vmldLog102" and
10568 vmlsLog104 from description of "-mveclibabi=type".
10569
10570 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
10571
10572 * internal-fn.h (first_commutative_argument): Declare.
10573 * internal-fn.c (first_commutative_argument): New function.
10574 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
10575 restrictions for pattern statements. Use first_commutative_argument
10576 to look for commutative operands in calls to internal functions.
10577
10578 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
10579
10580 * Makefile.in (wide-int-range.o): New.
10581 * tree-vrp.c: Move all the wide_int_* functions to...
10582 * wide-int-range.cc: ...here.
10583 * tree-vrp.h: Move all the wide_int_* prototypes to...
10584 * wide-int-range.h: ...here.
10585
10586 2018-08-03 Tom de Vries <tdevries@suse.de>
10587
10588 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
10589 UI_NONE.
10590 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
10591 * except.c (output_function_exception_table): Do early exit if
10592 targetm_common.except_unwind_info (&global_options) == UI_NONE.
10593
10594 2018-08-03 Martin Liska <mliska@suse.cz>
10595
10596 * predict.c (dump_prediction): Change to 2 digits
10597 in fraction part.
10598
10599 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
10600
10601 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
10602 neon_dup_q to...
10603 (falkor_am_1_gtov_gtov): ... a new insn reservation.
10604
10605 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
10606
10607 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
10608 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
10609 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
10610 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
10611 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
10612
10613 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10614
10615 * diagnostic-show-locus.c (diagnostic_show_locus): Use
10616 pp_take_prefix when saving the existing prefix.
10617 * diagnostic.c (diagnostic_append_note): Likewise.
10618 * langhooks.c (lhd_print_error_function): Likewise.
10619 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
10620 param's type. Free the existing prefix.
10621 (pp_take_prefix): New function.
10622 (pretty_printer::pretty_printer): Drop the prefix parameter.
10623 Rename the length parameter to match the comment.
10624 (pretty_printer::~pretty_printer): Free the prefix.
10625 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
10626 parameter.
10627 (struct pretty_printer): Drop the "const" from "prefix" field's
10628 type and clarify memory management.
10629 (pp_set_prefix): Drop the "const" from the 2nd param.
10630 (pp_take_prefix): New decl.
10631
10632 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
10633
10634 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
10635 for word_mode_ok here instead of passing as argument.
10636 (expand_block_compare): Change select_block_compare_mode() call.
10637 (expand_strncmp_gpr_sequence): New function.
10638 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
10639
10640 2018-08-02 Jeff Law <law@redhat.com>
10641
10642 PR target/86790
10643 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10644 Define to speculation_safe_value_not_needed.
10645
10646 PR target/86784
10647 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10648 Define to speculation_safe_value_not_needed.
10649
10650 2018-08-02 Tom de Vries <tdevries@suse.de>
10651
10652 PR target/86660
10653 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
10654 function. Return UI_TARGET unconditionally.
10655 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
10656 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
10657
10658 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10659
10660 * genemit.c (print_overload_test): Fix typo.
10661
10662 2018-08-02 Richard Biener <rguenther@suse.de>
10663
10664 PR tree-optimization/86816
10665 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
10666 which checks for value availability before querying it.
10667 (gvn_uses_equal): Use it.
10668 (same_succ_hash): Likewise.
10669 (gimple_equal_p): Likewise.
10670
10671 2018-08-02 Nick Clifton <nickc@redhat.com>
10672
10673 PR target/86813
10674 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10675 Define to speculation_safe_value_not_needed.
10676
10677 PR target/86810
10678 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10679 Define to speculation_safe_value_not_needed.
10680
10681 PR target/86810
10682 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10683 Define to speculation_safe_value_not_needed.
10684
10685 PR target/86803
10686 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10687 Define to speculation_safe_value_not_needed.
10688
10689 PR target/86797
10690 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10691 Define to speculation_safe_value_not_needed.
10692
10693 PR target/86791
10694 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10695 Define to speculation_safe_value_not_needed.
10696
10697 PR target/86789
10698 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10699 Define to speculation_safe_value_not_needed.
10700
10701 PR target/86787
10702 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10703 Define to speculation_safe_value_not_needed.
10704
10705 PR target/86782
10706 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10707 speculation_safe_value_not_needed.
10708
10709 PR target/86781
10710 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10711 to speculation_safe_value_not_needed.
10712
10713 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10714
10715 * doc/md.texi: Expand the documentation of instruction names
10716 to mention port-local uses. Document '@' in pattern names.
10717 * read-md.h (overloaded_instance, overloaded_name): New structs.
10718 (mapping): Declare.
10719 (md_reader::handle_overloaded_name): New member function.
10720 (md_reader::get_overloads): Likewise.
10721 (md_reader::m_first_overload): New member variable.
10722 (md_reader::m_next_overload_ptr): Likewise.
10723 (md_reader::m_overloads_htab): Likewise.
10724 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10725 m_next_overload_ptr and m_overloads_htab.
10726 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10727 (get_mode_token, get_code_token, get_int_token): New functions.
10728 (map_attr_string): Add an optional argument that passes back
10729 the associated iterator.
10730 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10731 (md_reader::handle_overloaded_name, add_overload_instance): New
10732 functions.
10733 (apply_iterators): Handle '@' names. Report an error if '@'
10734 is used without iterators.
10735 (initialize_iterators): Initialize the new iterator_group fields.
10736 * genopinit.c (handle_overloaded_code_for)
10737 (handle_overloaded_gen): New functions.
10738 (main): Use them to print declarations of maybe_code_for_* and
10739 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10740 * genemit.c (print_overload_arguments, print_overload_test)
10741 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10742 (main): Use it to print definitions of maybe_code_for_* and
10743 maybe_gen_* functions.
10744 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10745 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10746 instead of explicit mode checks.
10747 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10748 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10749 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10750 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10751 (aarch64_expand_compare_and_swap): Likewise
10752 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10753 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10754 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10755 (aarch64_constant_pool_reload_icode): Delete.
10756 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10757 instead of aarch64_constant_pool_reload_icode. Use
10758 code_for_aarch64_reload_mov instead of explicit mode checks.
10759 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10760 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10761 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10762 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
10763 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
10764 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
10765 (aarch64_atomic_load_op_code): Delete.
10766 (aarch64_emit_atomic_load_op): Likewise.
10767 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
10768 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
10769 instead of aarch64_emit_atomic_load_op.
10770 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
10771 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
10772 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
10773 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
10774 character before the pattern name.
10775 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
10776 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
10777 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
10778 (aarch64_frecps<mode>): Likewise.
10779 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
10780 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
10781 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
10782 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
10783 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
10784
10785 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10786
10787 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
10788 Allow HFmode constants if TARGET_FP_F16INST.
10789
10790 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
10791
10792 PR target/86014
10793 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10794 No longer check last store for clobber of address register.
10795
10796 2018-08-02 Martin Liska <mliska@suse.cz>
10797
10798 PR gcov-profile/86817
10799 * gcov.c (process_all_functions): New function.
10800 (main): Call it.
10801 (process_file): Move functions processing to
10802 process_all_functions.
10803
10804 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10805
10806 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
10807 "const" to the "gimple *" and "rtx_insn *" parameters.
10808 * dumpfile.h (dump_user_location_t::dump_user_location_t):
10809 Likewise.
10810 (dump_location_t::dump_location_t): Likewise.
10811
10812 2018-08-01 Martin Sebor <msebor@redhat.com>
10813
10814 PR tree-optimization/86650
10815 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
10816 rather than a "gcall *". Directly pass the data of interest
10817 to percent_K_format, rather than building a temporary CALL_EXPR
10818 to hold it.
10819 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
10820 (gimple_fold_builtin_strncat): Adjust.
10821 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
10822 gcall* argument with gimple*.
10823 * gimple-ssa-warn-restrict.c (check_call): Same.
10824 (wrestrict_dom_walker::before_dom_children): Same.
10825 (builtin_access::builtin_access): Same.
10826 (check_bounds_or_overlap): Same
10827 (maybe_diag_overlap): Same.
10828 (maybe_diag_offset_bounds): Same.
10829 * tree-diagnostic.c (default_tree_printer): Move usage of
10830 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10831 to this callsite.
10832 * tree-pretty-print.c (percent_K_format): Add argument.
10833 * tree-pretty-print.h: Add argument.
10834 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10835 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10836 (maybe_diag_stxncpy_trunc): Same.
10837 (handle_builtin_stxncpy): Same.
10838 (handle_builtin_strcat): Same.
10839
10840 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10841
10842 * match.pd: Optimise pointer range checks.
10843
10844 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10845
10846 PR tree-optimization/86758
10847 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10848 to remove pattern statements.
10849
10850 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10851
10852 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10853 result of dfs_enumerate_from when constructing stmt_vec_infos,
10854 instead of additionally calling get_loop_body.
10855
10856 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10857
10858 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10859 parameter.
10860 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10861 When creating an iv, assert that the step is not known to be zero.
10862 (vect_setup_realignment): Update call accordingly.
10863 * tree-vect-stmts.c (vectorizable_store): Likewise.
10864 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
10865
10866 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10867
10868 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10869 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10870 (vectorizable_reduction): Likewise.
10871 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10872 (vect_detect_hybrid_slp_stmts): Likewise.
10873 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10874
10875 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
10876
10877 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10878 (wide_int_set_zero_nonzero_bits): ...this.
10879 (zero_nonzero_bits_from_vr): Rename to...
10880 (vrp_set_zero_nonzero_bits): ...this.
10881 (extract_range_from_multiplicative_op_1): Abstract wide int
10882 code...
10883 (wide_int_range_multiplicative_op): ...here.
10884 (extract_range_from_binary_expr_1): Extract wide int binary
10885 operations into their own functions.
10886 (wide_int_range_lshift): New.
10887 (wide_int_range_can_optimize_bit_op): New.
10888 (wide_int_range_shift_undefined_p): New.
10889 (wide_int_range_bit_xor): New.
10890 (wide_int_range_bit_ior): New.
10891 (wide_int_range_bit_and): New.
10892 (wide_int_range_trunc_mod): New.
10893 (extract_range_into_wide_ints): New.
10894 (vrp_shift_undefined_p): New.
10895 (extract_range_from_multiplicative_op): New.
10896 (vrp_can_optimize_bit_op): New.
10897 * tree-vrp.h (value_range::dump): New.
10898 (wide_int_range_multiplicative_op): New.
10899 (wide_int_range_lshift):New.
10900 (wide_int_range_shift_undefined_p): New.
10901 (wide_int_range_bit_xor): New.
10902 (wide_int_range_bit_ior): New.
10903 (wide_int_range_bit_and): New.
10904 (wide_int_range_trunc_mod): New.
10905 (zero_nonzero_bits_from_bounds): Rename to...
10906 (wide_int_set_zero_nonzero_bits): ...this.
10907 (zero_nonzero_bits_from_vr): Rename to...
10908 (vrp_set_zero_nonzero_bits): ...this.
10909 (range_easy_mask_min_max): Rename to...
10910 (wide_int_range_can_optimize_bit_op): this.
10911 * vr-values.c (simplify_bit_ops_using_ranges): Rename
10912 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10913
10914 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10915
10916 * tree-vectorizer.h (vect_orig_stmt): New function.
10917 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10918 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10919 (vect_create_epilog_for_reduction): Likewise.
10920 (vectorizable_live_operation): Likewise.
10921 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10922 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10923 * tree-vect-stmts.c (vectorizable_call): Likewise.
10924 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10925
10926 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10927
10928 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10929 argument.
10930 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10931 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10932 (vect_transform_loop): Likewise.
10933 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10934
10935 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10936
10937 * tree-vectorizer.h (vect_schedule_slp): Return void.
10938 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10939 (vect_schedule_slp): Likewise.
10940
10941 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10942
10943 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10944 argument.
10945 (vect_transform_loop): Update calls accordingly. Schedule SLP
10946 instances before the main loop, if any exist.
10947
10948 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10949
10950 PR tree-optimization/86749
10951 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10952 If the lhs is used in a COND_EXPR, check that it is being used
10953 as the "then" or "else" value.
10954
10955 2018-08-01 Tom de Vries <tdevries@suse.de>
10956
10957 PR target/86800
10958 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10959 speculation_safe_value_not_needed.
10960
10961 2018-08-01 Richard Biener <rguenther@suse.de>
10962
10963 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10964 as base and offset.
10965
10966 2018-08-01 Martin Liska <mliska@suse.cz>
10967
10968 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10969 format how successful transformation is dumped.
10970 (gimple_mod_pow2_value_transform): Likewise.
10971 (gimple_mod_subtract_transform): Likewise.
10972 (gimple_stringops_transform): Likewise.
10973
10974 2018-08-01 Martin Liska <mliska@suse.cz>
10975
10976 PR value-prof/35543
10977 * value-prof.c (interesting_stringop_to_profile_p):
10978 Simplify the code and add BUILT_IN_MEMMOVE.
10979 (gimple_stringops_transform): Likewise.
10980
10981 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10982
10983 * config/aarch64/aarch64-simd.md
10984 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10985 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10986 use GPI iterator instead of SI mode.
10987
10988 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10989
10990 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10991 rs6000_speculation_barrier.
10992 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10993 new barrier pattern name.
10994
10995 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10996
10997 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10998 (speculation_barrier): New insn.
10999
11000 2018-08-01 Richard Biener <rguenther@suse.de>
11001
11002 PR bootstrap/86724
11003 * graphite.h: Include isl/id.h and isl/space.h to allow build
11004 with ISL 0.20.
11005
11006 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
11007
11008 PR target/86651
11009 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11010 mode for COFF targets.
11011 * defaults.h (TARGET_COFF): Define.
11012 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
11013 TARGET_COFF): Define.
11014 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
11015 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
11016 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
11017
11018 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11019
11020 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
11021 * gimple-streamer-out.c (output_bb): Save it.
11022 * lto-streamer-in.c (input_struct_function_base): Restore
11023 instance discriminator if available. Create map on demand.
11024 * lto-streamer-out.c (output_struct_function_base): Save it if
11025 available.
11026 * final.c (decl_to_instance_map): Document LTO strategy.
11027
11028 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11029 Olivier Hainque <hainque@adacore.com>
11030
11031 * debug.h (decl_to_instance_map_t): New type.
11032 (decl_to_instance_map): Declare.
11033 (maybe_create_decl_to_instance_map): New inline function.
11034 * final.c (bb_discriminator, last_bb_discriminator): New statics,
11035 to track basic block discriminators.
11036 (final_start_function_1): Initialize them.
11037 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
11038 bb_discriminator.
11039 (decl_to_instance_map): New variable.
11040 (map_decl_to_instance, maybe_set_discriminator): New functions.
11041 (notice_source_line): Set discriminator.
11042
11043 2018-07-31 Ian Lance Taylor <iant@golang.org>
11044
11045 * targhooks.c (default_have_speculation_safe_value): Add
11046 ATTRIBUTE_UNUSED.
11047
11048 2018-07-31 David Malcolm <dmalcolm@redhat.com>
11049
11050 * dump-context.h: Include "pretty-print.h".
11051 (dump_context::refresh_dumps_are_enabled): New decl.
11052 (dump_context::emit_item): New decl.
11053 (class dump_context): Add fields "m_test_pp" and
11054 "m_test_pp_flags".
11055 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11056 (temp_dump_context::get_dumped_text): New decl.
11057 (class temp_dump_context): Add field "m_pp".
11058 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
11059 (dump_context::refresh_dumps_are_enabled): ...and add a test for
11060 m_test_pp.
11061 (set_dump_file): Update for above change.
11062 (set_alt_dump_file): Likewise.
11063 (dump_loc): New overload, taking a pretty_printer *.
11064 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
11065 to any test pretty-printer.
11066 (make_item_for_dump_gimple_stmt): New function, adapted from
11067 optinfo::add_gimple_stmt.
11068 (dump_context::dump_gimple_stmt): Call it, and use the result,
11069 eliminating the direct usage of dump_file and alt_dump_file in
11070 favor of indirectly using them via emit_item.
11071 (make_item_for_dump_gimple_expr): New function, adapted from
11072 optinfo::add_gimple_expr.
11073 (dump_context::dump_gimple_expr): Call it, and use the result,
11074 eliminating the direct usage of dump_file and alt_dump_file in
11075 favor of indirectly using them via emit_item.
11076 (make_item_for_dump_generic_expr): New function, adapted from
11077 optinfo::add_tree.
11078 (dump_context::dump_generic_expr): Call it, and use the result,
11079 eliminating the direct usage of dump_file and alt_dump_file in
11080 favor of indirectly using them via emit_item.
11081 (make_item_for_dump_printf_va): New function, adapted from
11082 optinfo::add_printf_va.
11083 (make_item_for_dump_printf): New function.
11084 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
11085 and use the result, eliminating the direct usage of dump_file and
11086 alt_dump_file in favor of indirectly using them via emit_item.
11087 (make_item_for_dump_dec): New function.
11088 (dump_context::dump_dec): Call it, and use the result,
11089 eliminating the direct usage of dump_file and alt_dump_file in
11090 favor of indirectly using them via emit_item.
11091 (make_item_for_dump_symtab_node): New function, adapted from
11092 optinfo::add_symtab_node.
11093 (dump_context::dump_symtab_node): Call it, and use the result,
11094 eliminating the direct usage of dump_file and alt_dump_file in
11095 favor of indirectly using them via emit_item.
11096 (dump_context::begin_scope): Reimplement, avoiding direct usage
11097 of dump_file and alt_dump_file in favor of indirectly using them
11098 via emit_item.
11099 (dump_context::emit_item): New member function.
11100 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11101 Set up test pretty-printer on the underlying context. Call
11102 refresh_dumps_are_enabled.
11103 (temp_dump_context::~temp_dump_context): Call
11104 refresh_dumps_are_enabled.
11105 (temp_dump_context::get_dumped_text): New member function.
11106 (selftest::verify_dumped_text): New function.
11107 (ASSERT_DUMPED_TEXT_EQ): New macro.
11108 (selftest::test_capture_of_dump_calls): Run all tests twice, with
11109 and then without optinfo enabled. Add uses of
11110 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
11111 * dumpfile.h: Update comment for the dump_* API.
11112 * optinfo-emit-json.cc
11113 (selftest::test_building_json_from_dump_calls): Update for new
11114 param for temp_dump_context ctor.
11115 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
11116 and "m_owned" field.
11117 (optinfo_item::~optinfo_item): Likewise.
11118 (optinfo::add_item): New member function.
11119 (optinfo::emit): Update comment.
11120 (optinfo::add_string): Delete.
11121 (optinfo::add_printf): Delete.
11122 (optinfo::add_printf_va): Delete.
11123 (optinfo::add_gimple_stmt): Delete.
11124 (optinfo::add_gimple_expr): Delete.
11125 (optinfo::add_tree): Delete.
11126 (optinfo::add_symtab_node): Delete.
11127 (optinfo::add_dec): Delete.
11128 * optinfo.h (class dump_context): New forward decl.
11129 (optinfo::add_item): New decl.
11130 (optinfo::add_string): Delete.
11131 (optinfo::add_printf): Delete.
11132 (optinfo::add_printf_va): Delete.
11133 (optinfo::add_gimple_stmt): Delete.
11134 (optinfo::add_gimple_expr): Delete.
11135 (optinfo::add_tree): Delete.
11136 (optinfo::add_symtab_node): Delete.
11137 (optinfo::add_dec): Delete.
11138 (optinfo::add_poly_int): Delete.
11139 (optinfo_item::optinfo_item): Remove "owned" param.
11140 (class optinfo_item): Remove field "m_owned".
11141
11142 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11143
11144 PR middle-end/86705
11145 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
11146 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
11147 requested variable alignment.
11148 (expand_one_ssa_partition): Likewise.
11149 (expand_one_var): Likewise.
11150
11151 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11152
11153 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11154 to speculation_safe_value_not_needed.
11155
11156 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11157
11158 * targhooks.h (speculation_safe_value_not_needed): New prototype.
11159 * targhooks.c (speculation_safe_value_not_needed): New function.
11160 * target.def (have_speculation_safe_value): Update documentation.
11161 * doc/tm.texi: Regenerated.
11162
11163 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11164
11165 * config/aarch64/iterators.md (ALLI_TI): New iterator.
11166 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
11167 expand.
11168 (despeculate_copy<ALLI:mode>_insn): New insn.
11169 (despeculate_copyti_insn): New insn.
11170 (despeculate_simple<ALLI:mode>): New insn
11171 (despeculate_simpleti): New insn.
11172 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
11173 function.
11174 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
11175 aarch64_speculation_safe_value.
11176 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
11177
11178 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11179
11180 * config/aarch64/aarch64-speculation.cc: New file.
11181 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
11182 before pass_reorder_blocks.
11183 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
11184 prototype.
11185 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
11186 X14 and X15 when tracking speculation.
11187 * config/aarch64/aarch64.md (register name constants): Add
11188 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
11189 (unspec): Add UNSPEC_SPECULATION_TRACKER.
11190 (speculation_barrier): New insn attribute.
11191 (cmp<mode>): Allow SP in comparisons.
11192 (speculation_tracker): New insn.
11193 (speculation_barrier): Add speculation_barrier attribute.
11194 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
11195 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
11196 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
11197
11198 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11199
11200 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
11201 aarch64_track_speculation is true.
11202 (tb<optab><mode>1): Likewise.
11203 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
11204 generate CB[N]Z when tracking speculation.
11205 (aarch64_split_compare_and_swap): Likewise.
11206 (aarch64_split_atomic_op): Likewise.
11207
11208 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11209
11210 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
11211
11212 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11213
11214 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
11215 (speculation_barrier): New insn.
11216
11217 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11218
11219 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
11220 * config/arm/arm.md (speculation_barrier): New expand.
11221 (speculation_barrier_insn): New pattern.
11222
11223 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11224
11225 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
11226 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
11227 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
11228 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
11229 list.
11230 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
11231 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
11232 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
11233 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
11234 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
11235 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
11236 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
11237 * builtins.c (expand_speculation_safe_value): New function.
11238 (expand_builtin): Call it.
11239 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
11240 * doc/extend.texi: Document __builtin_speculation_safe_value.
11241 * doc/md.texi: Document "speculation_barrier" pattern.
11242 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
11243 TARGET_HAVE_SPECULATION_SAFE_VALUE.
11244 * doc/tm.texi: Regenerated.
11245 * target.def (have_speculation_safe_value, speculation_safe_value): New
11246 hooks.
11247 * targhooks.c (default_have_speculation_safe_value): New function.
11248 (default_speculation_safe_value): New function.
11249 * targhooks.h (default_have_speculation_safe_value): Add prototype.
11250 (default_speculation_safe_value): Add prototype.
11251
11252 2018-07-31 David Malcolm <dmalcolm@redhat.com>
11253
11254 * dump-context.h (dump_context::dump_loc): New decl.
11255 * dumpfile.c (dump_context::dump_loc): New member function.
11256 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
11257 and dump_gimple_stmt.
11258 (dump_context::dump_gimple_expr_loc): Likewise, using
11259 dump_gimple_expr.
11260 (dump_context::dump_generic_expr_loc): Likewise, using
11261 dump_generic_expr.
11262 (dump_context::dump_printf_loc_va): Likewise, using
11263 dump_printf_va.
11264 (dump_context::begin_scope): Explicitly using the global function
11265 "dump_loc", rather than the member function.
11266
11267 2018-07-31 Martin Sebor <msebor@redhat.com>
11268
11269 PR tree-optimization/86741
11270 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
11271
11272 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
11273
11274 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
11275 depend on whether prefetch instructions will be emitted or not.
11276 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
11277 will be emitted or not.
11278 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
11279 (TARGET_SETMEM_PFD): New macros.
11280
11281 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11282
11283 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
11284 (NULL_STMT_VEC_INFO): Delete.
11285 (stmt_vec_info::operator*): Likewise.
11286 (stmt_vec_info::operator gimple *): Likewise.
11287 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
11288 of NULL_STMT_VEC_INFO.
11289 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11290 (vect_reassociating_reduction_p): Likewise.
11291 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11292 (vectorizable_store): Likewise.
11293 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
11294 (vec_info::free_stmt_vec_infos): Likewise.
11295
11296 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11297
11298 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
11299 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
11300
11301 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11302
11303 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
11304 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
11305 (vec_info::free_stmt_vec_info): New private member functions.
11306 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
11307 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
11308 * tree-parloops.c (gather_scalar_reductions): Remove calls to
11309 set_stmt_vec_info_vec and free_stmt_vec_infos.
11310 * tree-vect-loop.c (_loop_vec_info): Remove call to
11311 set_stmt_vec_info_vec.
11312 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
11313 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
11314 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
11315 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
11316 (vec_info::free_stmt_vec_info): ...these new functions. Remove
11317 assignments in {vec_info::,}new_stmt_vec_info that are redundant
11318 with the clearing in the xcalloc.
11319 (stmt_vec_info_vec): Delete.
11320 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
11321 (vectorize_loops): Likewise.
11322 (vec_info::~vec_info): Remove argument from call to
11323 free_stmt_vec_infos.
11324 (vec_info::add_stmt): Remove vinfo argument from call to
11325 new_stmt_vec_info.
11326
11327 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11328
11329 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
11330 rather than a gimple stmt.
11331 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
11332 information for pattern statements when passed the original
11333 statement; instead wait to be passed the pattern statement itself.
11334 Don't call set_vinfo_for_stmt here.
11335 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
11336 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
11337 stmt_vec_infos here.
11338 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
11339 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
11340 stmt_vec_infos entry.
11341
11342 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11343
11344 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
11345 * tree-vectorizer.c (vec_info::replace_stmt): New function.
11346 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
11347 * tree-vect-stmts.c (vectorizable_call): Likewise.
11348 (vectorizable_simd_clone_call): Likewise.
11349
11350 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11351
11352 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
11353 * tree-vectorizer.c (vec_info::remove_stmt): New function.
11354 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
11355 * tree-vect-loop.c (vect_transform_loop): Likewise.
11356 * tree-vect-slp.c (vect_schedule_slp): Likewise.
11357 * tree-vect-stmts.c (vect_remove_stores): Likewise.
11358
11359 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11360
11361 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
11362 (vect_dr_stmt): Delete.
11363 * tree-vectorizer.c (vec_info::lookup_dr): New function.
11364 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
11365 of DR_VECT_AUX.
11366 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
11367 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
11368 (vect_verify_datarefs_alignment, vect_peeling_supportable)
11369 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11370 (vect_analyze_data_refs): Likewise.
11371 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
11372 argument.
11373 (vect_find_same_alignment_drs): Likewise.
11374 (vect_slp_analyze_node_dependences): Update calls accordingly.
11375 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
11376 instead of DR_VECT_AUX.
11377 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
11378 of a vector data references. Use vec_info::lookup_dr instead of
11379 DR_VECT_AUX.
11380 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
11381 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
11382 instead of DR_VECT_AUX.
11383
11384 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11385
11386 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
11387 dr_vec_info.
11388 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11389 accordingly.
11390 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11391 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11392 (vect_gen_prolog_loop_niters): Likewise.
11393
11394 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11395
11396 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
11397 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
11398 (vect_known_alignment_in_bytes, vect_dr_behavior)
11399 (vect_get_scalar_dr_size): Take references as dr_vec_infos
11400 instead of data_references. Update calls to other routines for
11401 which the same change has been made.
11402 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
11403 dr_vec_infos instead of stmt_vec_infos.
11404 (vect_analyze_data_ref_dependence): Update call accordingly.
11405 (vect_slp_analyze_data_ref_dependence)
11406 (vect_record_base_alignments): Use DR_VECT_AUX.
11407 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
11408 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
11409 (vector_alignment_reachable_p, vect_get_data_access_cost)
11410 (vect_peeling_supportable, vect_analyze_group_access_1)
11411 (vect_analyze_group_access, vect_analyze_data_ref_access)
11412 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
11413 (vect_compile_time_alias, vect_small_gap_p)
11414 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
11415 (vect_supportable_dr_alignment): Take references as dr_vec_infos
11416 instead of data_references. Update calls to other routines for
11417 which the same change has been made.
11418 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
11419 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11420 (vect_slp_analyze_and_verify_node_alignment)
11421 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11422 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11423 (vect_setup_realignment): Use dr_vec_infos. Update calls after
11424 above changes.
11425 (_vect_peel_info::dr): Replace with...
11426 (_vect_peel_info::dr_info): ...this new field.
11427 (vect_peeling_hash_get_most_frequent)
11428 (vect_peeling_hash_choose_best_peeling): Update accordingly.
11429 (vect_peeling_hash_get_lowest_cost):
11430 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
11431 routines for which the same change has been made.
11432 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
11433 data_reference.
11434 * tree-vect-loop-manip.c (get_misalign_in_elems)
11435 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
11436 above changes.
11437 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11438 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
11439 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
11440 (get_group_load_store_type, get_negative_load_store_type)
11441 (vect_get_data_ptr_increment, vectorizable_store)
11442 (vectorizable_load): Likewise.
11443 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
11444 Update calls to other routines for which the same change has been made.
11445
11446 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11447
11448 * tree-vectorizer.h (vec_info::move_dr): New member function.
11449 (dataref_aux): Rename to...
11450 (dr_vec_info): ...this and add "dr" and "stmt" fields.
11451 (_stmt_vec_info::dr_aux): Update accordingly.
11452 (_stmt_vec_info::data_ref_info): Delete.
11453 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
11454 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
11455 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
11456 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
11457 of data_ref.
11458 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
11459 (STMT_VINFO_DR_INFO): New macro.
11460 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
11461 (set_dr_misalignment): Update after rename of dataref_aux.
11462 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
11463 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
11464 initialization of STMT_VINFO_DATA_REF.
11465 * tree-vectorizer.c (vec_info::move_dr): New function.
11466 * tree-vect-patterns.c (vect_recog_bool_pattern)
11467 (vect_recog_mask_conversion_pattern)
11468 (vect_recog_gather_scatter_pattern): Use it.
11469 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
11470 the "dr" and "stmt" fields of dr_vec_info instead of
11471 STMT_VINFO_DATA_REF.
11472
11473 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11474
11475 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
11476 (is_pattern_stmt_p): Use it.
11477 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
11478 on pattern statements.
11479
11480 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11481
11482 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
11483 original stmt as a stmt_vec_info rather than a gimple stmt.
11484 (vect_pattern_recog_1): Take the statement directly as a
11485 stmt_vec_info, rather than via a gimple_stmt_iterator.
11486 Update call to vect_mark_pattern_stmts.
11487 (vect_pattern_recog): Update calls accordingly.
11488
11489 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11490
11491 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
11492 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
11493 a vect_def_type for the first argument.
11494 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
11495 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
11496 operand if it isn't defined by a vectorized statement.
11497 (vect_build_gather_load_calls): Remove the mask_dt argument and
11498 update calls to vect_get_vec_def_for_stmt_copy.
11499 (vectorizable_bswap): Likewise the dt argument.
11500 (vectorizable_call): Update calls to vectorizable_bswap and
11501 vect_get_vec_def_for_stmt_copy.
11502 (vectorizable_simd_clone_call, vectorizable_assignment)
11503 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
11504 (vectorizable_comparison): Update calls to
11505 vect_get_vec_def_for_stmt_copy.
11506 (vectorizable_store): Likewise. Remove now-unnecessary calls to
11507 vect_is_simple_use.
11508 (vect_get_loop_based_defs): Remove dt argument and update call
11509 to vect_get_vec_def_for_stmt_copy.
11510 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
11511 and vect_get_vec_def_for_stmt_copy.
11512 (vectorizable_load): Update calls to vect_build_gather_load_calls
11513 and vect_get_vec_def_for_stmt_copy.
11514 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11515 (vectorizable_reduction, vectorizable_live_operation): Update calls
11516 to vect_get_vec_def_for_stmt_copy.
11517
11518 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11519
11520 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
11521 and gimple stmt arguments with a stmt_vec_info.
11522 (vect_record_base_alignments): Update calls accordingly.
11523 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
11524 and gimple stmt arguments with a stmt_vec_info.
11525 (vect_build_slp_tree_1): Remove vinfo argument and update call
11526 to vect_record_max_nunits.
11527 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
11528 and vect_record_max_nunits.
11529
11530 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11531
11532 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
11533 file and take a stmt_vec_info instead of a gimple stmt.
11534 (supportable_widening_operation, vect_finish_replace_stmt)
11535 (vect_finish_stmt_generation, vect_get_store_rhs)
11536 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
11537 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
11538 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
11539 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
11540 (vect_create_data_ref_ptr, bump_vector_ptr)
11541 (vect_permute_store_chain, vect_setup_realignment)
11542 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
11543 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
11544 (vectorizable_reduction, vectorizable_induction)
11545 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
11546 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
11547 than gimple stmts as arguments.
11548 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
11549 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
11550 (can_group_stmts_p, vect_check_gather_scatter)
11551 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11552 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
11553 (vect_permute_load_chain, vect_shift_permute_load_chain)
11554 (vect_transform_grouped_load)
11555 (vect_record_grouped_load_vectors): Likewise.
11556 * tree-vect-loop.c (vect_fixup_reduc_chain)
11557 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
11558 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
11559 (vectorizable_reduction, vectorizable_induction)
11560 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
11561 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
11562 (vect_get_load_store_mask): Likewise.
11563 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
11564 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
11565 * tree-vect-stmts.c (vect_mark_relevant)
11566 (is_simple_and_all_uses_invariant)
11567 (exist_non_indexing_operands_for_use_p, process_use)
11568 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
11569 (vect_get_vec_def_for_operand, vect_get_vec_defs)
11570 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
11571 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
11572 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
11573 (get_negative_load_store_type, get_load_store_type)
11574 (vect_check_load_store_mask, vect_check_store_rhs)
11575 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
11576 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11577 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11578 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11579 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
11580 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
11581 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
11582 (supportable_widening_operation): Likewise.
11583
11584 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11585
11586 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
11587 a stmt_vec_info instead of a gcall.
11588 (vect_check_gather_scatter): Update call accordingly.
11589 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
11590 of a gphi.
11591 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
11592 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
11593 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
11594 instead of a gimple stmt.
11595 (vect_transform_loop): Update calls accordingly.
11596 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
11597 stmt_vec_infos instead of gimple stmts.
11598 (vect_analyze_slp_instance): Update use accordingly.
11599 * tree-vect-stmts.c (read_vector_array, write_vector_array)
11600 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
11601 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
11602 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
11603 (vect_gen_widened_results_half, vect_get_loop_based_defs)
11604 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
11605 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
11606 down to subroutines.
11607
11608 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11609
11610 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
11611 of the worklist from a vector of gimple stmts to a vector of
11612 stmt_vec_infos.
11613 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11614 (vect_mark_stmts_to_be_vectorized): Likewise
11615
11616 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11617
11618 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
11619 statement before passing it to vect_analyze_stmt.
11620 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
11621 the chain of phi vector definitions. Track the exit phi via its
11622 stmt_vec_info.
11623 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
11624 STMT_VINFO_REDUC_DEF.
11625 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
11626 stmt_vec_infos to handle the statement chains.
11627 (vect_get_slp_defs): Record the first statement in the node
11628 using a stmt_vec_info.
11629 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
11630 statements here and pass their stmt_vec_info down to subroutines.
11631 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
11632 down to vect_finish_stmt_generation.
11633 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
11634 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
11635 stmt_vec_infos to subroutines.
11636 (vect_remove_stores): Use stmt_vec_infos to handle the statement
11637 chains.
11638
11639 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11640
11641 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
11642 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
11643 (vect_permute_store_chain, vect_setup_realignment)
11644 (vect_permute_load_chain, vect_shift_permute_load_chain)
11645 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
11646 stmts internally, and when passing values to other vectorizer routines.
11647 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11648 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
11649 (vect_analyze_loop_operations, get_initial_def_for_reduction)
11650 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
11651 (vectorizable_reduction, vectorizable_induction)
11652 (vectorizable_live_operation, vect_transform_loop_stmt)
11653 (vect_transform_loop): Likewise.
11654 * tree-vect-patterns.c (vect_reassociating_reduction_p)
11655 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
11656 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
11657 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11658 (vect_slp_analyze_node_operations_1): Likewise.
11659 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11660 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
11661 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
11662 (vect_finish_stmt_generation_1, get_group_load_store_type)
11663 (get_load_store_type, vect_build_gather_load_calls)
11664 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11665 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11666 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11667 (vectorizable_store, vectorizable_load, vectorizable_condition)
11668 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
11669 (supportable_widening_operation): Likewise.
11670 (vect_get_vector_types_for_stmt): Likewise.
11671 * tree-vectorizer.h (vect_dr_behavior): Likewise.
11672
11673 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11674
11675 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11676 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
11677 (vect_permute_store_chain, vect_permute_load_chain)
11678 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
11679 repeated stmt_vec_info lookups.
11680 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11681 (vect_update_ivs_after_vectorizer): Likewise.
11682 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
11683 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11684 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
11685 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11686 (vect_bb_slp_scalar_cost): Likewise.
11687 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
11688
11689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11690
11691 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
11692 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11693 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11694 to get gassigns and gcalls, rather than operating on generc gimple
11695 stmts.
11696 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11697 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11698 (vectorizable_load, vect_analyze_stmt): Likewise.
11699 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11700
11701 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11702
11703 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11704 return stmt_vec_infos rather than gimple stmts. Do not accept
11705 null arguments.
11706 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11707 of a gimple stmt.
11708 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11709 Update use of get_later_stmt.
11710 (vect_get_constant_vectors): Update call accordingly.
11711 (vect_schedule_slp_instance): Likewise
11712 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11713 (vect_slp_analyze_instance_dependence): Likewise.
11714 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11715
11716 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11717
11718 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11719 (stmt_info_for_cost::stmt_info): ...this new field.
11720 (add_stmt_costs): Update accordingly.
11721 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11722 (vect_get_known_peeling_cost): Likewise.
11723 (vect_estimate_min_profitable_iters): Likewise.
11724 * tree-vect-stmts.c (record_stmt_cost): Likewise.
11725
11726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11727
11728 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11729 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11730 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11731 accordingly.
11732 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11733
11734 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11735
11736 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11737 a gimple stmt to a stmt_vec_info.
11738 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11739
11740 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11741
11742 * tree-vectorizer.h (vec_info::grouped_stores): Change from
11743 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11744 (_loop_vec_info::reduction_chains): Likewise.
11745 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11746 accordingly.
11747 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11748
11749 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11750
11751 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11752 a gimple stmt to a stmt_vec_info.
11753 (_stmt_vec_info::next_element): Likewise.
11754 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11755 (vect_slp_analyze_and_verify_node_alignment)
11756 (vect_analyze_group_access_1, vect_analyze_group_access)
11757 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11758 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11759 (vect_supportable_dr_alignment): Update accordingly.
11760 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11761 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11762 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
11763 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11764 * tree-vect-slp.c (vect_build_slp_tree_1)
11765 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
11766 (vect_split_slp_store_group, vect_analyze_slp_instance)
11767 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
11768 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
11769 (get_group_load_store_type, get_load_store_type)
11770 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
11771 (vect_transform_stmt, vect_remove_stores): Likewise.
11772
11773 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11774
11775 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
11776 than a gimple stmt.
11777 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11778 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
11779 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
11780 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
11781 (vector_alignment_reachable_p, vect_get_data_access_cost)
11782 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
11783 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
11784 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11785 (vect_analyze_group_access_1, vect_analyze_group_access)
11786 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
11787 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
11788 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
11789 result of vect_dr_stmt and use the stmt_vec_info instead of
11790 the associated gimple stmt.
11791 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11792 (vect_gen_prolog_loop_niters): Likewise.
11793 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11794
11795 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11796
11797 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
11798 to a vec<stmt_vec_info>.
11799 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
11800 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
11801 vec<stmt_vec_info>.
11802 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
11803 to a vec<stmt_vec_info>.
11804 (bst_traits::value_type, bst_traits::value_type): Likewise.
11805 (bst_traits::hash): Update accordingly.
11806 (vect_get_and_check_slp_defs): Change the stmts parameter from
11807 a vec<gimple *> to a vec<stmt_vec_info>.
11808 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
11809 (vect_build_slp_tree): Likewise.
11810 (vect_build_slp_tree_2): Likewise. Update uses of
11811 SLP_TREE_SCALAR_STMTS.
11812 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
11813 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
11814 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
11815 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
11816 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
11817 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
11818 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
11819 (vect_get_constant_vectors, vect_get_slp_defs)
11820 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
11821 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
11822 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
11823 instead of gimple stmts.
11824 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11825 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11826 (vect_slp_analyze_instance_dependence): Update uses of
11827 SLP_TREE_SCALAR_STMTS.
11828 (vect_slp_analyze_and_verify_node_alignment): Likewise.
11829 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11830 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11831 (get_initial_defs_for_reduction): Likewise.
11832 (vect_create_epilog_for_reduction): Likewise.
11833 (vectorize_fold_left_reduction): Likewise.
11834 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11835 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11836 (can_vectorize_live_stmts): Likewise.
11837
11838 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11839
11840 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11841 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11842 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11843 than gimple stmts.
11844 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11845 of a gimple stmt.
11846 (gather_scalar_reductions): Update after above interface changes.
11847 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11848 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11849 than gimple stmts.
11850 (vect_force_simple_reduction): Likewise.
11851 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11852 LOOP_VINFO_REDUCTIONS.
11853 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11854
11855 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11856
11857 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11858 a gimple stmt to a stmt_vec_info.
11859 * tree-vect-loop.c (vect_active_double_reduction_p)
11860 (vect_force_simple_reduction, vectorizable_reduction): Update
11861 accordingly.
11862
11863 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11864
11865 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11866 vec<gimple *> to a vec<stmt_vec_info>.
11867 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11868 the reduction_phis argument from a vec<gimple *> to a
11869 vec<stmt_vec_info>.
11870 (vectorizable_reduction): Likewise the phis local variable that
11871 is passed to vect_create_epilog_for_reduction. Update for new type
11872 of SLP_TREE_VEC_STMTS.
11873 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11874 (vectorizable_live_operation): Likewise.
11875 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11876 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11877
11878 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11879
11880 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11881 a gimple stmt to a stmt_vec_info.
11882 (vectorizable_condition, vectorizable_live_operation)
11883 (vectorizable_reduction, vectorizable_induction): Pass back the
11884 vectorized statement as a stmt_vec_info.
11885 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11886 use of STMT_VINFO_VEC_STMT.
11887 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11888 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11889 as stmt_vec_infos rather than gimple stmts.
11890 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11891 to a stmt_vec_info.
11892 (vectorizable_live_operation): Likewise.
11893 (vectorizable_reduction, vectorizable_induction): Likewise,
11894 updating use of STMT_VINFO_VEC_STMT.
11895 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11896 of STMT_VINFO_VEC_STMT.
11897 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11898 (vectorizable_simd_clone_call, vectorizable_conversion)
11899 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11900 (vectorizable_store, vectorizable_load, vectorizable_condition)
11901 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11902 from a gimple stmt to a stmt_vec_info.
11903 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
11904 pointer to a stmt_vec_info to the vectorizable_* routines.
11905
11906 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11907
11908 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11909 a gimple stmt to a stmt_vec_info.
11910 (is_pattern_stmt_p): Update accordingly.
11911 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11912 (vect_record_grouped_load_vectors): Likewise.
11913 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11914 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11915 (vect_model_reduction_cost): Likewise.
11916 (vect_create_epilog_for_reduction): Likewise.
11917 (vectorizable_reduction, vectorizable_induction): Likewise.
11918 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11919 Return the stmt_vec_info for the pattern statement.
11920 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11921 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11922 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11923 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11924 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11925 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11926 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11927 (free_stmt_vec_info, vect_is_simple_use): Likewise.
11928
11929 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11930
11931 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11932 (vect_finish_stmt_generation): Likewise.
11933 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11934 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11935 (vect_build_gather_load_calls): Use the return value of the above
11936 functions instead of a separate call to vinfo_for_stmt. Use narrow
11937 scopes for the input gimple stmt and wider scopes for the associated
11938 stmt_vec_info. Use vec_info::lookup_def when setting these
11939 stmt_vec_infos from an SSA_NAME definition.
11940 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11941 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11942 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11943 (vectorizable_store, vectorizable_load, vectorizable_condition)
11944 (vectorizable_comparison): Likewise.
11945 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11946 (vectorizable_reduction): Likewise.
11947
11948 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11949
11950 * tree-vectorizer.h (vect_is_simple_use): Add an optional
11951 stmt_vec_info * parameter before the optional gimple **.
11952 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11953 (process_use, vect_get_vec_def_for_operand_1): Update callers.
11954 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11955 * tree-vect-loop.c (vectorizable_reduction): Likewise.
11956 (vectorizable_live_operation): Likewise.
11957 * tree-vect-patterns.c (type_conversion_p): Likewise.
11958 (vect_look_through_possible_promotion): Likewise.
11959 (vect_recog_rotate_pattern): Likewise.
11960 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11961
11962 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11963
11964 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11965 a typedef to a wrapper class.
11966 (NULL_STMT_VEC_INFO): New macro.
11967 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11968 (stmt_vec_info::operator*): New function.
11969 (stmt_vec_info::operator gimple *): Likewise.
11970 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11971 (add_stmt_costs): Likewise.
11972 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11973 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11974 (vect_get_known_peeling_cost): Likewise.
11975 (vect_estimate_min_profitable_iters): Likewise.
11976 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11977 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11978 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11979 (vectorizable_store, free_stmt_vec_infos): Likewise.
11980 (new_stmt_vec_info): Change return type of xcalloc to
11981 _stmt_vec_info *.
11982
11983 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11984
11985 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11986 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11987 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11988 a single_imm_use-based sequence.
11989 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11990
11991 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11992
11993 * tree-vectorizer.h (vec_info::lookup_def): Declare.
11994 * tree-vectorizer.c (vec_info::lookup_def): New function.
11995 * tree-vect-patterns.c (vect_get_internal_def): Use it.
11996 (vect_widened_op_tree): Likewise.
11997 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11998 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11999 (vectorizable_reduction): Likewise.
12000 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
12001 of a gimple *.
12002 (vect_is_slp_reduction): Update calls accordingly. Use
12003 vec_info::lookup_def.
12004 (vect_is_simple_reduction): Likewise
12005 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
12006
12007 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12008
12009 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
12010 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
12011 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
12012 of vinfo_for_stmt.
12013 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
12014 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
12015 (vect_update_vf_for_slp, vect_analyze_loop_operations)
12016 (vect_is_slp_reduction, vectorizable_induction)
12017 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
12018 * tree-vect-patterns.c (vect_init_pattern_stmt):
12019 (vect_determine_min_output_precision_1, vect_determine_precisions)
12020 (vect_pattern_recog): Likewise.
12021 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
12022 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
12023 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
12024 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12025 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
12026 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
12027 info field from a loop to a loop_vec_info.
12028
12029 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12030
12031 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
12032 (vec_info::add_stmt): Declare.
12033 * tree-vectorizer.c (vec_info::add_stmt): New function.
12034 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
12035 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
12036 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12037 (vectorizable_induction): Likewise.
12038 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
12039 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12040 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
12041 (vectorizable_load): Likewise.
12042 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12043 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
12044 (vect_recog_gather_scatter_pattern): Likewise.
12045 (append_pattern_def_seq): Likewise. Remove a check that is
12046 performed by add_stmt itself.
12047
12048 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12049
12050 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
12051 which make_ssa_name was called with new_stmt before new_stmt
12052 had been created.
12053
12054 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12055
12056 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
12057 split out from...
12058 (vect_is_slp_reduction): ...here...
12059 (vect_is_simple_reduction): ...and here. Remove repetition of tests
12060 that are already known to be false.
12061
12062 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12063
12064 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
12065 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
12066 STMT_VINFO_NUM_SLP_USES when it's true.
12067 (vect_free_slp_instance): Add a final_p parameter and pass it to
12068 vect_free_slp_tree.
12069 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
12070 (vect_analyze_slp_instance): Likewise.
12071 (vect_slp_analyze_operations): Likewise.
12072 (vect_slp_analyze_bb_1): Likewise.
12073 * tree-vectorizer.c (vec_info): Likewise.
12074 * tree-vect-loop.c (vect_transform_loop): Likewise.
12075
12076 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12077
12078 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12079 function is not called for second and subsequent members of
12080 a reduction group.
12081
12082 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12083
12084 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
12085 cases for nested loops from here to ...
12086 (vect_create_epilog_for_reduction): ...here. Only call
12087 vect_is_simple_use for inner-loop reductions.
12088
12089 2018-07-31 Martin Liska <mliska@suse.cz>
12090
12091 PR gcov-profile/85338
12092 PR gcov-profile/85350
12093 PR gcov-profile/85372
12094 * profile.c (struct location_triplet): New.
12095 (struct location_triplet_hash): Likewise.
12096 (output_location): Do not output a BB that
12097 is already recorded for a line.
12098 (branch_prob): Use streamed_locations.
12099
12100 2018-07-31 Martin Liska <mliska@suse.cz>
12101
12102 PR gcov-profile/85370
12103 * coverage.c (coverage_begin_function): Do not mark target
12104 clones as artificial functions.
12105
12106 2018-07-31 Martin Liska <mliska@suse.cz>
12107
12108 PR gcov-profile/83813
12109 PR gcov-profile/84758
12110 PR gcov-profile/85217
12111 PR gcov-profile/85332
12112 * profile.c (branch_prob): Do not record GOTO expressions
12113 for GIMPLE statements which locations are already streamed.
12114
12115 2018-07-31 Olivier Hainque <hainque@adacore.com>
12116
12117 * gcc.c (handle_spec_function): Accept a soft_matched_part
12118 argument, as do_spec_1. Pass it down to ...
12119 (eval_spec_function): Accept a soft_matched_part argument,
12120 and pass it down to ...
12121 (do_spec_2): Accept a soft_matched_part argument, and pass
12122 it down to do_spec_1.
12123 (do_spec_1): Pass soft_matched_part to handle_spec_function.
12124 (handle_braces): Update call to handle_spec_function.
12125 (driver::set_up_specs): Update calls to do_spec_2.
12126 (compare_debug_dump_opt_spec_function): Likewise.
12127 (compare_debug_self_opt_spec_function): Likewise.
12128
12129 2018-07-31 Olivier Hainque <hainque@adacore.com>
12130
12131 * common.opt (nolibc): New option.
12132 * doc/invoke.texi (Link Options): Document it.
12133 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
12134 * config/alpha/linux.h: Likewise.
12135 * config/arc/elf.h: Likewise.
12136 * config/arm/uclinux-elf.h: Likewise.
12137 * config/arm/unknown-elf.h: Likewise.
12138 * config/avr/avrlibc.h: Likewise.
12139 * config/bfin/bfin.h: Likewise.
12140 * config/bfin/linux.h: Likewise.
12141 * config/bfin/uclinux.h: Likewise.
12142 * config/darwin.h: Likewise.
12143 * config/darwin10.h: Likewise.
12144 * config/darwin12.h: Likewise.
12145 * config/gnu-user.h: Likewise.
12146 * config/lm32/uclinux-elf.h: Likewise.
12147 * config/pa/pa-hpux11.h: Likewise.
12148 * config/pa/pa64-hpux.h: Likewise.
12149 * config/sparc/sparc.h: Likewise.
12150
12151 2018-07-31 Olivier Hainque <hainque@adacore.com>
12152
12153 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
12154 undefined variables.
12155
12156 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
12157
12158 PR target/86640
12159 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
12160 instead of GEN_INT.
12161
12162 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12163
12164 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
12165 terminated string literal.
12166
12167 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
12168
12169 PR rtl-optimization/85160
12170 * combine.c (is_just_move): New function.
12171 (try_combine): Allow combining two instructions into two if neither of
12172 the original instructions was a move.
12173
12174 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
12175
12176 PR target/86673
12177 * doc/extend.texi (Global Register Variables): Discourage use of type
12178 qualifiers.
12179 (Local Register Variables): Likewise.
12180
12181 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
12182
12183 PR tree-optimization/86506
12184 * hwint.h (ceil_log2): Resync with hwint.c implementation.
12185
12186 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
12187
12188 PR target/86547
12189 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
12190 hard_regno, make sure no insn between `from` and `to` clobbers it.
12191
12192 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
12193 Tom de Vries <tdevries@suse.de>
12194
12195 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
12196 (PTX_DEFAULT_RUNTIME_DIM): ... this.
12197 (nvptx_goacc_validate_dims): Set default worker and gang dims to
12198 PTX_DEFAULT_RUNTIME_DIM.
12199 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
12200
12201 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
12202
12203 * config/pa/pa.c (pa_output_addr_vec): Align address table.
12204 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
12205 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
12206
12207 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
12208
12209 * config/rs6000/constraints.md (wG constraint): Delete, no longer
12210 used.
12211 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
12212 predicate to reflect toc fusion has been deleted.
12213 (toc_fusion_mem_raw): Delete, no longer used.
12214 (toc_fusion_mem_wrapped): Likewise.
12215 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
12216 fusion mask bit.
12217 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
12218 Delete, no longer used.
12219 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
12220 meant to be used for toc fusion.
12221 (rs6000_debug_print_mode): Delete toc fusion debugging.
12222 (rs6000_debug_reg_global): Likewise.
12223 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
12224 fusion and secondary reload support that were never used.
12225 (rs6000_option_override_internal): Delete TOC fusion, that was only
12226 partially defined, and it did not work unless you also used the
12227 -mcmodel= switch.
12228 (rs6000_legitimate_address_p): Delete TOC fusion support.
12229 (rs6000_opt_masks): Likewise.
12230 (fusion_wrap_memory_address): Delete function, no longer used.
12231 (fusion_split_address); Delete TOC fusion support.
12232 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
12233 longer used with toc fusion being deleted.
12234 (TARGET_TOC_FUSION_FP): Likewise.
12235 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
12236 UNSPEC.
12237 (toc fusion spliter): Delete TOC fusion support.
12238 (toc_fusionload_<mode>): Likewise.
12239 (toc_fusionload_di): Likewise.
12240 (fusion_gpr_load_<mode>): Delete generator function, this insn no
12241 longer needs to be named. Rename predicate to delete TOC fusion.
12242 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12243 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12244 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12245 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12246 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
12247
12248 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
12249
12250 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
12251 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
12252 __int128 in built-in function prototypes.
12253 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
12254 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
12255
12256 2018-07-27 Martin Sebor <msebor@redhat.com>
12257
12258 PR tree-optimization/86696
12259 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
12260 types, including enums.
12261 (handle_char_store): Be prepared for the above function to fail.
12262
12263 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
12264
12265 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
12266 when optimization level is lower than 2 or optimize for size.
12267
12268 2018-07-26 Martin Sebor <msebor@redhat.com>
12269
12270 PR tree-optimization/86043
12271 PR tree-optimization/86042
12272 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
12273 (get_string_cst_length): Rename...
12274 (get_min_string_length): ...to this. Add argument.
12275 (handle_char_store): Extend to handle multi-character stores by
12276 MEM_REF.
12277 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
12278 * tree.h (initializer_zerop): Add argument.
12279
12280 2018-07-26 Jakub Jelinek <jakub@redhat.com>
12281
12282 PR middle-end/86660
12283 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
12284 declare target to variables if they have always,{to,from,tofrom} map
12285 kinds.
12286
12287 2018-07-26 Martin Liska <mliska@suse.cz>
12288
12289 PR lto/86548
12290 * lto-wrapper.c: Add linker_output as prefix
12291 for ltrans_output_file.
12292
12293 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
12294
12295 PR rtl-optimization/85805
12296 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
12297 value for hard registers if that was written in the same mode.
12298
12299 2018-07-26 Martin Liska <mliska@suse.cz>
12300
12301 PR gcov-profile/86536
12302 * gcov.c (format_gcov): Use printf format %.*f directly
12303 and do not handle special values.
12304
12305 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12306
12307 * common/config/arc/arc-common.c (arc_option_optimization_table):
12308 Update default optimizations for size.
12309
12310 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12311
12312 * config/arc/arc.md (movsf_insn): Add short instruction selection.
12313 * config/arc/constraints.md (CfZ): New constraint.
12314 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
12315 (subsf3_fpu): Likewise.
12316 (cmpsf_fpu): Likewise.
12317 (cmpsf_fpu_uneq): Likewise.
12318
12319 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12320
12321 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
12322 accesses as well.
12323 (arc_is_uncached_mem_p): uncached applies to both the variable and
12324 the pointer.
12325
12326 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12327
12328 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
12329 register names.
12330
12331 2018-07-25 David Malcolm <dmalcolm@redhat.com>
12332
12333 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
12334 field "m_scopes" from vec to auto_vec.
12335
12336 2018-07-25 Martin Liska <mliska@suse.cz>
12337
12338 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
12339 return type.
12340
12341 2018-07-25 Richard Biener <rguenther@suse.de>
12342
12343 PR debug/86654
12344 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
12345 special wrt context_die late.
12346 (gen_subprogram_die): Re-use DIEs in local scope.
12347
12348 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
12349
12350 PR tree-optimization/86644
12351 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
12352
12353 2018-07-25 Martin Liska <mliska@suse.cz>
12354
12355 PR middle-end/86645
12356 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
12357 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
12358
12359 2018-07-25 Martin Liska <mliska@suse.cz>
12360
12361 PR sanitizer/79635
12362 * params.def: Explain ASan abbreviation and provide
12363 a documentation link.
12364
12365 2018-07-24 Martin Sebor <msebor@redhat.com>
12366
12367 PR tree-optimization/86622
12368 PR tree-optimization/86532
12369 * builtins.h (string_length): Declare.
12370 * builtins.c (c_strlen): Correct handling of non-constant offsets.
12371 (check_access): Be prepared for non-constant length ranges.
12372 (string_length): Make extern.
12373 * expr.c (string_constant): Only handle the minor non-constant
12374 array index. Use string_constant to compute the length of
12375 a generic string constant.
12376
12377 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
12378
12379 PR tree-optimization/86618
12380 * tree-vect-stmts.c (vectorizable_call): Don't take the address
12381 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
12382
12383 2018-07-24 David Malcolm <dmalcolm@redhat.com>
12384
12385 PR tree-optimization/86636
12386 * json.cc (json::object::set): Fix comment. Add assertions.
12387 (json::array::append): Move here from json.h. Add comment and an
12388 assertion.
12389 (json::string::string): Likewise.
12390 * json.h (json::array::append): Move to json.cc.
12391 (json::string::string): Likewise.
12392 * optinfo-emit-json.cc
12393 (optrecord_json_writer::impl_location_to_json): Assert that we
12394 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
12395 wrapper around it. Expand the location once, rather than three
12396 times.
12397 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
12398 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
12399 wrappers.
12400 (optrecord_json_writer::optinfo_to_json): Likewise, in four
12401 places. Fix some overlong lines.
12402
12403 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
12404
12405 * config/aarch64/aarch64-simd.md
12406 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
12407 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
12408 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
12409 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
12410 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
12411 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
12412 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
12413 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
12414 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
12415
12416 2018-07-24 Jakub Jelinek <jakub@redhat.com>
12417
12418 PR middle-end/86627
12419 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
12420 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
12421 and abs_d == d, do the power of two handling if profitable.
12422
12423 2018-07-24 Richard Biener <rguenther@suse.de>
12424
12425 * match.pd: Add BIT_FIELD_REF canonicalizations.
12426
12427 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12428
12429 PR c/86617
12430 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
12431
12432 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12433
12434 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
12435 terminated STRING_CST object.
12436
12437 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12438
12439 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
12440
12441 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12442
12443 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
12444 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
12445 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
12446 the elements into a register.
12447 (rs6000_split_v4si_init_di_reg): Delete.
12448 (rs6000_split_v4si_init): Delete.
12449 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
12450 (vsx_init_v4si): Rewrite as a define_expand.
12451
12452 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12453
12454 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
12455 zero_extend argument from memory): New.
12456
12457 2018-07-22 Martin Sebor <msebor@redhat.com>
12458
12459 PR bootstrap/86621
12460 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
12461 diagnosing calls with unknown arguments unless -Walloca-larger-than
12462 is restricted to less than PTRDIFF_MAX bytes.
12463
12464 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
12465
12466 * doc/gcov.texi (Invoking Gcov): Editorial changes.
12467
12468 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12469
12470 * pretty-print.c (text_info::set_location): Remove redundant
12471 "line_table" parameter from call to rich_location::set_range.
12472
12473 2018-07-20 Martin Sebor <msebor@redhat.com>
12474
12475 PR middle-end/82063
12476 * builtins.c (expand_builtin_alloca): Adjust.
12477 * calls.c (alloc_max_size): Simplify.
12478 * cgraphunit.c (cgraph_node::expand): Adjust.
12479 * common.opt (larger_than_size, warn_frame_larger_than): Remove
12480 variables.
12481 (frame_larger_than_size): Same.
12482 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
12483 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
12484 Initialize.
12485 * doc/invoke.texi (GCC Command Options): Document option arguments.
12486 Explain byte-size arguments and suffixes.
12487 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
12488 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
12489 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
12490 * doc/options.texi (UInteger): Expand.
12491 (Host_Wide_Int, ByteSize): Document new properties.
12492 * final.c (final_start_function_1): Include sizes in an error message.
12493 * function.c (frame_offset_overflow): Same.
12494 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
12495 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
12496 Diagnose unbounded alloca calls only for limits of less than
12497 PTRDIFF_MAX.
12498 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
12499 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
12500 for alloca(0).
12501 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
12502 only for limits of less than PTRDIFF_MAX.
12503 * langhooks-def.h (lhd_handle_option): Change function argument
12504 to HOST_WIDE_INT.
12505 * langhooks.c (lhd_handle_option): Same.
12506 * langhooks.h (handle_option): Same.
12507 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
12508 ByteSize flags.
12509 (var_type, var_type_struct): Same.
12510 (var_set): Handle ByteSize flag.
12511 * optc-gen.awk: Add comments to output to ease debugging. Make
12512 use of HOST_WIDE_INT where appropriate.
12513 * opts-gen-save.awk: Use %lx to format unsigned long.
12514 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
12515 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
12516 arguments. Parse bytes-size suffixes.
12517 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
12518 (enum_value_to_arg): Same.
12519 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
12520 (handle_option): Adjust.
12521 (generate_option): Change function argument to HOST_WIDE_INT.
12522 (cmdline_handle_error): Adjust.
12523 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
12524 (set_option): Change function argument to HOST_WIDE_INT.
12525 (option_enabled): Handle cl_host_wide_int.
12526 (get_option_state): Handle CLVC_SIZE.
12527 (control_warning_option): Same.
12528 * opts.c (common_handle_option): Change function argument to
12529 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
12530 OPT_Wvla_larger_than_.
12531 * opts.h (enum cl_var_type): Add an enumerator.
12532 * stor-layout.c (layout_decl): Print a more meaningful warning.
12533 * toplev.c (output_stack_usage): Adjust.
12534
12535 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
12536
12537 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
12538 call to inline_expand_builtin_string_cmp.
12539 (expand_builtin_strcmp): Likewise.
12540 (expand_builtin_strncmp): Likewise.
12541 (inline_string_cmp): Delete the last parameter, change char_type_node
12542 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
12543 two operands.
12544 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
12545 the inlining expansion on target where the type of the call has same or
12546 narrower precision than unsigned char.
12547
12548 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12549
12550 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
12551 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
12552 * common.opt (fsave-optimization-record): New option.
12553 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
12554 * doc/invoke.texi (-fsave-optimization-record): New option.
12555 * dumpfile.c: Include "optinfo-emit-json.h".
12556 (struct kv_pair): Move to coretypes.h.
12557 (optgroup_options): Make non-static.
12558 (dump_context::end_scope): Call
12559 optimization_records_maybe_pop_dump_scope.
12560 * dumpfile.h (optgroup_options): New decl.
12561 * json.cc: New file.
12562 * json.h: New file.
12563 * optinfo-emit-json.cc: New file.
12564 * optinfo-emit-json.h: New file.
12565 * optinfo.cc: Include "optinfo-emit-json.h".
12566 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
12567 (optinfo_enabled_p): Check optimization_records_enabled_p.
12568 (optinfo_wants_inlining_info_p): Likewise.
12569 * optinfo.h: Update comment.
12570 * profile-count.c (profile_quality_as_string): New function.
12571 * profile-count.h (profile_quality_as_string): New decl.
12572 (profile_count::quality): New accessor.
12573 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
12574 and optinfo_emit_json_cc_tests.
12575 * selftest.h (selftest::json_cc_tests): New decl.
12576 (selftest::optinfo_emit_json_cc_tests): New decl.
12577 * toplev.c: Include "optinfo-emit-json.h".
12578 (compile_file): Call optimization_records_finish.
12579 (do_compile): Call optimization_records_start.
12580 * tree-ssa-live.c: Include optinfo.h.
12581 (remove_unused_scope_block_p): Retain inlining information if
12582 optinfo_wants_inlining_info_p returns true.
12583
12584 2018-07-20 Richard Biener <rguenther@suse.de>
12585
12586 PR debug/86585
12587 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
12588 to cover -flto-partition=none.
12589
12590 2018-07-20 Martin Liska <mliska@suse.cz>
12591
12592 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
12593 (get_decl_source_range): Remove unused function.
12594
12595 2018-07-20 Richard Biener <rguenther@suse.de>
12596
12597 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
12598 (struct vn_phi_s): Likewise.
12599 (struct vn_reference_s): Likewise.
12600 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
12601 for searching the slot of an entry known to be in the hash itself.
12602 (vn_phi_hasher::equal): Likewise.
12603 (vn_reference_hasher::equal): Likewise.
12604 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
12605 globals.
12606 (optimistic_info, current_info): Remove, keeping only valid_info.
12607 (vn_reference_lookup_1): Remove fallback lookup.
12608 (vn_reference_lookup_2): Likewise.
12609 (vn_nary_op_lookup_1): Likewise.
12610 (vn_phi_lookup): Likewise.
12611 (vn_nary_build_or_lookup_1): Make sure to not chain the built
12612 hash element.
12613 (vn_reference_insert): Adjust, chain the inserted hash element
12614 at last_inserted_ref.
12615 (vn_reference_insert_pieces): Likewise.
12616 (visit_reference_op_call): Likewise.
12617 (vn_nary_op_insert_into): Chain the inserted hash element at
12618 last_inserted_nary.
12619 (vn_nary_op_insert_pieces): Adjust.
12620 (vn_nary_op_insert): Likewise.
12621 (vn_nary_op_insert_stmt): Likewise.
12622 (vn_phi_insert): Adjust, chain the inserted hash element at
12623 last_inserted_phi.
12624 (process_scc): Remove clearing and copying the optimistic
12625 table. Instead remove elements inserted during an optimistic
12626 iteration from the single table we maintain.
12627 (init_scc_vn): Adjust.
12628 (free_scc_vn): Likewise.
12629 (sccvn_dom_walker::record_cond): Likewise.
12630 (sccvn_dom_walker::after_dom_children): Likewise.
12631
12632 2018-07-19 Martin Sebor <msebor@redhat.com>
12633
12634 PR tree-optimization/84047
12635 PR tree-optimization/83776
12636 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
12637 (check_array_bounds): Call it.
12638
12639 2018-07-19 Martin Sebor <msebor@redhat.com>
12640
12641 * align.h (align_flags): Use member initialization.
12642
12643 2018-07-19 David Malcolm <dmalcolm@redhat.com>
12644
12645 * Makefile.in (OBJS): Add optinfo.o.
12646 * coretypes.h (class symtab_node): New forward decl.
12647 (struct cgraph_node): New forward decl.
12648 (class varpool_node): New forward decl.
12649 * dump-context.h: New file.
12650 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
12651 "tree-pass.h".
12652 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
12653 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
12654 (set_alt_dump_file): Likewise.
12655 (dump_context::~dump_context): New dtor.
12656 (dump_gimple_stmt): Move implementation to...
12657 (dump_context::dump_gimple_stmt): ...this new member function.
12658 Add the stmt to any pending optinfo, creating one if need be.
12659 (dump_gimple_stmt_loc): Move implementation to...
12660 (dump_context::dump_gimple_stmt_loc): ...this new member function.
12661 Start a new optinfo and add the stmt to it.
12662 (dump_gimple_expr): Move implementation to...
12663 (dump_context::dump_gimple_expr): ...this new member function.
12664 Add the stmt to any pending optinfo, creating one if need be.
12665 (dump_gimple_expr_loc): Move implementation to...
12666 (dump_context::dump_gimple_expr_loc): ...this new member function.
12667 Start a new optinfo and add the stmt to it.
12668 (dump_generic_expr): Move implementation to...
12669 (dump_context::dump_generic_expr): ...this new member function.
12670 Add the tree to any pending optinfo, creating one if need be.
12671 (dump_generic_expr_loc): Move implementation to...
12672 (dump_context::dump_generic_expr_loc): ...this new member
12673 function. Add the tree to any pending optinfo, creating one if
12674 need be.
12675 (dump_printf): Move implementation to...
12676 (dump_context::dump_printf_va): ...this new member function. Add
12677 the text to any pending optinfo, creating one if need be.
12678 (dump_printf_loc): Move implementation to...
12679 (dump_context::dump_printf_loc_va): ...this new member function.
12680 Start a new optinfo and add the stmt to it.
12681 (dump_dec): Move implementation to...
12682 (dump_context::dump_dec): ...this new member function. Add the
12683 value to any pending optinfo, creating one if need be.
12684 (dump_context::dump_symtab_node): New member function.
12685 (dump_context::get_scope_depth): New member function.
12686 (dump_context::begin_scope): New member function.
12687 (dump_context::end_scope): New member function.
12688 (dump_context::ensure_pending_optinfo): New member function.
12689 (dump_context::begin_next_optinfo): New member function.
12690 (dump_context::end_any_optinfo): New member function.
12691 (dump_context::s_current): New global.
12692 (dump_context::s_default): New global.
12693 (dump_scope_depth): Delete global.
12694 (dumpfile_ensure_any_optinfo_are_flushed): New function.
12695 (dump_symtab_node): New function.
12696 (get_dump_scope_depth): Reimplement in terms of dump_context.
12697 (dump_begin_scope): Likewise.
12698 (dump_end_scope): Likewise.
12699 (selftest::temp_dump_context::temp_dump_context): New ctor.
12700 (selftest::temp_dump_context::~temp_dump_context): New dtor.
12701 (selftest::verify_item): New function.
12702 (ASSERT_IS_TEXT): New macro.
12703 (ASSERT_IS_TREE): New macro.
12704 (ASSERT_IS_GIMPLE): New macro.
12705 (selftest::test_capture_of_dump_calls): New test.
12706 (selftest::dumpfile_c_tests): Call it.
12707 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12708 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12709 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12710 descriptive comment.
12711 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12712 (dump_node, dump_bb): Move these unrelated decls.
12713 (class dump_manager): Add leading comment.
12714 * optinfo.cc: New file.
12715 * optinfo.h: New file.
12716
12717 2018-07-19 Michael Collison <michael.collison@arm.com>
12718 Richard Henderson <rth@redhat.com>
12719
12720 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12721 (subti): Handle op1 zero.
12722 (subvti4, usub4ti4): New.
12723 (*sub<GPI>3_compare1_imm): New.
12724 (sub<GPI>3_carryinCV): New.
12725 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12726 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12727
12728 2018-07-19 Michael Collison <michael.collison@arm.com>
12729 Richard Henderson <rth@redhat.com>
12730
12731 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12732 (addti3): Create simpler code if low part is already known to be 0.
12733 (addvti4, uaddvti4): New.
12734 (*add<GPI>3_compareC_cconly_imm): New.
12735 (*add<GPI>3_compareC_cconly): New.
12736 (*add<GPI>3_compareC_imm): New.
12737 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12738 handle constants within this pattern..
12739 (*add<GPI>3_compareV_cconly_imm): New.
12740 (*add<GPI>3_compareV_cconly): New.
12741 (*add<GPI>3_compareV_imm): New.
12742 (add<GPI>3_compareV): New.
12743 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12744 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12745 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12746 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12747 with 'comparison' operator.
12748 (*add<GPI>3_compareV_cconly_imm): Ditto.
12749 (*add<GPI>3_compareV_cconly): Ditto.
12750 (*add<GPI>3_compareV_imm): Ditto.
12751 (add<GPI>3_compareV): Ditto.
12752 (add<mode>3_carryinC): Ditto.
12753 (*add<mode>3_carryinC_zero): Ditto.
12754 (*add<mode>3_carryinC): Ditto.
12755 (add<mode>3_carryinV): Ditto.
12756 (*add<mode>3_carryinV_zero): Ditto.
12757 (*add<mode>3_carryinV): Ditto.
12758
12759 2018-07-19 Michael Collison <michael.collison@arm.com>
12760 Richard Henderson <rth@redhat.com>
12761
12762 * config/aarch64/aarch64-modes.def (CC_V): New.
12763 * config/aarch64/aarch64-protos.h
12764 (aarch64_addti_scratch_regs): Declare
12765 (aarch64_subvti_scratch_regs): Declare.
12766 (aarch64_expand_subvti): Declare.
12767 (aarch64_gen_unlikely_cbranch): Declare
12768 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
12769 for signed overflow using CC_Vmode.
12770 (aarch64_get_condition_code_1): Handle CC_Vmode.
12771 (aarch64_gen_unlikely_cbranch): New function.
12772 (aarch64_addti_scratch_regs): New function.
12773 (aarch64_subvti_scratch_regs): New function.
12774 (aarch64_expand_subvti): New function.
12775
12776 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12777
12778 * config/aarch64/aarch64-option-extensions.def: New entry for profile
12779 extension.
12780 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
12781 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
12782 extension.
12783
12784 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12785
12786 PR target/83009
12787 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12788 address check not strict.
12789
12790 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12791
12792 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
12793 Umq with Umn.
12794 (store_pair_lanes<mode>): Likewise.
12795 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
12796 enum value 'ADDR_QUERY_LDP_STP_N'.
12797 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
12798 (aarch64_print_address_internal): Add declaration.
12799 (aarch64_print_ldpstp_address): Remove.
12800 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
12801 (aarch64_print_operand): Change printing of 'y'.
12802 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
12803 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
12804 'true' rather than '1'.
12805 * config/aarch64/constraints.md (Uml): Likewise.
12806 (Uml): Rename to Umn.
12807 (Umq): Remove.
12808
12809 2018-07-19 Richard Biener <rguenther@suse.de>
12810
12811 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
12812 a trailing array.
12813 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
12814 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
12815 (vn_reference_hasher): Likewise.
12816 (struct vn_tables_s): Remove obstack and alloc-pool members.
12817 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
12818 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
12819 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
12820 (vn_reference_insert_pieces): Likewise.
12821 (alloc_vn_nary_op_noinit): Adjust.
12822 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
12823 (vn_phi_eq): Adjust.
12824 (shared_lookup_phiargs): Remove.
12825 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12826 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12827 (visit_reference_op_call): Likewise.
12828 (copy_nary, copy_phi, copy_reference): Remove.
12829 (process_scc): Rewind the obstack when iterating. Do not
12830 copy the elements to valid_info but just move them from one
12831 hashtable to the other.
12832 (allocate_vn_table): Adjust.
12833 (free_vn_table): Likewise.
12834 (init_scc_vn): Likewise.
12835 (free_scc_vn): Likewise.
12836
12837 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
12838
12839 PR target/86560
12840 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12841 indirect_return as function type attribute.
12842 (ix86_attribute_table): Change indirect_return to function
12843 type attribute.
12844 * doc/extend.texi: Update indirect_return attribute.
12845
12846 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
12847
12848 * wide-int.h (widest2_int): New.
12849 * gimple-fold.c (arith_overflowed_p): Use it.
12850 * tree.h (widest2_int_cst): New.
12851 * tree-vrp.c (wide_int_binop_overflow): Rename from
12852 vrp_int_const_binop.
12853 Rewrite to work on trees.
12854 (extract_range_from_multiplicative_op_1): Abstract code to...
12855 (wide_int_range_min_max): ...here.
12856 (wide_int_range_cross_product): ...and here.
12857 (extract_range_from_binary_expr_1): Abstract overflow code to...
12858 (wide_int_range_mult_wrapping): ...here.
12859 * tree-vrp.h (wide_int_range_cross_product): New.
12860 (wide_int_range_mult_wrapping): New.
12861
12862 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
12863 Julia Koval <julia.koval@intel.com>
12864
12865 * config/i386/x86-tune-costs.h (skylake_memcpy,
12866 skylake_memset): Replace rep_prefix with unrolling for size 512.
12867
12868 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
12869
12870 PR middle-end/86544
12871 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12872 comparision with EQ_EXPR in last stmt.
12873
12874 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
12875
12876 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12877 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12878 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12879 previously known as "PowerPC AltiVec Built-in Functions". Move
12880 some material to new subsubsections "PowerPC AltiVec Built-in
12881 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12882 ISA 2.07".
12883 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12884 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12885 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12886 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12887
12888 2018-07-18 Richard Biener <rguenther@suse.de>
12889
12890 PR tree-optimization/86557
12891 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12892 EXACT_DIV_EXPR.
12893
12894 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
12895
12896 * config/s390/s390.c (s390_function_profiler): Generate CFI.
12897
12898 2018-07-17 Jeff Law <law@redhat.com>
12899
12900 * config/arm/arm.c (get_label_padding): Update for recent
12901 changes to label_to_alignment.
12902
12903 PR tree-optimization/86010
12904 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12905
12906 * config/mips/mips.c (vr4130_align_insns): Update for recent
12907 changes to label_to_alignment.
12908
12909 * config/frv/frv.c (frv_label_align): Update for recent changes
12910 to label_to_alignment.
12911
12912 * config/nios2/nios2.c (nios2_label_align): Update for recent
12913 changes which dropped ALIGN_LABELS_LOG.
12914
12915 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
12916
12917 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12918 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12919
12920 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
12921
12922 * config/arc/arc.c (arc_label_align): Use align_labels instead of
12923 deprecated align_labels_log.
12924
12925 2018-07-17 Richard Biener <rguenther@suse.de>
12926
12927 PR lto/86456
12928 * dwarf2out.c (init_sections_and_labels): Always generate
12929 a debug_line_str_section for early LTO debug.
12930 (dwarf2out_finish): Reset debug_line_str_hash output early.
12931 Bump counter for extra dwarf5 .debug_loc labels to not conflict
12932 with fat LTO part.
12933 (dwarf2out_early_finish): Output debug_line_str.
12934
12935 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12936
12937 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12938 index register on z196 or later.
12939
12940 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12941
12942 * config/s390/s390.c (s390_default_align): Set default function
12943 alignment to 16.
12944 (s390_override_options_after_change): Call s390_default align.
12945 (s390_option_override_internal): Call s390_default_align.
12946 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12947
12948 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12949
12950 PR middle-end/86542
12951 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12952 to _looptemp_ clauses, other than the first two.
12953
12954 2018-07-17 Martin Liska <mliska@suse.cz>
12955
12956 * opts.c: Do not enable OPT_falign_* for -Os.
12957
12958 2018-07-17 Martin Liska <mliska@suse.cz>
12959
12960 * align.h (MAX_CODE_ALIGN): New.
12961 (MAX_CODE_ALIGN_VALUE): New.
12962 * common/config/i386/i386-common.c (ix86_handle_option):
12963 (MAX_CODE_ALIGN): Moved to align.h.
12964 * final.c (MAX_CODE_ALIGN): Likewise.
12965 * opts.c (parse_and_check_align_values):
12966 (MAX_CODE_ALIGN): Likewise.
12967 (MAX_CODE_ALIGN_VALUE): Likewise.
12968
12969 2018-07-17 Martin Liska <mliska@suse.cz>
12970
12971 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12972 in order to fulfil coding style.
12973 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12974 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12975 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12976 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12977 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12978 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12979 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12980 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12981 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12982
12983 2018-07-17 Martin Liska <mliska@suse.cz>
12984
12985 * align.h: New file.
12986 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12987 directly.
12988 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12989 align_flags of label_to_alignment.
12990 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12991 align_flags class.
12992 * config/m68k/m68k.c: Do not use removed align_labels_value and
12993 align_loops_value.
12994 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12995 (LOOP_ALIGN): Likewise.
12996 (LABEL_ALIGN): Likewise.
12997 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12998 Remove not used macro.
12999 (rs6000_loop_align): Change return type to align_flags.
13000 (rs6000_loop_align_max_skip): Remove.
13001 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
13002 Change return type to align_flags.
13003 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
13004 Remove not used macro.
13005 (rs6000_loop_align): Change return type to align_flags.
13006 (rs6000_loop_align_max_skip): Remove.
13007 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
13008 * config/rx/rx-protos.h (rx_align_for_label): Make it
13009 static function.
13010 * config/rx/rx.c (rx_align_for_label): Change return type
13011 to align_flags.
13012 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
13013 macro definitions.
13014 into align_flags class.
13015 (LABEL_ALIGN): Likewise.
13016 (LOOP_ALIGN): Likewise.
13017 * config/s390/s390.c (s390_label_align): Use align_flags
13018 class member.
13019 (s390_asm_output_function_label): Likewise.
13020 * config/sh/sh.c (sh_override_options_after_change):
13021 Use align_flags class directly without macros.
13022 (find_barrier): Likewise.
13023 (barrier_align): Likewise.
13024 (sh_loop_align): Likewise.
13025 * config/spu/spu.c (spu_option_override):
13026 Use align_flags_tuple::get_value instead of removed macros.
13027 (spu_sched_init): Likewise.
13028 * config/spu/spu.h (GTY): Likewise.
13029 * config/visium/visium.c (visium_option_override):
13030 Set "8" as default secondary alignment.
13031 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
13032 in order to guarantee secondary alignment of 8.
13033 * coretypes.h: Include align.h header file.
13034 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
13035 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
13036 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
13037 * doc/tm.texi.in: Likewise.
13038 * final.c (struct label_alignment): Remove not used structure.
13039 (LABEL_ALIGN): Change type to align_flags.
13040 (LOOP_ALIGN): Likewise.
13041 (JUMP_ALIGN): Likewise.
13042 (default_loop_align_max_skip): Remove.
13043 (default_label_align_max_skip): Likewise.
13044 (default_jump_align_max_skip): Likewise.
13045 (default_label_align_after_barrier_max_skip):
13046 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
13047 (LABEL_TO_MAX_SKIP): Remove.
13048 (label_to_alignment): Return align_flags type instead of integer.
13049 (label_to_max_skip): Remove.
13050 (align_fuzz): Use align_flags type.
13051 (compute_alignments): Use align_flags type and use align_flags::max
13052 to combine multiple alignments.
13053 (grow_label_align): Grow vec instead of C array.
13054 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
13055 (shorten_branches): Use align_flags type and use align_flags::max
13056 to combine multiple alignments.
13057 (final_scan_insn_1): Remove usage of secondary alignment that comes
13058 from label alignment, but instead use proper secondary alignment
13059 which is computed in grow_label_align.
13060 * flags.h (struct align_flags_tuple): Move to align.h.
13061 (struct align_flags): Likewise.
13062 (state_align_loops): Rename to align_loops.
13063 (state_align_jumps): Rename to align_jumps.
13064 (state_align_labels): Rename to align_labels.
13065 (state_align_functions): Rename to align_functions.
13066 (align_loops_log): Remove.
13067 (align_jumps_log): Remove.
13068 (align_labels_log): Remove.
13069 (align_functions_log): Remove.
13070 (align_loops_max_skip): Remove.
13071 (align_jumps_max_skip): Remove.
13072 (align_labels_max_skip): Remove.
13073 (align_functions_max_skip): Remove.
13074 (align_loops_value): Remove.
13075 (align_jumps_value): Remove.
13076 (align_labels_value): Remove.
13077 (align_functions_value): Remove.
13078 * output.h (label_to_alignment): Change return type to align_flags.
13079 (label_to_max_skip): Remove.
13080 * target.def: Remove loop_align_max_skip, label_align_max_skip,
13081 jump_align_max_skip macros.
13082 * targhooks.h (default_loop_align_max_skip): Remove.
13083 (default_label_align_max_skip): Likewise.
13084 (default_jump_align_max_skip): Likewise.
13085 (default_label_align_after_barrier_max_skip): Remove.
13086 * toplev.c (read_log_maxskip): Use ::normalize function.
13087 (parse_N_M): Remove not used argument and also call ::normalize.
13088 (parse_alignment_opts): Do not pass unused arguments.
13089 * varasm.c (assemble_start_function): Use directly align_functions
13090 instead of removed macros.
13091 * system.h: Do not poison removed macros.
13092
13093 2018-07-17 Jakub Jelinek <jakub@redhat.com>
13094
13095 PR middle-end/86539
13096 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
13097 and cond temporaries don't have reference type if iterator has
13098 pointer type. For init use &for_pre_body instead of pre_p if
13099 for_pre_body is non-empty.
13100
13101 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13102
13103 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
13104 double-double modes to SFmode directly directly.
13105 (trunc<mode>sf2_fprs): Delete.
13106
13107 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13108
13109 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
13110 for conversions between IFmode and the decimal floating point modes.
13111 (init_float128_ieee): Use the correct names for conversions between
13112 KFmode and the decimal floating point modes.
13113
13114 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13115
13116 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
13117 for the conversions between TDmode and IFmode.
13118 (init_float128_ieee): Use more correct names for the conversions
13119 between TDmode and KFmode.
13120
13121 2018-07-16 Jakub Jelinek <jakub@redhat.com>
13122
13123 PR tree-optimization/86526
13124 * builtins.c (expand_builtin_memcmp): Formatting fixes.
13125 (inline_expand_builtin_string_cmp): Likewise.
13126 (inline_string_cmp): Likewise. Use c_readstr instead of
13127 builtin_memcpy_read_str. Add unit_mode temporary.
13128
13129 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
13130
13131 PR middle-end/86528
13132 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
13133 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
13134
13135 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
13136
13137 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
13138 Alphabetize prototypes of built-in functions, separating out
13139 built-in functions that are listed in this section but should be
13140 described elsewhere.
13141
13142 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
13143
13144 PR target/86511
13145 * expmed.c (emit_store_flag): Do not emit setcc followed by a
13146 conditional move when trapping comparison was split to a
13147 non-trapping one (and vice versa).
13148
13149 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13150
13151 * config/s390/s390.c (s390_function_profiler): Generate nops
13152 instead of profiler call sequences.
13153 * config/s390/s390.opt: Add the new option.
13154
13155 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13156
13157 * config/s390/s390.c (s390_function_profiler): Generate
13158 __mcount_loc section.
13159 * config/s390/s390.opt: Add the new option.
13160
13161 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13162
13163 * common.opt: Add the new warning.
13164 * config/s390/s390.c (s390_function_profiler): Emit "brasl
13165 %r0,__fentry__" when -mfentry is specified.
13166 (s390_option_override_internal): Disallow -mfentry for 31-bit
13167 CPUs.
13168 * config/s390/s390.opt: Add the new option.
13169
13170 2018-07-16 Richard Biener <rguenther@suse.de>
13171
13172 PR lto/86523
13173 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
13174 for function-local FUNCTION_DECL and RESULT_DECL immediately.
13175
13176 2018-07-16 Martin Liska <mliska@suse.cz>
13177
13178 PR ipa/86529
13179 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
13180 to ::get_create.
13181
13182 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
13183
13184 * config/arc/arcHS.md: Update ARCHS scheduling rules.
13185
13186 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
13187
13188 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
13189 for ARCHS4x.
13190 * config/arc/arc-cpus.def (hs4x): New cpu.
13191 (hs4xd): Likewise.
13192 * config/arc/arc-tables.opt: Regenerate.
13193 * config/arc/arc.c (arc_sched_issue_rate): New function.
13194 (TARGET_SCHED_ISSUE_RATE): Define.
13195 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
13196 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
13197 fpu_cvt.
13198 (attr tune): Add ARCHS4x tune values.
13199 (attr tune_dspmpy): Define.
13200 (*tst): Correct instruction type.
13201 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
13202 * config/arc/arcHS4x.md: New file.
13203 * config/arc/fpu.md: Update instruction type attributes.
13204 * config/arc/t-multilib: Regenerate.
13205
13206 2018-07-16 Tom de Vries <tdevries@suse.de>
13207
13208 PR debug/86455
13209 * var-tracking.c (vt_initialize): Fix pre_dec handling.
13210
13211 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13212
13213 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
13214 early clobber.
13215
13216 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
13217
13218 PR tree-optimization/86514
13219 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
13220 conversion to a boolean type from a type with greater precision.
13221
13222 2018-07-16 Tom de Vries <tdevries@suse.de>
13223
13224 * var-tracking.c (vt_initialize): Print adjusted insn slim if
13225 dump_flags request TDF_SLIM.
13226
13227 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
13228
13229 * fold-const.c (int_const_binop_1): Abstract...
13230 (wide_int_binop): ...wide int code here.
13231 (poly_int_binop): ...poly int code here.
13232 Abstract the rest of int_const_binop_1 into int_const_binop.
13233 * fold-const.h (wide_int_binop): New.
13234 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
13235 Remove useless PLUS/MINUS_EXPR case.
13236 (zero_nonzero_bits_from_vr): Move wide int code...
13237 (zero_nonzero_bits_from_bounds): ...here.
13238 (extract_range_from_binary_expr_1): Move mask optimization code...
13239 (range_easy_mask_min_max): ...here.
13240 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
13241 (range_easy_mask_min_max): New.
13242
13243 2018-07-15 Jeff Law <law@redhat.com>
13244
13245 PR target/85993
13246 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
13247 block.
13248
13249 2018-07-14 Jim Wilson <jimw@sifive.com>
13250
13251 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
13252
13253 2018-07-14 Paul Koning <ni1d@arrl.net>
13254
13255 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
13256
13257 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
13258
13259 * lto-streamer-out.c (copy_function_or_variable): Dump info about
13260 copying section.
13261
13262 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
13263 Steve Munroe <munroesj52@gmail.com>
13264
13265 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
13266 (_mm_andnot_si128): Likewise.
13267 (_mm_or_si128): Likewise.
13268 (_mm_xor_si128): Likewise.
13269
13270 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
13271
13272 PR middle-end/78809
13273 * builtins.c (expand_builtin_memcmp): Inline the calls first
13274 when result_eq is false.
13275 (expand_builtin_strcmp): Inline the calls first.
13276 (expand_builtin_strncmp): Likewise.
13277 (inline_string_cmp): New routine. Expand a string compare
13278 call by using a sequence of char comparison.
13279 (inline_expand_builtin_string_cmp): New routine. Inline expansion
13280 a call to str(n)cmp/memcmp.
13281 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
13282 New option.
13283 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
13284
13285 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
13286
13287 * config/arm/driver-arm.c: Include arm-native.h.
13288 (host_detect_local_cpu): Use auto-generated data tables.
13289 (vendors, arm_cpu_table): Delete. Move part information to ...
13290 * config/arm/arm-cpus.in: ... here.
13291 * config/arm/parsecpu.awk (gen_native): New function.
13292 (vendor, part): New CPU fields.
13293 (END): Add support for building the native CPU detection tables.
13294 * config/arm/t-arm (arm-native.h): Add build rule.
13295 (driver-arm.o): Add dependency on arm-native.h.
13296
13297 2018-07-13 Richard Biener <rguenther@suse.de>
13298
13299 PR middle-end/85974
13300 * match.pd (addr1 - addr2): Allow either of the operand to
13301 have a conversion.
13302
13303 2018-07-13 Tom de Vries <tdevries@suse.de>
13304
13305 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
13306 in remap_ssa_name.
13307
13308 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
13309
13310 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
13311 arrays instead of numbered variables.
13312
13313 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
13314
13315 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
13316 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
13317
13318 2018-07-13 Richard Biener <rguenther@suse.de>
13319
13320 PR debug/86452
13321 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
13322 instead of get_context_die.
13323
13324 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
13325 Richard Biener <rguenther@suse.de>
13326
13327 PR middle-end/86489
13328 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
13329 that the loop latch destination where phi is defined.
13330
13331 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
13332
13333 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
13334 (riscv_expand_epilogue): Add assertion to check interrupt mode.
13335 (riscv_set_current_function): Extract getting interrupt type to new
13336 function.
13337 (riscv_get_interrupt_type): New function.
13338 (riscv_merge_decl_attributes): New function, checking interrupt type is
13339 same.
13340 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
13341
13342 2018-07-12 Paul Koning <ni1d@arrl.net>
13343
13344 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
13345 directive.
13346
13347 2018-07-12 Paul Koning <ni1d@arrl.net>
13348
13349 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
13350 zero reference, add doloop_end instead.
13351 * doc/md.texi (decrement_and_branch_until_zero): Remove.
13352 (Looping patterns): Remove decrement_and_branch_until_zero. Add
13353 detail for doloop_end.
13354
13355 2018-07-12 Martin Sebor <msebor@redhat.com>
13356
13357 PR c/86453
13358 * attribs.c (decl_attributes): Reject conflicting attributes before
13359 calling attribute handlers.
13360
13361 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
13362
13363 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
13364 parameter.
13365 (gcc::dump_manager::get_dump_file_name): likewise.
13366 (dump_begin): Likewise.
13367 * dumpfile.h (dump_begin): Update prototype.
13368 (gcc::dump_manager::get_dump_file_name,
13369 gcc::dump_manager::get_dump_file_name): Update prototype.
13370
13371 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13372
13373 * internal-fn.h (vectorizable_internal_fn_p): New function.
13374 * tree-vect-slp.c (compatible_calls_p): Likewise.
13375 (vect_build_slp_tree_1): Remove nops argument. Handle calls
13376 to internal functions.
13377 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
13378
13379 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13380
13381 * fold-const.h (inverse_conditions_p): Declare.
13382 * fold-const.c (inverse_conditions_p): New function.
13383 * match.pd: Use inverse_conditions_p. Add folds of view_converts
13384 that test the inverse condition of a conditional internal function.
13385 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
13386 * internal-fn.c (internal_fn_mask_index): Handle conditional
13387 internal functions.
13388 (vectorized_internal_fn_supported_p): New function.
13389 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
13390 (any_pred_load_store): Replace with...
13391 (need_to_predicate): ...this new variable.
13392 (redundant_ssa_names): New variable.
13393 (ifcvt_can_use_mask_load_store): Move initial checks to...
13394 (ifcvt_can_predicate): ...this new function. Handle tree codes
13395 for which a conditional internal function exists.
13396 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
13397 instead of ifcvt_can_use_mask_load_store. Update after variable
13398 name change.
13399 (predicate_load_or_store): New function, split out from
13400 predicate_mem_writes.
13401 (check_redundant_cond_expr): New function.
13402 (value_available_p): Likewise.
13403 (predicate_rhs_code): Likewise.
13404 (predicate_mem_writes): Rename to...
13405 (predicate_statements): ...this. Use predicate_load_or_store
13406 and predicate_rhs_code.
13407 (combine_blocks, tree_if_conversion): Update after above name changes.
13408 (ifcvt_local_dce): Handle redundant_ssa_names.
13409 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
13410 general conditional functions.
13411 * tree-vect-stmts.c (vectorizable_call): Likewise.
13412
13413 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13414 Alan Hayward <alan.hayward@arm.com>
13415 David Sherwood <david.sherwood@arm.com>
13416
13417 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
13418 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
13419 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
13420 plus and minus and convert them into IFN_COND_FMA-based sequences.
13421 (convert_mult_to_fma): Handle conditional plus and minus.
13422
13423 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13424
13425 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
13426 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
13427 (cond_fnms_optab): New optabs.
13428 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
13429 internal functions.
13430 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
13431 * internal-fn.h (get_conditional_internal_fn): Declare.
13432 (get_unconditional_internal_fn): Likewise.
13433 * internal-fn.c (cond_ternary_direct): New macro.
13434 (expand_cond_ternary_optab_fn): Likewise.
13435 (direct_cond_ternary_optab_supported_p): Likewise.
13436 (FOR_EACH_COND_FN_PAIR): Likewise.
13437 (get_conditional_internal_fn): New function.
13438 (get_unconditional_internal_fn): Likewise.
13439 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
13440 (gimple_match_op::gimple_match_op): Add a new overload for 5
13441 operands.
13442 (gimple_match_op::set_op): Likewise.
13443 (gimple_resimplify5): Declare.
13444 * genmatch.c (decision_tree::gen): Generate simplifications for
13445 5 operands.
13446 * gimple-match-head.c (gimple_simplify): Define an overload for
13447 5 operands. Handle calls with 5 arguments in the top-level overload.
13448 (convert_conditional_op): Handle conversions from unconditional
13449 internal functions to conditional ones.
13450 (gimple_resimplify5): New function.
13451 (build_call_internal): Pass a fifth operand.
13452 (maybe_push_res_to_seq): Likewise.
13453 (try_conditional_simplification): Try converting conditional
13454 internal functions to unconditional internal functions.
13455 Handle 3-operand unconditional forms.
13456 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
13457 Define ternary equivalents of the current rules for binary conditional
13458 internal functions.
13459 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
13460 ternary operations.
13461 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
13462 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
13463 (optab): Handle them.
13464 (SVE_COND_FP_TERNARY): New int iterator.
13465 (sve_fmla_op, sve_fmad_op): New int attributes.
13466 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
13467 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
13468 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
13469
13470 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13471
13472 * target.def (preferred_else_value): New target hook.
13473 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
13474 * doc/tm.texi: Regenerate.
13475 * targhooks.h (default_preferred_else_value): Declare.
13476 * targhooks.c (default_preferred_else_value): New function.
13477 * internal-fn.h (conditional_internal_fn_code): Declare.
13478 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
13479 (get_conditional_internal_fn): Use it.
13480 (conditional_internal_fn_code): New function.
13481 * gimple-match.h (gimple_match_cond): New struct.
13482 (gimple_match_op): Add a cond member function.
13483 (gimple_match_op::gimple_match_op): Update all forms to take a
13484 gimple_match_cond.
13485 * genmatch.c (expr::gen_transform): Use the same condition as res_op
13486 for the suboperation, but don't specify a particular else_value.
13487 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
13488 (visit_nary_op, visit_reference_op_load): Pass
13489 gimple_match_cond::UNCOND to the gimple_match_op constructor.
13490 * gimple-match-head.c: Include tree-eh.h
13491 (convert_conditional_op): New function.
13492 (maybe_resimplify_conditional_op): Likewise.
13493 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
13494 (gimple_resimplify2): Likewise.
13495 (gimple_resimplify3): Likewise.
13496 (gimple_resimplify4): Likewise.
13497 (maybe_push_res_to_seq): Return null for conditional operations.
13498 (try_conditional_simplification): New function.
13499 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
13500 constructor.
13501 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
13502 IFN_COND_* call.
13503 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
13504 function.
13505 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
13506
13507 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
13508
13509 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13510 DECL_FCONTEXT
13511 (hash_tree): Do not hash DECL_FCONTEXT
13512 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
13513 Do not stream DECL_FCONTEXT.
13514 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
13515 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
13516
13517 2018-07-12 Richard Biener <rguenther@suse.de>
13518
13519 PR debug/86462
13520 * dwarf2out.c (gen_block_die): Only output blocks when they have
13521 at least one !DECL_IGNORED_P variable.
13522
13523 2018-07-12 Richard Biener <rguenther@suse.de>
13524
13525 PR target/84829
13526 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
13527 Remove -mieee-fp handling.
13528
13529 2018-07-12 Richard Biener <rguenther@suse.de>
13530
13531 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
13532 left-over from last patch.
13533
13534 2018-07-12 Jakub Jelinek <jakub@redhat.com>
13535
13536 PR tree-optimization/86492
13537 * gimple-ssa-store-merging.c
13538 (imm_store_chain_info::coalesce_immediate_stores): Call
13539 check_no_overlap even for the merge_overlapping case. Formatting fix.
13540
13541 2018-07-12 Richard Biener <rguenther@suse.de>
13542
13543 PR middle-end/86479
13544 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
13545 move possibly trapping operations into the conditional.
13546
13547 2018-07-12 Richard Biener <rguenther@suse.de>
13548
13549 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
13550 (vn_lookup_simplify_result): Remove recursion limit applied
13551 here.
13552 (vn_nary_build_or_lookup_1): Adjust.
13553 (try_to_simplify): Likewise.
13554 * gimple-match-head.c (gimple_resimplify1): Instead apply one
13555 here.
13556 (gimple_resimplify2): Likewise.
13557 (gimple_resimplify3): Likewise.
13558 (gimple_resimplify4): Likewise.
13559
13560 2018-07-11 Jakub Jelinek <jakub@redhat.com>
13561
13562 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
13563 Use __mmask64 type instead of __mmask8 for __M argument.
13564 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
13565 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
13566 __U argument.
13567 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
13568 __mmask16 for __M argument.
13569 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
13570 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
13571 to __mmask16 instead of __mmask8.
13572 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
13573 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
13574 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
13575 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
13576 instead of __mmask16 for __U argument.
13577 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
13578 __mmask16 instead of __mmask8 for __U argument.
13579 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
13580 __U argument.
13581 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
13582 __mmask16.
13583 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
13584 argument.
13585 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
13586 __U argument.
13587 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
13588 __mmask16.
13589 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
13590 of __mmask16.
13591 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
13592 __U argument.
13593 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
13594 __U argument.
13595 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
13596 __U argument.
13597 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
13598 __U argument.
13599 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
13600 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
13601 return type as well as __M argument type and all casts from __mmask8
13602 to __mmask32.
13603 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
13604 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
13605 return type as well as __M argument type and all casts from __mmask8
13606 to __mmask16.
13607 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
13608 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
13609 return type as well as __M argument type and all casts from __mmask8
13610 to __mmask32.
13611 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
13612 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
13613 return type as well as __M argument type and all casts from __mmask8
13614 to __mmask16.
13615 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
13616 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
13617 __mmask16.
13618
13619 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
13620
13621 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
13622 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
13623 for __U argument.
13624
13625 2018-07-11 Paul Koning <ni1d@arrl.net>
13626
13627 * doc/md.texi (define_subst): Document how multiple occurrences of
13628 the same argument in the replacement pattern are handled.
13629
13630 2018-07-11 Paul Koning <ni1d@arrl.net>
13631
13632 * doc/extend.texi (Common Variable Attributes): Move "mode" into
13633 alphabetical order.
13634 (Common Type Attributes): Add "mode" attribute.
13635
13636 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
13637
13638 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
13639 stream DECL_ORIGINAL_TYPE.
13640 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
13641 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
13642 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
13643 Do not walk original type.
13644 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
13645 external decls.
13646 (write_ts_decl_non_common_tree_pointers): Do not stream
13647 DECL_ORIGINAL_TYPE
13648 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
13649 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
13650
13651 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13652
13653 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
13654 thread twice from the same starting edge.
13655
13656 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13657
13658 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
13659 * gimple.c (gimple_call_nonnull_result_p): ...here...
13660 (gimple_call_nonnull_arg): ...and here.
13661 * gimple.h (gimple_call_nonnull_result_p): New.
13662 (gimple_call_nonnull_arg): New.
13663
13664 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
13665
13666 * config/arm/arm-cpus.in: Move information from fpu field of each
13667 cpu definition to the isa field.
13668 * config/arm/parsecpu.awk (fpu): Delete match rule.
13669 (gen_comm_data): Don't add bits from the CPU's FPU entry.
13670
13671 2018-07-11 Richard Biener <rguenther@suse.de>
13672
13673 PR debug/86457
13674 * dwarf2out.c (init_sections_and_labels): Use
13675 output_asm_line_debug_info consistently.
13676 (dwarf2out_early_finish): Likewise.
13677 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
13678 type units.
13679
13680 2018-07-11 Richard Biener <rguenther@suse.de>
13681
13682 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
13683 Rework father_bb setting in a way to avoid propagating constants
13684 multiple times on a loop body.
13685
13686 2018-07-10 Mark Wielaard <mark@klomp.org>
13687
13688 PR debug/86459
13689 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
13690
13691 2018-07-10 Richard Biener <rguenther@suse.de>
13692
13693 * hash-map.h (hash_map::iterator::operator*): Return
13694 references to key and value.
13695
13696 2018-07-10 Jakub Jelinek <jakub@redhat.com>
13697
13698 PR c++/86443
13699 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13700 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13701 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13702 (gimplify_omp_for): For composite loops, move outer
13703 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13704 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
13705 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
13706 TREE_LIST for both the original class iterator and the "last" helper
13707 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
13708 loop, remember has_decl_expr from outer composite loops for the
13709 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13710
13711 2018-07-09 Martin Sebor <msebor@redhat.com>
13712
13713 PR middle-end/77357
13714 PR middle-end/86428
13715 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13716 accessing implicitly initialized array elements.
13717 * expr.c (string_constant): Handle string initializers of
13718 character arrays within aggregates.
13719 * gimple-fold.c (fold_array_ctor_reference): Add argument.
13720 Store element offset. As a special case, handle zero size.
13721 (fold_nonarray_ctor_reference): Same.
13722 (fold_ctor_reference): Add argument. Store subobject offset.
13723 * gimple-fold.h (fold_ctor_reference): Add argument.
13724
13725 2018-07-09 Paul Koning <ni1d@arrl.net>
13726
13727 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13728 (pdp11_insn_cost): New function.
13729 (pdp11_md_asm_adjust): New function.
13730 (TARGET_INVALID_WITHIN_DOLOOP): Define.
13731 (pdp11_rtx_costs): Update to match machine better.
13732 (output_addr_const_pdp11): Correct format mismatch warnings.
13733 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13734 * config/pdp11/pdp11.md: General change to add base_cost and/or
13735 length attributes for use by new pdp11_insn_cost function.
13736 (MIN_BRANCH): Correct definition.
13737 (MIN_SOB): Ditto.
13738 (doloop_end): Use standard pattern name for looping pattern.
13739 (doloop_end_nocc): New.
13740 (movsf): Add another constraint alternative.
13741 (zero_extendqihi2): Add constraint alternatives for not in place
13742 extend.
13743 (zero_extendhisi2): Remove.
13744 (shift patterns): Add CC handling variants.
13745 (bswaphi2): New.
13746 (bswapsi2): New.
13747 (rothi3): New.
13748 (define_peephole2): New peephole to recognize mov that sets CC for
13749 subsequent test.
13750
13751 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13752
13753 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13754 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13755 wi::add.
13756
13757 2018-07-09 Jakub Jelinek <jakub@redhat.com>
13758
13759 PR c/86420
13760 * real.c (real_nextafter): Return true if result is denormal.
13761
13762 2018-07-09 Martin Liska <mliska@suse.cz>
13763
13764 * common.opt: Add back wrongly removed attribute.
13765
13766 2018-07-09 Richard Biener <rguenther@suse.de>
13767
13768 PR debug/86413
13769 * dwarf2out.c (gen_block_die): For an early generated DIE
13770 always output high/low PC attributes.
13771
13772 2018-07-09 Tom de Vries <tdevries@suse.de>
13773
13774 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
13775 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
13776 onto VAR_DECL with abstract origin.
13777
13778 2018-07-07 Jim Wilson <jimw@sifive.com>
13779
13780 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
13781
13782 2018-07-07 Tom de Vries <tdevries@suse.de>
13783
13784 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
13785
13786 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
13787
13788 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
13789 overflow_type.
13790 (combine_bound): Use wide-int overflow calculation instead of
13791 rolling our own.
13792 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
13793 overflow_type.
13794 * fold-const.c (int_const_binop_2): Same.
13795 (extract_muldiv_1): Same.
13796 (fold_div_compare): Same.
13797 (fold_abs_const): Same.
13798 * match.pd: Same.
13799 * poly-int.h (add): Same.
13800 (sub): Same.
13801 (neg): Same.
13802 (mul): Same.
13803 * predict.c (predict_iv_comparison): Same.
13804 * profile-count.c (slow_safe_scale_64bit): Same.
13805 * simplify-rtx.c (simplify_const_binary_operation): Same.
13806 * tree-chrec.c (tree_fold_binomial): Same.
13807 * tree-data-ref.c (split_constant_offset_1): Same.
13808 * tree-if-conv.c (idx_within_array_bound): Same.
13809 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
13810 * tree-ssa-phiopt.c (minmax_replacement): Same.
13811 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
13812 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
13813 * vr-values.c (vr_values::adjust_range_with_scev): Same.
13814 * wide-int.cc (wi::add_large): Same.
13815 (wi::mul_internal): Same.
13816 (wi::sub_large): Same.
13817 (wi::divmod_internal): Same.
13818 * wide-int.h: Change overflow type to overflow_type for neg, add,
13819 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
13820 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
13821 mul_internal, divmod_internal.
13822 (overflow_type): New enum.
13823 (accumulate_overflow): New.
13824
13825 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
13826
13827 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13828 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13829
13830 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13831
13832 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13833 argument is checked for zero before entering loop, avoid checking again.
13834
13835 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13836
13837 * gimplify.h (generic_expr_could_trap_p): Set as global function.
13838 * gimplify.h (generic_expr_could_trap_p): Likwise.
13839 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13840
13841 2018-07-06 Jakub Jelinek <jakub@redhat.com>
13842
13843 PR tree-optimization/86401
13844 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13845 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13846 (fold_bit_and_mask): ... here. New helper function for match.pd.
13847 * fold-const.h (fold_bit_and_mask): Declare.
13848 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13849
13850 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
13851
13852 PR target/86324
13853 * target.def (translate_mode_attribute): New hook.
13854 * targhooks.h (default_translate_mode_attribute): Declare.
13855 * targhooks.c (default_translate_mode_attribute): New function.
13856 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13857 * doc/tm.texi: Regenerate.
13858 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13859 (rs6000_translate_mode_attribute): New function.
13860
13861 2018-07-06 Paul Koning <ni1d@arrl.net>
13862
13863 * doc/md.texi (define_split): Document DONE and FAIL.
13864 (define_peephole2): Ditto.
13865
13866 2018-07-05 Jeff Law <law@redhat.com>
13867
13868 PR tree-optimization/86010
13869 * tree-ssa-dse.c (compute_trims): More aggressively trim at
13870 both the head and tail of mem* and str* calls.
13871
13872 2018-07-05 Jim Wilson <jimw@sifive.com>
13873
13874 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13875
13876 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
13877
13878 * config/aarch64/aarch64-simd.md: correct flags text for
13879 MIN_EXPR replacement.
13880
13881 2018-07-05 James Clarke <jrtc27@jrtc27.com>
13882
13883 * configure: Regenerated.
13884
13885 2018-07-05 Carl Love <cel@us.ibm.com>
13886
13887 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13888 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13889 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13890 VSX_BUILTIN_DOUBLEL_V4SF.
13891
13892 2018-07-05 Martin Sebor <msebor@redhat.com>
13893
13894 PR c++/86400
13895 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13896 than its domain to compute its the upper bound of a char array.
13897
13898 2018-07-05 Nathan Sidwell <nathan@acm.org>
13899
13900 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13901 * doc/cpp.texi: Update comment.
13902 * doc/tm.texi: Rebuilt.
13903 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13904 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13905 * doc/extend.texi (Backwards Compatibility): Clarify it is system
13906 headers affected by extern "C".
13907 * system.h: Poison NO_IMPLICIT_EXTERN_C.
13908 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13909 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13910 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13911 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13912 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13913 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13914 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13915 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13916 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13917 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13918 config/sparc/sp64-elf.h, config/spu/spu.h,
13919 config/stormy16/stormy16.h, config/v850/v850.h,
13920 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13921 define NO_IMPLICIT_EXTERN_C.
13922 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13923
13924 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13925
13926 PR target/84711
13927 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13928 instead of GET_MODE_SIZE when comparing Units.
13929
13930 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13931
13932 PR target/84711
13933 * rtlanal.c (set_noop_p): Constrain on mode change,
13934 include hard-reg-set.h
13935
13936 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13937
13938 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13939
13940 2018-07-05 Jakub Jelinek <jakub@redhat.com>
13941
13942 Revert
13943 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13944
13945 PR sanitizer/84250
13946 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13947 libasan.
13948 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13949
13950 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13951
13952 PR sanitizer/84250
13953 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13954 libasan.
13955 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13956
13957 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
13958
13959 PR middle-end/86380
13960 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13961
13962 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
13963
13964 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13965 neg_*_op* variables.
13966
13967 2018-07-04 Martin Liska <mliska@suse.cz>
13968
13969 * tree-switch-conversion.c: Define
13970 max_ratio_for_speed and max_ratio_for_size constants.
13971
13972 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13973 Martin Liska <mliska@suse.cz>
13974
13975 PR middle-end/66240
13976 PR target/45996
13977 PR c/84100
13978 * common.opt: Rename align options with 'str_' prefix.
13979 * common/config/i386/i386-common.c (set_malign_value): New
13980 function.
13981 (ix86_handle_option): Use it to set -falign-* options/
13982 * config/aarch64/aarch64-protos.h (struct tune_params): Change
13983 type from int to string.
13984 * config/aarch64/aarch64.c: Update default values from int
13985 to string.
13986 * config/alpha/alpha.c (alpha_override_options_after_change):
13987 Likewise.
13988 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13989 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13990 max skip conditionally.
13991 * config/i386/freebsd.h (SUBALIGN_LOG): New.
13992 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13993 max skip conditionally.
13994 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13995 max skip conditionally.
13996 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13997 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13998 max skip conditionally.
13999 * config/i386/i386.c (struct ptt): Change type from int to
14000 string.
14001 (ix86_default_align): Set default values.
14002 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
14003 max skip conditionally.
14004 * config/i386/iamcu.h (SUBALIGN_LOG): New.
14005 (ASM_OUTPUT_MAX_SKIP_ALIGN):
14006 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
14007 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14008 max skip conditionally.
14009 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
14010 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
14011 * config/i386/x86-64.h (SUBALIGN_LOG): New.
14012 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14013 max skip conditionally.
14014 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14015 * config/ia64/ia64.c (ia64_option_override): Set default values
14016 for alignment options.
14017 * config/m68k/m68k.c: Handle new str_align_* options.
14018 * config/mips/mips.c (mips_set_compression_mode): Change
14019 type of constants.
14020 (mips_option_override): Set default values for options.
14021 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
14022 Likewise.
14023 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14024 Likewise.
14025 * config/rx/rx.c (rx_option_override): Likewise.
14026 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
14027 (LABEL_ALIGN): Use align_labels_log.
14028 (LOOP_ALIGN): Use align_loops_align.
14029 * config/s390/s390.c (s390_asm_output_function_label): Use new
14030 macros.
14031 * config/sh/sh.c (sh_override_options_after_change):
14032 Change type of constants.
14033 * config/spu/spu.c (spu_sched_init): Likewise.
14034 * config/sparc/sparc.c (sparc_option_override): Set default
14035 values for options.
14036 * config/visium/visium.c (visium_option_override): Likewise.
14037 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
14038 emit p2align format with last argument if it's not needed.
14039 * doc/invoke.texi: Document extended format of -falign-*.
14040 * final.c: Use align_labels alignment.
14041 * flags.h (struct target_flag_state): Change type to use
14042 align_flags.
14043 (struct align_flags_tuple): New.
14044 (struct align_flags): Likewise.
14045 (align_loops_log): Redefine macro to use new types.
14046 (align_loops_max_skip): Redefine macro to use new types.
14047 (align_jumps_log): Redefine macro to use new types.
14048 (align_jumps_max_skip): Redefine macro to use new types.
14049 (align_labels_log): Redefine macro to use new types.
14050 (align_labels_max_skip): Redefine macro to use new types.
14051 (align_functions_log): Redefine macro to use new types.
14052 (align_loops): Redefine macro to use new types.
14053 (align_jumps): Redefine macro to use new types.
14054 (align_labels): Redefine macro to use new types.
14055 (align_functions): Redefine macro to use new types.
14056 (align_functions_max_skip): Redefine macro to use new types.
14057 (align_loops_value): New macro.
14058 (align_jumps_value): New macro.
14059 (align_labels_value): New macro.
14060 (align_functions_value): New macro.
14061 * function.c (invoke_set_current_function_hook): Propagate
14062 alignment values from flags to global variables default in
14063 topleev.h.
14064 * ipa-icf.c (sem_function::equals_wpa): Use
14065 cl_optimization_option_eq instead of memcmp.
14066 * lto-streamer.h (cl_optimization_stream_out): Support streaming
14067 of string types.
14068 (cl_optimization_stream_in): Likewise.
14069 * optc-save-gen.awk: Support strings in cl_optimization.
14070 * opth-gen.awk: Likewise.
14071 * opts.c (finish_options): Remove error checking of invalid
14072 value ranges.
14073 (MAX_CODE_ALIGN): Remove.
14074 (MAX_CODE_ALIGN_VALUE): Likewise.
14075 (parse_and_check_align_values): New function.
14076 (check_alignment_argument): Likewise.
14077 (common_handle_option): Use check_alignment_argument.
14078 * opts.h (parse_and_check_align_values): Declare.
14079 * toplev.c (init_alignments): Remove.
14080 (read_log_maxskip): New.
14081 (parse_N_M): Likewise.
14082 (parse_alignment_opts): Likewise.
14083 (backend_init_target): Remove usage of init_alignments.
14084 * toplev.h (parse_alignment_opts): Declare.
14085 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
14086 argument.
14087 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
14088 * tree.c (cl_option_hasher::equal): New.
14089 * varasm.c: Use new global macros.
14090
14091 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
14092
14093 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
14094 Use a simpler align directive also if MAXSKIP = ALIGN-1.
14095 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14096 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14097 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14098 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14099 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
14100 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
14101 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
14102 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14103 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14104 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14105 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14106
14107 2018-07-04 Martin Liska <mliska@suse.cz>
14108 Jonathan Wakely <jwakely@redhat.com>
14109
14110 * coverage.c: Use correct type.
14111 * doc/invoke.texi: Language correction.
14112
14113 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
14114
14115 PR target/85620
14116 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
14117 ENDBRANCH for non-tail call which may return via indirect branch.
14118 * doc/extend.texi: Document indirect_return attribute.
14119
14120 2018-07-03 Martin Sebor <msebor@redhat.com>
14121
14122 PR tree-optimization/86274
14123 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
14124 precondition.
14125 (format_floating): Correct handling of infinities and NaNs.
14126
14127 2018-07-03 Martin Sebor <msebor@redhat.com>
14128
14129 * print-tree.c (print_real_cst): New function.
14130 (print_node_brief): Call it.
14131 (print_node): Ditto.
14132
14133 2018-07-03 Jeff Law <law@redhat.com>
14134
14135 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
14136 into a single pattern.
14137
14138 * config/h8300/h8300.md (ors code_iterator): New.
14139 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
14140 a single pattern and single splitter.
14141 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
14142 (iorqi3_1, xorqi3_1): Likewise.
14143 (iorqi3, xorqi3 expanders): Similarly.
14144
14145 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
14146 (movmd_internal) into a single pattern using the P mode iterator.
14147 (movmd splitters): Similarly.
14148 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
14149 (movsd splitters): Similarly.
14150
14151 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
14152 ADDB, ADDW and ADDL into a single ADD attribute which selects the
14153 right table based on the size of the operand.
14154 * config/h8300/h8300.md (length_table): Corresponding changes. All
14155 references to "addb", "addw" and "addl" changed to "add".
14156 (btst patterns): Merge two variants into a single pattern.
14157 (tstqi, tsthi): Likewise.
14158 (addhi3_incdec, addsi3_incdec): Likewise.
14159 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
14160 (mulhi3, mulsi3): Likewise.
14161 (udivhi3, udivsi3): Likewise.
14162 (divhi3, divsi3): Likewise.
14163 (andorqi3, andorhi3, andorsi3): Likewise.
14164
14165 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
14166
14167 PR target/85694
14168 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
14169 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
14170
14171 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14172
14173 PR tree-optimization/85694
14174 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
14175 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
14176 UNSPEC_URHADD.
14177 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
14178 (<u>avg<mode>3_ceil): New patterns.
14179
14180 2018-07-03 David Malcolm <dmalcolm@redhat.com>
14181
14182 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
14183 scan-tree-dump directive.
14184 * gcc.dg/vect/slp-perm-2.c: Likewise.
14185 * gcc.dg/vect/slp-perm-3.c: Likewise.
14186 * gcc.dg/vect/slp-perm-5.c: Likewise.
14187 * gcc.dg/vect/slp-perm-6.c: Likewise.
14188 * gcc.dg/vect/slp-perm-7.c: Likewise.
14189 * gcc.dg/vect/slp-perm-8.c: Likewise.
14190
14191 2018-07-03 Marek Polacek <polacek@redhat.com>
14192
14193 PR middle-end/86202
14194 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
14195
14196 2018-07-03 Richard Biener <rguenther@suse.de>
14197
14198 PR ipa/86389
14199 * tree-ssa-structalias.c (find_func_clobbers): Properly
14200 handle indirect calls.
14201
14202 2018-07-03 Jeff Law <law@redhat.com>
14203
14204 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
14205 (shifts): New code iterator.
14206 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
14207 expander. Fix HImode handling on H8/SX.
14208 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
14209 (subqi3, subhi3, subsi3 expanders): Likewise.
14210 (andqi3, andhi3, andsi3 expanders): Likewise.
14211 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
14212 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
14213 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
14214 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
14215 (zero_extendqihi2, zero_extendqisi2): Likewise.
14216 (extendqihi2, extendqisi2): Likewise.
14217 (rotlqi3, rotlhi3, rotlsi3): Likewise.
14218 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
14219 (rotlqi3_1, rotlhi3_1): Likewise.
14220 (logicalhi3_sn, logicalsi3_sn): Likewise.
14221 (logicalhi3, logicalsi3): Likewise.
14222
14223 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14224
14225 * tree-vect-patterns.c (vect_recog_rotate_pattern)
14226 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14227 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
14228 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
14229 type to append_pattern_def_seq instead of creating a stmt_vec_info
14230 directly.
14231 (build_mask_conversion): Likewise. Remove vinfo argument.
14232 (vect_add_conversion_to_patterm): Likewise, renaming to...
14233 (vect_add_conversion_to_pattern): ...this.
14234 (vect_recog_mask_conversion_pattern): Update call to
14235 build_mask_conversion. Pass the vector type to
14236 append_pattern_def_seq here too.
14237 (vect_recog_gather_scatter_pattern): Update call to
14238 vect_add_conversion_to_pattern.
14239
14240 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14241
14242 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
14243 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14244 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
14245 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
14246 STMT_VINFO_PATTERN_DEF_SEQ to null here.
14247 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
14248 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
14249 append_pattern_def_seq instead of new_pattern_def_seq.
14250 (vect_recog_divmod_pattern): Do both of the above.
14251 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
14252 is null.
14253
14254 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14255
14256 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
14257 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
14258 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
14259 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
14260 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
14261 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14262 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
14263 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14264 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14265 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
14266 parameter with a single stmt_vec_info.
14267 (vect_recog_func_ptr): Likewise.
14268 (vect_recog_gather_scatter_pattern): Likewise, folding in...
14269 (vect_try_gather_scatter_pattern): ...this.
14270 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
14271 the stmt_vec_info of the statement to be matched. Don't clear
14272 STMT_VINFO_RELATED_STMT.
14273 (vect_pattern_recog): Update call accordingly.
14274
14275 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14276
14277 PR tree-optimization/85694
14278 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
14279 (uavgM3_ceil): Document new optabs.
14280 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
14281 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
14282 functions.
14283 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
14284 (savg_ceil_optab): New optabs.
14285 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
14286 (vect_vect_recog_func_ptrs): Add it.
14287 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
14288 constant directly from the associated lhs.
14289
14290 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14291
14292 * tree-vect-patterns.c (vect_split_statement): New function.
14293 (vect_convert_input): Use it to try to split an existing cast.
14294
14295 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14296
14297 * poly-int.h (print_hex): New function.
14298 * dumpfile.h (dump_dec, dump_hex): Declare.
14299 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
14300 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
14301 min_input_precision, operation_precision and operation_sign.
14302 * tree-vect-patterns.c (vect_get_range_info): New function.
14303 (vect_same_loop_or_bb_p, vect_single_imm_use)
14304 (vect_operation_fits_smaller_type): Delete.
14305 (vect_look_through_possible_promotion): Add an optional
14306 single_use_p parameter.
14307 (vect_recog_over_widening_pattern): Rewrite to use new
14308 stmt_vec_info infomration. Handle one operation at a time.
14309 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
14310 (vect_truncatable_operation_p, vect_set_operation_type)
14311 (vect_set_min_input_precision): New functions.
14312 (vect_determine_min_output_precision_1): Likewise.
14313 (vect_determine_min_output_precision): Likewise.
14314 (vect_determine_precisions_from_range): Likewise.
14315 (vect_determine_precisions_from_users): Likewise.
14316 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
14317 (vect_vect_recog_func_ptrs): Put over_widening first.
14318 Add cast_forwprop.
14319 (vect_pattern_recog): Call vect_determine_precisions.
14320
14321 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14322
14323 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
14324 statements that have been replaced by further pattern statements.
14325 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
14326
14327 2018-07-03 Richard Biener <rguenther@suse.de>
14328
14329 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
14330 always set *dt. Dump vectype in vectype overload.
14331 * dumpfile.h (dump_gimple_expr): New function.
14332 (dump_gimple_expr_loc): Likewise.
14333 * dumpfile.c (dump_gimple_expr): New function.
14334 (dump_gimple_expr_loc): Likewise.
14335
14336 2018-07-02 Jeff Law <law@redhat.com>
14337
14338 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
14339 the H8/300, H8/300H and H8/S variants into a single pattern.
14340 (movhi_h8300, movqi_h8300hs): Similarly.
14341 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
14342 (QHI mode iterator): New.
14343
14344 * config/h8300/h8300.md: Remove trailing whitespace.
14345
14346 2018-07-02 Jim Wilson <jimw@sifive.com>
14347
14348 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
14349 instead of emit_insn for interrupt returns.
14350 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
14351 (riscv_sret, riscv_uret): Likewise.
14352
14353 2018-07-02 David Malcolm <dmalcolm@redhat.com>
14354
14355 * pretty-print.c (selftest::test_pp_format): Move save and restore
14356 of quotes to class auto_fix_quotes, and add an instance.
14357 * selftest.c: Include "intl.h".
14358 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
14359 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
14360 * selftest.h (selftest::auto_fix_quotes): New class.
14361
14362 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
14363
14364 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
14365 (aarch64_sve_prepare_conditional_op): Remove.
14366 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
14367 Allow aarch64_simd_reg_or_zero as select operand; remove
14368 the aarch64_sve_prepare_conditional_op call.
14369 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
14370 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14371 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
14372 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
14373 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
14374 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
14375 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
14376 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
14377 and a splitters to match all of the *_any patterns.
14378 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
14379
14380 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
14381 (SVE_COND_FP_BINARY_REV): Remove.
14382 (sve_int_op_rev, sve_fp_op_rev): New.
14383 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
14384 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
14385 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
14386 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
14387 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
14388 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
14389 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
14390 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
14391 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
14392
14393 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
14394 Remove match_dup 1 from the inner unspec.
14395 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14396
14397 * config/aarch64/aarch64.md (movprfx): New attr.
14398 (length): Default movprfx to 8.
14399 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
14400 (*madd<SVE_I>, *msub<SVE_I): Likewise.
14401 (*<su>mul<SVE_I>3_highpart): Likewise.
14402 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
14403 (*v<ASHIFT><SVE_I>3): Likewise.
14404 (*<su><MAXMIN><SVE_I>3): Likewise.
14405 (*<su><MAXMIN><SVE_F>3): Likewise.
14406 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
14407 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
14408 (*div<SVE_F>4): Likewise.
14409
14410 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
14411
14412 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
14413 in dump string.
14414
14415 2018-07-02 Richard Biener <rguenther@suse.de>
14416
14417 PR tree-optimization/86363
14418 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
14419 memset argument refers to a non-variable address.
14420
14421 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14422
14423 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
14424 {PLUS,MINUS}_EXPR code to...
14425 (adjust_symbolic_bound): ...here,
14426 (combine_bound): ...here,
14427 (set_value_range_with_overflow): ...and here.
14428
14429 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14430
14431 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
14432 code...
14433 (extract_range_from_abs_expr): ...here.
14434
14435 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
14436
14437 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
14438 -fno-omit-frame-pointer when not optimizing.
14439
14440 2018-07-02 Martin Liska <mliska@suse.cz>
14441
14442 PR ipa/86279
14443 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
14444 (propagate_nothrow): Likewise.
14445
14446 2018-07-02 Martin Liska <mliska@suse.cz>
14447
14448 PR ipa/86323
14449 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
14450
14451 2018-07-02 David Malcolm <dmalcolm@redhat.com>
14452
14453 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
14454 function in r262149, changing "loc" param from source_location to
14455 const dump_location_t &.
14456 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
14457 declaration, as above.
14458
14459 2018-07-01 Paul Koning <ni1d@arrl.net>
14460
14461 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14462 -munit-asm, -mgnu-asm, -mdec-asm.
14463 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
14464 (pdp11_output_labelref): New.
14465 (pdp11_output_def): New.
14466 (pdp11_output_addr_vec_elt): New.
14467 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
14468 %# and %@ format codes.
14469 (pdp11_option_override): New.
14470 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
14471 (pdp11_output_ident): New.
14472 (pdp11_asm_named_section): New.
14473 (pdp11_asm_init_sections): New.
14474 (pdp11_file_start): New.
14475 (pdp11_file_end): New.
14476 (output_ascii): Use .ascii/.asciz for -mdec-asm.
14477 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
14478 %o, like %c but octal.
14479 (pdp11_option_override): New.
14480 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
14481 -mdec-asm.
14482 (DATA_SECTION_ASM_OP): Ditto.
14483 (READONLY_DATA_SECTION_ASM_OP): New.
14484 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
14485 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
14486 (ASM_OUTPUT_LABELREF): Ditto.
14487 (ASM_OUTPUT_DEF): Ditto.
14488 (ASM_OUTPUT_EXTERNAL): New.
14489 (ASM_OUTPUT_SOURCE_FILENAME): New.
14490 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
14491 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
14492 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
14493 %# and %@ format codes.
14494 * config/pdp11/pdp11.opt (mgnu-asm): New.
14495 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
14496 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
14497 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
14498
14499 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
14500
14501 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
14502 dereferencing path[] beyond its length.
14503 (debug_path): New.
14504 (debug_all_paths): New.
14505 (rewire_first_differing_edge): New.
14506 (adjust_paths_after_duplication): New.
14507 (duplicate_thread_path): Call adjust_paths_after_duplication.
14508 Add new argument.
14509 (thread_through_all_blocks): Add new argument to
14510 duplicate_thread_path.
14511
14512 2018-06-30 Jim Wilson <jimw@sifive.com>
14513
14514 * config/riscv/predicates.md (p2m1_shift_operand): New.
14515 (high_mask_shift_operand): New.
14516 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
14517 pattern using p2m1_shift_operand.
14518 (lshsi3_zero_extend_3+2): New combiner pattern using
14519 high_mask_shift_operand.
14520
14521 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14522
14523 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
14524 split out from...
14525 (vect_recog_rotate_pattern): ...here.
14526 (vect_convert_input): Try to insert casts of invariants in the
14527 preheader.
14528 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
14529 preheader to be empty.
14530
14531 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14532
14533 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
14534 vector type. If given, install it in the new statement's
14535 STMT_VINFO_VECTYPE.
14536 (vect_element_precision): New function.
14537 (vect_unpromoted_value): New struct.
14538 (vect_unpromoted_value::vect_unpromoted_value): New function.
14539 (vect_unpromoted_value::set_op): Likewise.
14540 (vect_look_through_possible_promotion): Likewise.
14541 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
14542 (vect_widened_op_tree, vect_convert_input): Likewise.
14543 (vect_convert_inputs, vect_convert_output): Likewise.
14544 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
14545 to handle the optional cast of the multiplication result and
14546 vect_widened_op_tree to detect the widened multiplication itself.
14547 Do not require the input and output of promotion casts to have
14548 the same sign, but base the signedness of the operation on the
14549 input rather than the result. If the pattern includes two
14550 promotions, check that those promotions have the same sign.
14551 Do not restrict the MULT_EXPR handling to a double-width result;
14552 handle quadruple-width results and wider. Use vect_convert_inputs
14553 to convert the inputs to the common type.
14554 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
14555 to handle the optional cast of the ABS result. Also allow a sign
14556 change or a sign extension between the ABS and MINUS.
14557 Use vect_widened_op_tree to detect the widened subtraction and use
14558 vect_convert_inputs to convert the inputs to the common type.
14559 (vect_handle_widen_op_by_const): Delete.
14560 (vect_recog_widen_op_pattern): New function.
14561 (vect_recog_widen_mult_pattern): Use it.
14562 (vect_recog_widen_shift_pattern): Likewise.
14563 (vect_recog_widen_sum_pattern): Use
14564 vect_look_through_possible_promotion to handle the promoted
14565 PLUS_EXPR operand.
14566
14567 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14568
14569 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
14570 the containing gimple_seq *.
14571 * gimple-iterator.h (gsi_for_stmt): Declare it.
14572 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
14573 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
14574 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14575 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14576 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
14577 checks.
14578 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14579 split out from...
14580 (vect_mark_pattern_stmts): ...here. Handle cases in which the
14581 statement being replaced is part of an existing pattern
14582 definition sequence, inserting the new pattern statements before
14583 the original one.
14584 (vect_pattern_recog_1): Don't return a bool. If the statement
14585 is already part of a pattern, instead apply pattern matching
14586 to the pattern definition statements. Don't clear the
14587 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
14588 (vect_pattern_recog): Don't break after the first match;
14589 continue processing the pattern definition statements instead.
14590 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
14591
14592 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14593
14594 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14595 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14596 (vect_recog_widen_sum_pattern): Use it.
14597
14598 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14599
14600 * tree-vect-loop.c (vectorizable_reduction): Assert that the
14601 phi is not a pattern statement and has not been replaced by
14602 a pattern statement.
14603 * tree-vect-patterns.c (type_conversion_p): Don't check
14604 STMT_VINFO_IN_PATTERN_P.
14605 (vect_recog_vector_vector_shift_pattern): Likewise.
14606 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
14607 the pattern statement rather than the original statement; check
14608 directly for a WIDEN_MULT_EXPR here.
14609 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
14610 vect_is_simple_use to return the pattern statement rather
14611 than the original statement; use is_pattern_stmt_p to check
14612 for such a pattern statement.
14613 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
14614 to return the pattern statement rather than the original statement;
14615 don't do the same transformation here.
14616 (vect_is_simple_use): If the defining statement has been replaced
14617 by a pattern statement, return the pattern statement instead.
14618 Remove the corresponding (local) transformation from the vectype
14619 overload.
14620
14621 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14622
14623 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
14624 end and default to null.
14625 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14626 (vectorizable_reduction): Update calls accordingly, dropping the
14627 gimple ** argument if the passed-back statement isn't needed.
14628 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
14629 (vect_recog_rotate_pattern): Likewise.
14630 (vect_recog_mask_conversion_pattern): Likewise.
14631 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14632 (vect_mask_constant_operand_p): Likewise.
14633 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
14634 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
14635 (get_group_load_store_type, get_load_store_type): Likewise.
14636 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
14637 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
14638 (vectorizable_conversion, vectorizable_assignment): Likewise.
14639 (vectorizable_shift, vectorizable_operation): Likewise.
14640 (vectorizable_store, vect_is_simple_cond): Likewise.
14641 (vectorizable_condition, vectorizable_comparison): Likewise.
14642 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
14643 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
14644 and move it to the end. Cope with null def_stmt_outs.
14645
14646 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
14647
14648 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
14649
14650 2018-06-29 Jeff Law <law@redhat.com>
14651
14652 * config/v850/v850.c (v850_legitimate_address_p): Handle large
14653 displacements for TARGET_V850E2V3 and newer.
14654 (TARGET_LRA_P): Remove. Defaults to LRA now.
14655 * config/v850/v850.md (sign23byte_load): Remove.
14656 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
14657 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
14658
14659 2018-06-29 Martin Liska <mliska@suse.cz>
14660
14661 PR lto/85759
14662 * coverage.c (coverage_init): Mangle full path name.
14663 * doc/invoke.texi: Document the change.
14664 * gcov-io.c (mangle_path): New.
14665 * gcov-io.h (mangle_path): Likewise.
14666 * gcov.c (mangle_name): Use mangle_path for path mangling.
14667
14668 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14669
14670 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
14671 if starting source register is not even.
14672
14673 2018-06-29 Martin Liska <mliska@suse.cz>
14674
14675 PR tree-optimization/86263
14676 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
14677 Make edge redirection.
14678
14679 2018-06-29 David Malcolm <dmalcolm@redhat.com>
14680
14681 * dumpfile.c (dump_loc): Add indentation based on scope depth.
14682 (dump_scope_depth): New variable.
14683 (get_dump_scope_depth): New function.
14684 (dump_begin_scope): New function.
14685 (dump_end_scope): New function.
14686 * dumpfile.h (get_dump_scope_depth): New declaration.
14687 (dump_begin_scope): New declaration.
14688 (dump_end_scope): New declaration.
14689 (class auto_dump_scope): New class.
14690 (AUTO_DUMP_SCOPE): New macro.
14691 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14692 AUTO_DUMP_SCOPE.
14693
14694 2018-06-29 Richard Biener <rguenther@suse.de>
14695
14696 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14697 compute_all_dependences succeeds.
14698 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14699 exceed --param loop-max-datarefs-for-datadeps.
14700
14701 2018-06-29 Jakub Jelinek <jakub@redhat.com>
14702
14703 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14704
14705 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
14706
14707 PR target/86348
14708 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14709 alternative 0 in preferred_for_speed attribute.
14710
14711 2018-06-28 Paul Koning <ni1d@arrl.net>
14712
14713 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14714 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14715 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14716 * config/pdp11/pdp11.md: Correct "length" attribute calculation
14717 for shift insn patterns.
14718
14719 2018-06-28 David Malcolm <dmalcolm@redhat.com>
14720
14721 * cgraph.c (cgraph_node::get_body): Replace assignments to
14722 "dump_file" with calls to set_dump_file.
14723 * dumpfile.c (alt_dump_file): Make static, and group with...
14724 (alt_flags): ...this definition.
14725 (dumps_are_enabled): New variable.
14726 (refresh_dumps_are_enabled): New function.
14727 (set_dump_file): New function.
14728 (set_alt_dump_file): New function.
14729 (gcc::dump_manager::dump_start): Replace assignments to
14730 "dump_file" and "alt_dump_file" with calls to set_dump_file and
14731 set_alt_dump_file.
14732 (gcc::dump_manager::dump_finish): Likewise.
14733 * dumpfile.h (alt_dump_file): Delete decl.
14734 (dumps_are_enabled): New variable decl.
14735 (set_dump_file): New function decl.
14736 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14737 global.
14738 * tree-nested.c (lower_nested_functions): Replace assignments to
14739 "dump_file" with calls to set_dump_file.
14740
14741 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14742
14743 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14744 goto_locus of each outgoing edge of each basic block.
14745
14746 2018-06-28 Richard Biener <rguenther@suse.de>
14747
14748 * dwarf2out.c (decl_scope_table): Remove.
14749 (push_decl_scope): Likewise.
14750 (pop_decl_scope): Likewise.
14751 (gen_type_die_for_member): Do not call push/pop_decl_scope.
14752 (gen_struct_or_union_type_die): Likewise.
14753 (gen_tagged_type_die): Likewise.
14754 (dwarf2out_init): Do not initialize decl_scope_table.
14755 (dwarf2out_c_finalize): Do not free it.
14756
14757 2018-06-28 Richard Biener <rguenther@suse.de>
14758
14759 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14760 deciding whether to not re-use a DIE.
14761
14762 2018-06-28 Richard Biener <rguenther@suse.de>
14763
14764 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
14765 DW_AT_abstract_origin attribute.
14766
14767 2018-06-28 Martin Liska <mliska@suse.cz>
14768
14769 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14770 Use newly introduced constants.
14771 * tree-switch-conversion.h (struct jump_table_cluster):
14772 Define max_ratio_for_size and max_ratio_for_speed.
14773
14774 2018-06-28 Martin Liska <mliska@suse.cz>
14775
14776 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14777 Add new checking assert to catch invalid state.
14778 (jump_table_cluster::can_be_handled): Handle single case
14779 clusters.
14780 (jump_table_cluster::is_beneficial): Bail out for such case.
14781 (bit_test_cluster::find_bit_tests):
14782 Add new checking assert to catch invalid state.
14783 (bit_test_cluster::can_be_handled): Handle single case
14784 clusters.
14785 (bit_test_cluster::is_beneficial): Bail out for such case.
14786 (switch_decision_tree::analyze_switch_statement):
14787 Fix comment.
14788
14789 2018-06-28 Martin Liska <mliska@suse.cz>
14790
14791 * common.opt: Introduce -completion option.
14792 * gcc.c (driver_handle_option): Handle it.
14793 (driver::main): Print completions if completion
14794 is set.
14795 * opt-suggestions.c (option_proposer::get_completions):
14796 New function.
14797 (option_proposer::suggest_completion): Likewise.
14798 (option_proposer::find_param_completions): Likewise.
14799 (verify_autocompletions): Likewise.
14800 (test_completion_valid_options): Likewise.
14801 (test_completion_valid_params): Likewise.
14802 (in_completion_p): Likewise.
14803 (empty_completion_p): Likewise.
14804 (test_completion_partial_match): Likewise.
14805 (test_completion_garbage): Likewise.
14806 (opt_proposer_c_tests): Likewise.
14807 * opt-suggestions.h: Declare new functions.
14808 * opts.c (common_handle_option): Handle OPT__completion_.
14809 * selftest-run-tests.c (selftest::run_tests): Add
14810 opt_proposer_c_tests.
14811 * selftest.c (assert_str_startswith): New.
14812 * selftest.h (assert_str_startswith): Likewise.
14813 (opt_proposer_c_tests): New.
14814 (ASSERT_STR_STARTSWITH): Likewise.
14815
14816 2018-06-28 Martin Liska <mliska@suse.cz>
14817
14818 * Makefile.in: Add opt-suggestions.o.
14819 * gcc-main.c: Include opt-suggestions.h.
14820 * gcc.c (driver::driver): Likewise.
14821 (driver::~driver): Remove m_option_suggestions.
14822 (driver::build_option_suggestions): Moved to option_proposer.
14823 (driver::suggest_option): Likewise.
14824 (driver::handle_unrecognized_options): Use option_proposer.
14825 * gcc.h (class driver): Add new memver m_option_proposer.
14826 * opt-suggestions.c: New file.
14827 * opt-suggestions.h: New file.
14828
14829 2018-06-28 Martin Liska <mliska@suse.cz>
14830
14831 * vec.h (class auto_string_vec): New (moved from auto_argvec).
14832 (auto_string_vec::~auto_string_vec): Likewise.
14833
14834 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14835
14836 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14837 prevent_decl_creation_for_types fields up and add reset_location field.
14838 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14839 statement if id->reset_location is true.
14840 (copy_edges_for_bb): Do not set goto_locus on the new edges if
14841 id->reset_location is true.
14842 (copy_phis_for_bb): Force input_location on the arguments if
14843 id->reset_location is true.
14844 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14845 is set on the function to be inlined.
14846
14847 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
14848
14849 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14850
14851 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
14852
14853 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14854 registers for Pmode.
14855 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14856 hard registers for the clobbered pseudo.
14857
14858 2018-06-27 Paul Koning <ni1d@arrl.net>
14859
14860 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14861 mutually exclusive options.
14862 * config/pdp11/constraints.md (h): New constraint.
14863 (O): Update definition to match shift code generation.
14864 (D): New constraint.
14865 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14866 (CCFP): Remove.
14867 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14868 function.
14869 (output_jump): Change arguments.
14870 (pdp11_fixed_cc_regs): New function.
14871 (pdp11_cc_mode): Ditto.
14872 (pdp11_expand_shift): Ditto.
14873 (pdp11_assemble_shift): Ditto.
14874 (pdp11_small_shift): Ditto.
14875 (pdp11_branch_cost): Remove.
14876 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14877 from output.
14878 (pdp11_register_move_cost): Update for CC registers.
14879 (pdp11_rtx_costs): Add case for LSHIFTRT.
14880 (pdp11_output_jump): Add CCNZ mode conditional branches.
14881 (notice_update_cc_on_set): Remove.
14882 (pdp11_cc_mode): New function.
14883 (simple_memory_operand): Correct pre/post decrement case.
14884 (no_side_effect_operand): New function.
14885 (pdp11_regno_reg_class): Add CC_REGS class.
14886 (pdp11_fixed_cc_regs): New function.
14887 (pdp11_small_shift): New function.
14888 (pdp11_expand_shift): New function to expand shift insns.
14889 (pdp11_assemble_shift): New function to output shifts.
14890 (pdp11_branch_cost): Remove.
14891 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14892 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14893 (WCHAR_TYPE): Ditto.
14894 (PTRDIFF_TYPE): Ditto.
14895 (ADJUST_INSN_LENGTH): New macro.
14896 (FIXED_REGISTERS): Add CC registers.
14897 (CALL_USED_REGISTERS): Ditto.
14898 (reg_class): Ditto.
14899 (REG_CLASS_NAMES): Ditto.
14900 (REG_CLASS_CONTENTS): Ditto.
14901 (SELECT_CC_MODE): Use new function.
14902 (TARGET_FLAGS_REGNUM): New macro.
14903 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14904 (cc0_reg_rtx): Remove.
14905 (CC_STATUS_MDEP): Remove.
14906 (CC_STATUS_MDEFP_INIT): Remove.
14907 (CC_IN_FPU): Remove.
14908 (NOTICE_UPDATE_CC): Remove.
14909 (REGISTER_NAMES): Add CC registers.
14910 (BRANCH_COST): Change to constant 1.
14911 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14912 handling.
14913 * config/pdp11/pdp11.opt (mbcopy): Remove.
14914 (mbcopy-builtin): Remove.
14915 (mbranch-cheap): Remove.
14916 (mbranch-expensive): Remove.
14917 * config/pdp11/predicates.md (expand_shift_operand): Update to
14918 match shift code generation.
14919 (ccnz_operator): New predicate.
14920 * doc/invoke.texi (PDP-11 Options): Remove deleted options
14921 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14922 Remove non-existent option -mabshi, -mno-abshi. Document mutually
14923 exclusive options.
14924 * doc/md.texi (PDP-11): Document new D and h constraints. Update
14925 description of O constraint.
14926
14927 2018-06-27 Jeff Law <law@redhat.com>
14928 Austin Law <austinklaw@gmail.com>
14929
14930 * config/v850/v850.md (addsi3_set_flags): New pattern.
14931 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14932 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14933 (zero_extendhisi2_v850_set_flags): Likewise.
14934 (zero_extendqisi2_v850_set_flags): Likewise.
14935 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14936 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14937 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14938
14939 * config/v850/v850-protos.h (notice_update_cc): Remove.
14940 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14941 (v850_print_operand): Handle 'D' and "d".
14942 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14943 Add handling of arithmetic/logical operations compared against zero.
14944 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14945 Do not look at v850_compare_op, instead get mode from last argument.
14946 (v850_gen_compare): Remove
14947 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14948 after reload for prologue insns.
14949 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14950 patterns.
14951 (construct_save_jarl): Likewise.
14952 (TARGET_FLAGS_REGNUM): Define.
14953 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14954 (NOTICE_UPDATE_CC): Remove.
14955 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14956 than cc0. Conditionalize on reload_completed.
14957 (cmpsi_insn, setfcc_insn): Likewise.
14958 (tst1 splitter): Turn into define_and_split which sets the flags
14959 after reload.
14960 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14961 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14962 (cstoresf4, cstoredf4): Clobber the flags.
14963 (cmpsi, cmpsf, cmpdf): Remove expanders.
14964 (setf_insn): Remove pattern.
14965 (addsi3): Turn into define_and_split which clobbers the flags after
14966 reload and a suitable pattern (addsi3_clobber_flags) for use after
14967 reload.
14968 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14969 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14970 (ashrsi3, ashrsi3_v850e2): Likewise.
14971 (bins): Clobber the flags.
14972 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14973 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14974 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14975 (call_value_internal_short, call_value_internal_long): Likewise.
14976 (callt_save_interrupt, callt_return_interrupt): Likewise.
14977 (save_interrupt, return_interrupt): Likewise.
14978 (callt_save_all_interrupt, save_all_interrupt): Likewise.
14979 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14980 (restore_all_interrupt, _restore_all_interrupt): Likewise.
14981 (All FP comparisons): Only allow after reload has completed.
14982 (trfsr): Likewise.
14983 (divh, divhu): Tweak output template.
14984 (branch_z_normal, branch_z_invert): Remove
14985 (branch_nz_normal, branch_nz_invert): Likewise.
14986 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14987
14988 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14989 * config/v850/v850.c (notice_update_cc): Remove.
14990 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
14991 (CC_NO_CARRY): Likewise.
14992 (NOTICE_UPDATE_CC): Define to nothing.
14993 * config/v850/v850.md: Remove block comment on cc0 handling
14994 Remove "cc" attribute from all patterns. Remove cc_status handling
14995 from all patterns. Minor formatting fixes.
14996
14997 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14998
14999 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
15000 (cortex-a76.cortex-a55): Likewise.
15001 * config/aarch64/aarch64-tune.md: Regenerate.
15002 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
15003 cortex-a76.cortex-a55.
15004
15005 2018-06-27 Jeff Law <law@redhat.com>
15006
15007 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
15008 (MULTILIB_DIRNAMES): Similarly.
15009
15010 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
15011
15012 * gimple.h (gimple_return_retbnd): Delete.
15013 (gimple_return_set_retbnd): Likewise.
15014 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
15015 gimple_return_set_retbnd.
15016 * gimple-pretty-print.c (dump_gimple_return): Remove call to
15017 gimple_return_retbnd and adjust.
15018 * tree-inline.h (struct copy_body_data): Remove retbnd field.
15019 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
15020 Explicitly return NULL in a couple more cases. Move assertion
15021 on debug statements and remove unreachable code.
15022 (reset_debug_binding): Do not test id->retbnd.
15023 (expand_call_inline): Do not set it.
15024
15025 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
15026
15027 * configure.ac: Add --disable-gcov option.
15028 * configure: Regenerate.
15029 * Makefile.in: Honour @enable_gcov@.
15030 * doc/install.texi: Document --disable-gcov.
15031
15032 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15033
15034 * config/arm/arm-cpus.in (cortex-a76): New entry.
15035 (cortex-a76.cortex-a55): Likewise.
15036 * config/arm/arm-tables.opt: Regenerate.
15037 * config/arm/arm-tune.md: Likewise.
15038 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
15039 * doc/invoke.texi (ARM Options): Document cortex-a76 and
15040 cortex-a76.cortex-a55.
15041
15042 2018-06-27 Tamar Christina <tamar.christina@arm.com>
15043
15044 PR target/85769
15045 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
15046
15047 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
15048
15049 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
15050 comment.
15051 (EPILOGUE_USES): Likewise.
15052
15053 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
15054
15055 * tree-inline.c (remap_location): New function extracted from...
15056 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
15057 (copy_phis_for_bb): ...here. Call remap_location.
15058 (copy_cfg_body): Adjust call to copy_edges_for_bb.
15059
15060 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
15061
15062 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
15063 unaligned vsx for 16B memset.
15064
15065 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
15066
15067 PR target/86285
15068 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
15069 ieee128_float_type_node to long_double_type_node unless
15070 TARGET_LONG_DOUBLE_128 is set.
15071
15072 2018-06-26 David Malcolm <dmalcolm@redhat.com>
15073
15074 * cfgloop.c (get_loop_location): Convert return type from
15075 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
15076 by implicit construction from rtx_insn *, and using
15077 dump_user_location_t::from_function_decl for the fallback case.
15078 * cfgloop.h (get_loop_location): Convert return type from
15079 location_t to dump_user_location_t.
15080 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
15081 dump_printf_loc to pass in a dump_location_t rather than a
15082 location_t, via the gimple stmt.
15083 * coverage.c (get_coverage_counts): Update calls to
15084 dump_printf_loc to pass in dump_location_t rather than a
15085 location_t.
15086 * doc/optinfo.texi (Dump types): Convert example of
15087 dump_printf_loc from taking "locus" to taking "insn". Update
15088 description of the "_loc" calls to cover dump_location_t.
15089 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
15090 "selftest.h".
15091 (dump_user_location_t::dump_user_location_t): New constructors,
15092 from gimple *stmt and rtx_insn *.
15093 (dump_user_location_t::from_function_decl): New function.
15094 (dump_loc): Make static.
15095 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
15096 const dump_location_t &.
15097 (dump_generic_expr_loc): Delete.
15098 (dump_printf_loc): Convert param "loc" from location_t to
15099 const dump_location_t &.
15100 (selftest::test_impl_location): New function.
15101 (selftest::dumpfile_c_tests): New function.
15102 * dumpfile.h: Include "profile-count.h".
15103 (class dump_user_location_t): New class.
15104 (struct dump_impl_location_t): New struct.
15105 (class dump_location_t): New class.
15106 (dump_printf_loc): Convert 2nd param from source_location to
15107 const dump_location_t &.
15108 (dump_generic_expr_loc): Delete.
15109 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
15110 const dump_location_t &.
15111 * gimple-fold.c (fold_gimple_assign): Update call to
15112 dump_printf_loc to pass in a dump_location_t rather than a
15113 location_t, via the gimple stmt.
15114 (gimple_fold_call): Likewise.
15115 * gimple-loop-interchange.cc
15116 (loop_cand::analyze_iloop_reduction_var): Update for change to
15117 check_reduction_path.
15118 (tree_loop_interchange::interchange): Update for change to
15119 find_loop_location.
15120 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
15121 change in return-type of find_loop_location.
15122 (graphite_regenerate_ast_isl): Likewise.
15123 * graphite-optimize-isl.c (optimize_isl): Likewise.
15124 * graphite.c (graphite_transform_loops): Likewise.
15125 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
15126 pass in a dump_location_t rather than a location_t, via the
15127 gimple stmt.
15128 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15129 * ipa.c (walk_polymorphic_call_targets): Likewise.
15130 * loop-unroll.c (report_unroll): Convert "locus" param from
15131 location_t to dump_location_t.
15132 (decide_unrolling): Update for change to get_loop_location's
15133 return type.
15134 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
15135 location_t to dump_user_location_t.
15136 (grid_find_single_omp_among_assignments_1): Updates calls to
15137 dump_printf_loc to pass in a dump_location_t rather than a
15138 location_t, via the gimple stmt.
15139 (grid_parallel_clauses_gridifiable): Convert "tloc" from
15140 location_t to dump_location_t. Updates calls to dump_printf_loc
15141 to pass in a dump_location_t rather than a location_t, via the
15142 gimple stmt.
15143 (grid_inner_loop_gridifiable_p): Likewise.
15144 (grid_dist_follows_simple_pattern): Likewise.
15145 (grid_gfor_follows_tiling_pattern): Likewise.
15146 (grid_target_follows_gridifiable_pattern): Likewise.
15147 (grid_attempt_target_gridification): Convert initialization
15148 of local "grid" from memset to zero-initialization; FIXME: does
15149 this require C++11? Update call to dump_printf_loc to pass in a
15150 optinfo_location rather than a location_t, via the gimple stmt.
15151 * profile.c (read_profile_edge_counts): Updates call to
15152 dump_printf_loc to pass in a dump_location_t rather than a
15153 location_t
15154 (compute_branch_probabilities): Likewise.
15155 * selftest-run-tests.c (selftest::run_tests): Call
15156 dumpfile_c_tests.
15157 * selftest.h (dumpfile_c_tests): New decl.
15158 * tree-loop-distribution.c (pass_loop_distribution::execute):
15159 Update for change in return type of find_loop_location.
15160 * tree-parloops.c (parallelize_loops): Likewise.
15161 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
15162 "locus" from location_t to dump_user_location_t.
15163 (canonicalize_loop_induction_variables): Likewise.
15164 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
15165 for change in return type of find_loop_location.
15166 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
15167 to dump_printf_loc to pass in a dump_location_t rather than a
15168 location_t, via the stmt.
15169 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
15170 Likewise.
15171 * tree-vect-loop-manip.c (find_loop_location): Convert return
15172 type from source_location to dump_user_location_t.
15173 (vect_do_peeling): Update for above change.
15174 (vect_loop_versioning): Update for change in type of
15175 vect_location.
15176 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
15177 from location_t to dump_user_location_t.
15178 (vect_estimate_min_profitable_iters): Update for change in type
15179 of vect_location.
15180 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
15181 location_t to dump_location_t.
15182 (vect_slp_bb): Update for change in type of vect_location.
15183 * tree-vectorizer.c (vect_location): Convert from source_location
15184 to dump_user_location_t.
15185 (try_vectorize_loop_1): Update for change in vect_location's type.
15186 (vectorize_loops): Likewise.
15187 (increase_alignment): Likewise.
15188 * tree-vectorizer.h (vect_location): Convert from source_location
15189 to dump_user_location_t.
15190 (find_loop_location): Convert return type from source_location to
15191 dump_user_location_t.
15192 (check_reduction_path): Convert 1st param from location_t to
15193 dump_user_location_t.
15194 * value-prof.c (check_counter): Update call to dump_printf_loc to
15195 pass in a dump_user_location_t rather than a location_t; update
15196 call to error_at for change in type of "locus".
15197 (check_ic_target): Update call to dump_printf_loc to
15198 pass in a dump_user_location_t rather than a location_t, via the
15199 call_stmt.
15200
15201 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
15202
15203 * config/s390/s390.h (enum processor_flags): Do not use
15204 default tune parameter when -march was specified.
15205
15206 2018-06-26 Jakub Jelinek <jakub@redhat.com>
15207
15208 PR target/86314
15209 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
15210 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
15211 operands.
15212
15213 2018-06-26 Richard Biener <rguenther@suse.de>
15214
15215 PR tree-optimization/86287
15216 PR bootstrap/86316
15217 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
15218 (vect_analyze_loop): Initialize n_stmts.
15219
15220 2018-06-26 Richard Biener <rguenther@suse.de>
15221
15222 PR middle-end/86271
15223 * fold-const.c (fold_convertible_p): Pointer extension
15224 isn't valid.
15225
15226 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
15227
15228 PR debug/86064
15229 * dwarf2out.c (loc_list_has_views): Adjust comments.
15230 (dw_loc_list): Split single cross-partition range with
15231 nonzero locview.
15232
15233 2018-06-25 Jeff Law <law@redhat.com>
15234
15235 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
15236 on -mbig-switch by default.
15237
15238 * config/v850/predicates.md (const_float_1_operand): Fix match_code
15239 test.
15240 (const_float_0_operand): Remove unused predicate.
15241 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
15242 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
15243 (recipsf2): New expander. Original pattern now called
15244 (recipsf2_insn).
15245 (recipdf2, recipdf2_insn): Similarly.
15246 (rsqrtsf2, rsqrtsf2_insn): Similarly
15247 (rsqrtdf2, rsqrtdf2_insn): Similarly
15248
15249 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
15250
15251 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
15252 Simplify logic for FreeBSD (twice).
15253
15254 2018-06-25 Martin Sebor <msebor@redhat.com>
15255
15256 PR tree-optimization/86204
15257 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
15258 a strnlen result if it's less than the length of the string.
15259
15260 2018-06-25 Martin Sebor <msebor@redhat.com>
15261
15262 PR tree-optimization/85700
15263 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
15264 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
15265 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
15266
15267 2018-06-25 Martin Sebor <msebor@redhat.com>
15268
15269 * doc/extend.texi (Zero-length arrays): Update and clarify.
15270
15271 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
15272
15273 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
15274 added IEEE/IBM long double multilib support on PowerPC little
15275 endian Linux systems.
15276 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
15277 (MULTILIB_DEFAULTS): Likewise.
15278 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15279 Likewise.
15280 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
15281 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
15282 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
15283
15284 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
15285
15286 PR middle-end/86311
15287 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
15288 (REORDER_45): Likewise.
15289
15290 2018-06-25 Jeff Law <law@redhat.com>
15291
15292 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
15293 dividend to 32 bits. Adjust length.
15294 (udivmodhi4): Cleanup output template. Fix length.
15295
15296 2018-06-25 Carl Love <cel@us.ibm.com>
15297
15298 * config/rs6000/vsx.md: Change word selector to prefered location.
15299
15300 2018-06-25 Richard Biener <rguenther@suse.de>
15301
15302 PR tree-optimization/86304
15303 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
15304 epilogue-if-converted loops as well.
15305
15306 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
15307
15308 * lto-section-out.c (lto_begin_section): Do not print section
15309 name for noaddr and unnumbered dumps.
15310
15311 2018-06-25 Richard Biener <rguenther@suse.de>
15312
15313 * tree-vectorizer.h (struct vec_info_shared): New structure
15314 with parts split out from struct vec_info and loop_nest from
15315 struct _loop_vec_info.
15316 (struct vec_info): Adjust accordingly.
15317 (struct _loop_vec_info): Likewise.
15318 (LOOP_VINFO_LOOP_NEST): Adjust.
15319 (LOOP_VINFO_DATAREFS): Likewise.
15320 (LOOP_VINFO_DDRS): Likewise.
15321 (struct _bb_vec_info): Likewise.
15322 (BB_VINFO_DATAREFS): Likewise.
15323 (BB_VINFO_DDRS): Likewise.
15324 (struct _stmt_vec_info): Add dr_aux member.
15325 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
15326 (DR_MISALIGNMENT_UNINITIALIZED): New.
15327 (set_dr_misalignment): Adjust.
15328 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
15329 (vect_analyze_loop): Adjust prototype.
15330 (vect_analyze_loop_form): Likewise.
15331 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15332 Compute dependences lazily.
15333 (vect_record_base_alignments): Use shared datarefs/ddrs.
15334 (vect_verify_datarefs_alignment): Likewise.
15335 (vect_analyze_data_refs_alignment): Likewise.
15336 (vect_analyze_data_ref_accesses): Likewise.
15337 (vect_analyze_data_refs): Likewise.
15338 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
15339 constructor parameter for shared part.
15340 (vect_analyze_loop_form): Pass in shared part and adjust.
15341 (vect_analyze_loop_2): Pass in storage for the number of
15342 stmts. Move loop nest finding to the caller. Compute
15343 datarefs lazily.
15344 (vect_analyze_loop): Pass in shared part.
15345 (vect_transform_loop): Verify shared datarefs are unchanged.
15346 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
15347 constructor parameter for shared part.
15348 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
15349 (vect_slp_bb): Verify shared datarefs are unchanged before
15350 transform.
15351 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
15352 change.
15353 (new_stmt_vec_info): Initialize DR_AUX misalignment to
15354 DR_MISALIGNMENT_UNINITIALIZED.
15355 * tree-vectorizer.c (vec_info::vec_info): Add constructor
15356 parameter for shared part.
15357 (vec_info::~vec_info): Adjust.
15358 (vec_info_shared::vec_info_shared): New.
15359 (vec_info_shared::~vec_info_shared): Likewise.
15360 (vec_info_shared::save_datarefs): Likewise.
15361 (vec_info_shared::check_datarefs): Likewise.
15362 (try_vectorize_loop_1): Construct shared part live for analyses
15363 of a single loop for multiple vector sizes.
15364 * tree-parloops.c (gather_scalar_reductions): Adjust.
15365
15366 2018-06-25 Richard Biener <rguenther@suse.de>
15367
15368 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
15369 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
15370 (vect_analyze_data_refs): Remove similar code from here and
15371 simplify accordingly.
15372
15373 2018-06-25 Richard Biener <rguenther@suse.de>
15374
15375 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
15376 for reverse storage order accesses rather than asserting
15377 they cannot happen here.
15378
15379 2018-06-25 Tom de Vries <tdevries@suse.de>
15380
15381 PR debug/86257
15382 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
15383 Use data16 instead of .byte for insn prefix.
15384
15385 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
15386
15387 PR C++/86082
15388 * parser.c (make_char_string_pack): Pass this literal chars
15389 through cpp_interpret_string.
15390 (cp_parser_userdef_numeric_literal): Check the result of
15391 make_char_string_pack.
15392
15393 2018-06-24 Maya Rashish <coypu@sdf.org>
15394
15395 * ginclude/stddef.h: Simplify conditions around avoiding
15396 re-definition of __size_t.
15397
15398 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15399
15400 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
15401 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
15402
15403 2018-06-22 Maya Rashish <coypu@sdf.org>
15404
15405 * doc/invoke.texi (mno-fancy-math-387): Update for changes
15406 made to OpenBSD and NetBSD through the years.
15407
15408 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15409
15410 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15411 behavior of vec_pack (vector double, vector double) to match
15412 behavior of vec_float2 (vector double, vector double).
15413
15414 2018-06-22 Olivier Hainque <hainque@adacore.com>
15415
15416 * gimplify.c (gimplify_function_tree): Prevent creation
15417 of a trampoline for the address of the current function
15418 passed to entry/exit instrumentation hooks.
15419
15420 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
15421
15422 PR target/86222
15423 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
15424 correctly.
15425
15426 2018-06-22 Martin Liska <mliska@suse.cz>
15427
15428 PR tree-optimization/86263
15429 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15430 Bail out if is_enabled is false.
15431 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
15432 New declaration.
15433 (jump_table_cluster::is_enabled): New function.
15434
15435 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15436
15437 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15438 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
15439 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
15440 (lto_input_ts_binfo_tree_pointers): Likewise.
15441 * tree-streamer-out.c (streamer_write_tree_bitfields,
15442 write_ts_binfo_tree_pointers): Likewise.
15443 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
15444
15445 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15446
15447 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
15448
15449 2018-06-22 Martin Liska <mliska@suse.cz>
15450
15451 * symbol-summary.h (get): Make it pure and inline move
15452 functionality from ::get function.
15453 (get): Remove and inline into ::get and ::get_create.
15454 (get_create): Move code from ::get function.
15455
15456 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15457
15458 PR target/85994
15459 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
15460 -x assembler-with-cpp.
15461
15462 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15463
15464 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
15465 _FILE_OFFSET_BITS=64 for C++.
15466
15467 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
15468
15469 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
15470 conversion insn that shows up when pr85657-3.c is compiled using
15471 IEEE 128-bit long double.
15472 (neg<mode>2_internal): Use the correct mode to check whether the
15473 mode is IBM extended.
15474 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
15475 multiply and divide external functions from being created more
15476 than once.
15477
15478 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15479
15480 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
15481 functions.
15482 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
15483 the edge can be forwarded.
15484 (cfg_layout_merge_blocks): Likewise.
15485
15486 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15487
15488 * except.c (finish_eh_generation): Commit edge insertions only after
15489 the EH edges have been redirected from post-landing to landing pads.
15490
15491 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15492
15493 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
15494 create_tmp_var_for to create the FRAME decl.
15495 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
15496
15497 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15498
15499 * tree-inline.c (copy_edges_for_bb): Minor tweak.
15500 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
15501 debug statement when resetting its value.
15502 (expand_call_inline): Copy the locus of the call onto the assignment
15503 of the return value, if any. Use local variable in more cases.
15504
15505 2018-06-21 Martin Liska <mliska@suse.cz>
15506
15507 * ipa-pure-const.c (propagate_nothrow): Use
15508 funct_state_summaries->get.
15509 (dump_malloc_lattice): Likewise.
15510 (propagate_malloc): Likewise.
15511
15512 2018-06-21 Richard Biener <rguenther@suse.de>
15513
15514 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
15515 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
15516 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
15517 comment.
15518 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
15519 BLOCK_ABSTRACT_ORIGIN unconditionally.
15520
15521 2018-06-21 David Malcolm <dmalcolm@redhat.com>
15522
15523 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
15524 deleting it.
15525 * ipa-reference.c (ipa_reference_c_finalize): Delete
15526 ipa_ref_opt_sum_summaries and set it to NULL.
15527
15528 2018-06-21 Tom de Vries <tdevries@suse.de>
15529
15530 PR tree-optimization/85859
15531 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
15532 test with comment from bb_no_side_effects_p.
15533
15534 2018-06-21 Richard Biener <rguenther@suse.de>
15535
15536 PR tree-optimization/86232
15537 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
15538 max for constant niter.
15539
15540 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15541
15542 * config/aarch64/aarch64-simd.md
15543 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
15544
15545 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15546
15547 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
15548 Make opernads of the unspec commutative.
15549
15550 2018-06-21 Richard Biener <rguenther@suse.de>
15551
15552 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
15553 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
15554 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
15555 (vect_analyze_data_ref_dependence): Re-order checks to deal with
15556 NULL DR_STEP.
15557 (vect_record_base_alignments): Do not record base alignment
15558 for gathers or scatters.
15559 (vect_compute_data_ref_alignment): Drop return value that is always
15560 true. Bail out early for gathers or scatters.
15561 (vect_enhance_data_refs_alignment): Bail out early for gathers
15562 or scatters.
15563 (vect_find_same_alignment_drs): Likewise.
15564 (vect_analyze_data_refs_alignment): Remove dead code.
15565 (vect_slp_analyze_and_verify_node_alignment): Likewise.
15566 (vect_analyze_data_refs): For possible gathers or scatters do
15567 not create an alternate DR, just check their possible validity
15568 and mark them. Adjust DECL_NONALIASED handling to not rely
15569 on DR_BASE_ADDRESS.
15570 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
15571 update inits of gathers or scatters.
15572 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
15573 Also copy gather/scatter flag to pattern vinfo.
15574
15575 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
15576
15577 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15578 behavior of vec_packsu (vector unsigned long long, vector unsigned
15579 long long) to match behavior of vec_packs with same signature.
15580
15581 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
15582 Thomas Schwinge <thomas@codesourcery.com>
15583 Cesar Philippidis <cesar@codesourcery.com>
15584
15585 * gimplify.c (gimplify_scan_omp_clauses): Add support for
15586 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15587 (gimplify_adjust_omp_clauses): Likewise.
15588 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
15589 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
15590 (gimplify_omp_target_update): Update handling of acc update and
15591 enter/exit data.
15592 * omp-low.c (install_var_field): Remove unused parameter
15593 base_pointers_restrict.
15594 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
15595 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
15596 FINALIZE}
15597 (omp_target_base_pointers_restrict_p): Delete.
15598 (scan_omp_target): Update call to scan_sharing_clauses.
15599 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
15600 FINALIZE}.
15601 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
15602 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15603 (convert_local_omp_clauses): Likewise.
15604 * tree-pretty-print.c (dump_omp_clause): Likewise.
15605 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
15606 FINALIZE}.
15607 (omp_clause_code_name): Likewise.
15608
15609 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15610
15611 PR debug/86194
15612 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
15613 be narrowed.
15614
15615 PR tree-optimization/86231
15616 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
15617 anti-range don't overwrite *vr0min before using it to compute *vr0max.
15618
15619 2018-06-20 Tom de Vries <tdevries@suse.de>
15620
15621 PR tree-optimization/86097
15622 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
15623 iv type if signedness of iv type is not the same as that of *nit.
15624
15625 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15626
15627 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
15628 EDGE_EH edges, verify they are all EDGE_EH.
15629
15630 2018-06-20 Maya Rashish <coypu@sdf.org>
15631
15632 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
15633
15634 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15635
15636 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
15637 * config/aarch64/aarch64.c (xgene1_tunings): Add
15638 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
15639 (aarch64_mode_valid_for_sched_fusion_p):
15640 Allow 16-byte modes.
15641 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
15642 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
15643 128-bit modes.
15644 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
15645 New pattern.
15646 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
15647 * config/aarch64/iterators.md (VQ2): New mode iterator.
15648
15649 2018-06-20 Martin Liska <mliska@suse.cz>
15650
15651 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15652 Change default ratio from 10 to 8.
15653
15654 2018-06-20 Martin Liska <mliska@suse.cz>
15655
15656 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15657 New.
15658 (bit_test_cluster::find_bit_tests): Likewise.
15659 (switch_decision_tree::analyze_switch_statement): Find clusters.
15660 * tree-switch-conversion.h (struct jump_table_cluster): Document
15661 hierarchy.
15662
15663 2018-06-20 Martin Liska <mliska@suse.cz>
15664
15665 * tree-switch-conversion.c (switch_conversion::collect):
15666 Record m_uniq property.
15667 (switch_conversion::expand): Bail out for special conditions.
15668 (group_cluster::~group_cluster): New.
15669 (group_cluster::group_cluster): Likewise.
15670 (group_cluster::dump): Likewise.
15671 (jump_table_cluster::emit): New.
15672 (switch_decision_tree::fix_phi_operands_for_edges): New.
15673 (struct case_node): Remove struct.
15674 (jump_table_cluster::can_be_handled): New.
15675 (case_values_threshold): Moved to header.
15676 (reset_out_edges_aux): Likewise.
15677 (jump_table_cluster::is_beneficial): New.
15678 (bit_test_cluster::can_be_handled): Likewise.
15679 (add_case_node): Remove.
15680 (bit_test_cluster::is_beneficial): New.
15681 (case_bit_test::cmp): New.
15682 (bit_test_cluster::emit): New.
15683 (expand_switch_as_decision_tree_p): Remove.
15684 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
15685 (fix_phi_operands_for_edge): Likewise.
15686 (switch_decision_tree::analyze_switch_statement): New.
15687 (compute_cases_per_edge): Move ...
15688 (switch_decision_tree::compute_cases_per_edge): ... here.
15689 (try_switch_expansion): Likewise.
15690 (switch_decision_tree::try_switch_expansion): Likewise.
15691 (record_phi_operand_mapping): Likewise.
15692 (switch_decision_tree::record_phi_operand_mapping): Likewise.
15693 (emit_case_decision_tree): Likewise.
15694 (switch_decision_tree::emit): Likewise.
15695 (balance_case_nodes): Likewise.
15696 (switch_decision_tree::balance_case_nodes): Likewise.
15697 (dump_case_nodes): Likewise.
15698 (switch_decision_tree::dump_case_nodes): Likewise.
15699 (emit_jump): Likewise.
15700 (switch_decision_tree::emit_jump): Likewise.
15701 (emit_cmp_and_jump_insns): Likewise.
15702 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15703 (emit_case_nodes): Likewise.
15704 (switch_decision_tree::emit_case_nodes): Likewise.
15705 (conditional_probability): Remove.
15706 * tree-switch-conversion.h (enum cluster_type): New.
15707 (PRINT_CASE): New.
15708 (struct cluster): Likewise.
15709 (cluster::cluster): Likewise.
15710 (struct simple_cluster): Likewise.
15711 (simple_cluster::simple_cluster): Likewise.
15712 (struct group_cluster): Likewise.
15713 (struct jump_table_cluster): Likewise.
15714 (struct bit_test_cluster): Likewise.
15715 (struct min_cluster_item): Likewise.
15716 (struct case_tree_node): Likewise.
15717 (case_tree_node::case_tree_node): Likewise.
15718 (jump_table_cluster::case_values_threshold): Likewise.
15719 (struct case_bit_test): Likewise.
15720 (struct switch_decision_tree): Likewise.
15721 (struct switch_conversion): Likewise.
15722 (switch_decision_tree::reset_out_edges_aux): Likewise.
15723
15724 2018-06-20 Martin Liska <mliska@suse.cz>
15725
15726 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15727 (hoist_edge_and_branch_if_true): Likewise.
15728 (expand_switch_using_bit_tests_p): Likewise.
15729 (struct case_bit_test): Likewise.
15730 (case_bit_test_cmp): Likewise.
15731 (emit_case_bit_tests): Likewise.
15732 (switch_conversion::switch_conversion): New class.
15733 (struct switch_conv_info): Remove old struct.
15734 (collect_switch_conv_info): More to ...
15735 (switch_conversion::collect): ... this.
15736 (check_range): Likewise.
15737 (switch_conversion::check_range): Likewise.
15738 (check_all_empty_except_final): Likewise.
15739 (switch_conversion::check_all_empty_except_final): Likewise.
15740 (check_final_bb): Likewise.
15741 (switch_conversion::check_final_bb): Likewise.
15742 (create_temp_arrays): Likewise.
15743 (switch_conversion::create_temp_arrays): Likewise.
15744 (free_temp_arrays): Likewise.
15745 (gather_default_values): Likewise.
15746 (switch_conversion::gather_default_values): Likewise.
15747 (build_constructors): Likewise.
15748 (switch_conversion::build_constructors): Likewise.
15749 (constructor_contains_same_values_p): Likewise.
15750 (switch_conversion::contains_same_values_p): Likewise.
15751 (array_value_type): Likewise.
15752 (switch_conversion::array_value_type): Likewise.
15753 (build_one_array): Likewise.
15754 (switch_conversion::build_one_array): Likewise.
15755 (build_arrays): Likewise.
15756 (switch_conversion::build_arrays): Likewise.
15757 (gen_def_assigns): Likewise.
15758 (switch_conversion::gen_def_assigns): Likewise.
15759 (prune_bbs): Likewise.
15760 (switch_conversion::prune_bbs): Likewise.
15761 (fix_phi_nodes): Likewise.
15762 (switch_conversion::fix_phi_nodes): Likewise.
15763 (gen_inbound_check): Likewise.
15764 (switch_conversion::gen_inbound_check): Likewise.
15765 (process_switch): Use the newly created class.
15766 (switch_conversion::expand): New.
15767 (switch_conversion::~switch_conversion): New.
15768 * tree-switch-conversion.h: New file.
15769
15770 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15771
15772 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
15773 tree-vect-patterns.c.
15774 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
15775 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
15776 (vect_recog_sad_pattern): Likewise.
15777 (vect_recog_widen_sum_pattern): Likewise.
15778 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
15779 (vect_recog_widen_shift_pattern): Remove the type_in argument.
15780 (vect_recog_rotate_pattern): Likewise.
15781 (vect_recog_mult_pattern): Likewise.
15782 (vect_recog_vector_vector_shift_pattern): Likewise.
15783 (vect_recog_divmod_pattern): Likewise.
15784 (vect_recog_mixed_size_cond_pattern): Likewise.
15785 (vect_recog_bool_pattern): Likewise.
15786 (vect_recog_mask_conversion_pattern): Likewise.
15787 (vect_try_gather_scatter_pattern): Likewise.
15788 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
15789 (vect_recog_over_widening_pattern): Likewise.
15790 (vect_recog_gather_scatter_pattern): Likewise.
15791 (vect_recog_func_ptr): Move from tree-vectorizer.h
15792 (vect_vect_recog_func_ptrs): Move further down the file.
15793 (vect_recog_func): Likewise. Remove the third argument.
15794 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
15795 (vect_pattern_recog_1): Expect the pattern function to do any
15796 necessary target tests. Also expect it to provide a vector type.
15797 Remove the type_in handling.
15798
15799 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15800
15801 * tree-vect-patterns.c (vect_pattern_detected): New function.
15802 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
15803 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
15804 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
15805 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
15806 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15807 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15808 (vect_recog_mask_conversion_pattern)
15809 (vect_try_gather_scatter_pattern): Likewise.
15810
15811 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15812
15813 * tree-vect-patterns.c (vect_get_internal_def): New function.
15814 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15815 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
15816 (search_type_for_mask_1): Use it.
15817
15818 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15819
15820 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15821 redundant WIDEN_SUM_EXPR handling.
15822 (vect_recog_sad_pattern): Likewise.
15823
15824 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15825
15826 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15827 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15828 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15829 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15830 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15831
15832 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15833
15834 * tree-vect-stmts.c (vectorizable_call): Make sure that we
15835 use the stmt_vec_info of the original bb statement for the
15836 new zero assignment, even if the call is part of a pattern.
15837
15838 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15839
15840 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15841 that the sequence is attached to the original statement rather
15842 than the pattern statement.
15843 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15844 PATTERN_DEF_SEQ from the original statement rather than
15845 the main pattern statement.
15846 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15847 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15848 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15849
15850 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15851
15852 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15853 definition statements before the early exit for statements that aren't
15854 live or relevant.
15855 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15856 split out from...
15857 (vect_transform_loop): ...here. Process pattern definition
15858 statements without first checking whether the main pattern
15859 statement is live or relevant.
15860
15861 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15862
15863 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15864 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15865
15866 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
15867
15868 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15869 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15870 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15871 (expand_block_compare): Change select_block_compare_mode call.
15872 (expand_strncmp_align_check): Use new functions, fix comment.
15873 (emit_final_str_compare_gpr): New function.
15874 (expand_strn_compare): Refactor and clean up code.
15875 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15876
15877 2018-06-19 Tony Reix <tony.reix@atos.com>
15878 Damien Bergamini <damien.bergamini@atos.com>
15879 David Edelsohn <dje.gcc@gmail.com>
15880
15881 * collect2.c (static_obj): New variable.
15882 (static_libs): New variable.
15883 (is_in_list): Uncomment declaration.
15884 (main): Track AIX libraries linked statically.
15885 (is_in_list): Uncomment definition.
15886 (scan_prog_file): Don't add AIX shared libraries initializer
15887 to constructor list if linking statically.
15888
15889 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
15890
15891 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15892 constant.
15893 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15894
15895 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
15896
15897 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15898 blocks.
15899
15900 2018-06-19 Martin Liska <mliska@suse.cz>
15901
15902 * config/i386/i386.c (ix86_can_inline_p): Do not use
15903 ipa_fn_summaries::get_create.
15904 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15905 get.
15906 (devirtualization_time_bonus): Likewise.
15907 (ipcp_propagate_stage): Likewise.
15908 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15909 (edge_set_predicate): Likewise.
15910 (evaluate_conditions_for_known_args): Likewise.
15911 (evaluate_properties_for_edge): Likewise.
15912 (ipa_call_summary::reset): Tranform to ...
15913 (ipa_call_summary::~ipa_call_summary): ... this.
15914 (ipa_fn_summary::reset): Transform to ...
15915 (ipa_fn_summary::~ipa_fn_summary): ... this.
15916 (ipa_fn_summary_t::remove): Rename to ...
15917 (ipa_fn_summary_t::remove_callees): ... this.
15918 (ipa_fn_summary_t::duplicate): Use placement new
15919 instead of memory copy.
15920 (ipa_call_summary_t::duplicate): Likewise.
15921 (ipa_call_summary_t::remove): Remove.
15922 (dump_ipa_call_summary): Change get_create to get.
15923 (ipa_dump_fn_summary): Dump only when summary exists.
15924 (analyze_function_body): Use symbol_summary::get instead
15925 of get_create.
15926 (compute_fn_summary): Likewise.
15927 (estimate_edge_devirt_benefit): Likewise.
15928 (estimate_edge_size_and_time): Likewise.
15929 (inline_update_callee_summaries): Likewise.
15930 (remap_edge_change_prob): Likewise.
15931 (remap_edge_summaries): Likewise.
15932 (ipa_merge_fn_summary_after_inlining): Likewise.
15933 (write_ipa_call_summary): Likewise.
15934 (ipa_fn_summary_write): Likewise.
15935 (ipa_free_fn_summary): Likewise.
15936 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15937 (struct ipa_call_summary): Likewise.
15938 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15939 of get_create.
15940 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15941 (estimate_size_after_inlining): Likewise.
15942 (estimate_growth): Likewise.
15943 (growth_likely_positive): Likewise.
15944 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15945 (inline_call): Likewise.
15946 * ipa-inline.c (caller_growth_limits): Likewise.
15947 (can_inline_edge_p): Likewise.
15948 (can_inline_edge_by_limits_p): Likewise.
15949 (compute_uninlined_call_time): Likewise.
15950 (compute_inlined_call_time): Likewise.
15951 (want_inline_small_function_p): Likewise.
15952 (edge_badness): Likewise.
15953 (update_caller_keys): Likewise.
15954 (update_callee_keys): Likewise.
15955 (inline_small_functions): Likewise.
15956 (inline_to_all_callers_1): Likewise.
15957 (dump_overall_stats): Likewise.
15958 (early_inline_small_functions): Likewise.
15959 (early_inliner): Likewise.
15960 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15961 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15962 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15963 * ipa-split.c (execute_split_functions): Likewise.
15964 * symbol-summary.h: Likewise.
15965 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15966
15967 2018-06-19 Richard Biener <rguenther@suse.de>
15968
15969 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15970 (vectorize_loops): ... here. Fix dbgcnt handling.
15971 (try_vectorize_loop): Wrap try_vectorize_loop_1.
15972
15973 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
15974
15975 PR target/86197
15976 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15977 ieee128 argument takes up only one (vector) register, not two (floating
15978 point) registers.
15979
15980 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15981
15982 * gimplify.c (gimplify_init_constructor): Really never clear for an
15983 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15984
15985 2018-06-19 Richard Biener <rguenther@suse.de>
15986
15987 PR tree-optimization/86179
15988 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15989 after failed recognition.
15990
15991 2018-06-18 Martin Sebor <msebor@redhat.com>
15992
15993 PR middle-end/85602
15994 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15995 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15996 Handle integer subtraction.
15997 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15998 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15999
16000 2018-06-18 David Malcolm <dmalcolm@redhat.com>
16001
16002 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
16003 param from rtx to rtx_insn *.
16004 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
16005 param.
16006 (frv_ifcvt_modify_insn): Likwise.
16007 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
16008 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
16009 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
16010 as_a <rtx_insn *> cast to local "unprotected_region" once
16011 it's been established that it's not NULL or pc_rtx.
16012 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
16013 param "sethi" from rtx to rtx_insn *.
16014 (nds32_group_float_insns): Likewise for param "insn".
16015 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
16016 param.
16017 (vax_output_int_subtract): Likewise.
16018 * config/vax/vax.c (vax_output_int_add): Likewise for param
16019 "insn".
16020 (vax_output_int_subtract): Likewise.
16021 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
16022 (emit_pattern_after): Likewise for param "after".
16023 (emit_insn_after): Likewise.
16024 (emit_jump_insn_after): Likewise.
16025 (emit_call_insn_after): Likewise.
16026 (emit_debug_insn_after): Likewise.
16027 (emit_pattern_before): Likewise for param "before".
16028 (emit_insn_before): Likewise.
16029 (emit_jump_insn_before): Likewise.
16030 * final.c (get_insn_template): Likewise for param "insn", removing
16031 a cast.
16032 * output.h (get_insn_template): Likewise for 2nd param.
16033 * rtl.h (emit_insn_before): Likewise.
16034 (emit_jump_insn_before): Likewise.
16035 (emit_debug_insn_before_noloc): Likewise.
16036 (emit_insn_after): Likewise.
16037 (emit_jump_insn_after): Likewise.
16038 (emit_call_insn_after): Likewise.
16039 (emit_debug_insn_after): Likewise.
16040 (set_insn_deleted): Likewise for param.
16041
16042 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
16043
16044 PR target/85358
16045 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
16046 floating point modes, so that IFmode is numerically greater than
16047 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
16048 to declare the ordering. This prevents IFmode from being
16049 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
16050 machine. Include rs6000-modes.h to share the fractional values
16051 between genmodes* and the rest of the compiler.
16052 (IFmode): Likewise.
16053 (KFmode): Likewise.
16054 (TFmode): Likewise.
16055 * config/rs6000/rs6000-modes.h: New file.
16056 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
16057 meaning of rs6000_long_double_size so that 126..128 selects an
16058 appropriate 128-bit floating point type.
16059 (rs6000_option_override_internal): Likewise.
16060 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
16061 (TARGET_LONG_DOUBLE_128): Change the meaning of
16062 rs6000_long_double_size so that 126..128 selects an appropriate
16063 128-bit floating point type.
16064 (LONG_DOUBLE_TYPE_SIZE): Update comment.
16065 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
16066 source and destination to match the standard usage.
16067 (truncifkf2): Likewise.
16068 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
16069 ISA 2.07 to use an explicit clobber, instead of passing in a
16070 temporary.
16071 (copysign<mode>3_soft): Likewise.
16072
16073 2018-06-18 David Malcolm <dmalcolm@redhat.com>
16074
16075 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16076 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
16077 (vect_slp_analyze_instance_dependence): Likewise.
16078 (vect_enhance_data_refs_alignment): Likewise.
16079 (vect_analyze_data_refs_alignment): Likewise.
16080 (vect_slp_analyze_and_verify_instance_alignment
16081 (vect_analyze_data_ref_accesses): Likewise.
16082 (vect_prune_runtime_alias_test_list): Likewise.
16083 (vect_analyze_data_refs): Likewise.
16084 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
16085 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16086 (vect_analyze_scalar_cycles_1): Likewise.
16087 (vect_get_loop_niters): Likewise.
16088 (vect_analyze_loop_form_1): Likewise.
16089 (vect_update_vf_for_slp): Likewise.
16090 (vect_analyze_loop_operations): Likewise.
16091 (vect_analyze_loop): Likewise.
16092 (vectorizable_induction): Likewise.
16093 (vect_transform_loop): Likewise.
16094 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
16095 * tree-vect-slp.c (vect_analyze_slp): Likewise.
16096 (vect_make_slp_decision): Likewise.
16097 (vect_detect_hybrid_slp): Likewise.
16098 (vect_slp_analyze_operations): Likewise.
16099 (vect_slp_bb): Likewise.
16100 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
16101 (vectorizable_bswap): Likewise.
16102 (vectorizable_call): Likewise.
16103 (vectorizable_simd_clone_call): Likewise.
16104 (vectorizable_conversion): Likewise.
16105 (vectorizable_assignment): Likewise.
16106 (vectorizable_shift): Likewise.
16107 (vectorizable_operation): Likewise.
16108 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
16109
16110 2018-06-18 Martin Sebor <msebor@redhat.com>
16111
16112 PR tree-optimization/81384
16113 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
16114 * builtins.c (expand_builtin_strnlen): New function.
16115 (expand_builtin): Call it.
16116 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
16117 * builtins.def (BUILT_IN_STRNLEN): New.
16118 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
16119 Warn for bounds in excess of maximum object size.
16120 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
16121 single-value ranges. Handle strnlen.
16122 (handle_builtin_strlen): Handle strnlen.
16123 (strlen_check_and_optimize_stmt): Same.
16124 * doc/extend.texi (Other Builtins): Document strnlen.
16125
16126 2018-06-18 Maya Rashish <coypu@sdf.org>
16127
16128 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
16129 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
16130 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
16131
16132 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
16133 here to ...
16134 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
16135
16136 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16137
16138 * tree.c (escaped_string::escape): Replace cast to char * by
16139 const_cast<char *> (unescaped).
16140
16141 2018-06-18 Nick Clifton <nickc@redhat.com>
16142
16143 PR 84195
16144 * tree.c (escaped_string): New class. Converts an unescaped
16145 string into its escaped equivalent.
16146 (warn_deprecated_use): Use the new class to convert the
16147 deprecation message, if present.
16148 (test_escaped_strings): New self test.
16149 (test_c_tests): Add test_escaped_strings.
16150 * doc/extend.texi (deprecated): Add a note that the
16151 deprecation message is affected by the -fmessage-length
16152 option, and that control characters will be escaped.
16153 (#pragma GCC error): Document this pragma.
16154 (#pragma GCC warning): Likewise.
16155 * doc/invoke.texi (-fmessage-length): Document this option's
16156 effect on the #warning and #error preprocessor directives and
16157 the deprecated attribute.
16158
16159 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
16160
16161 * tree.c (decl_value_expr_lookup): Revert latest change.
16162 (decl_value_expr_insert): Likewise.
16163
16164 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
16165
16166 * gimplify.c (nonlocal_vlas): Delete.
16167 (nonlocal_vla_vars): Likewise.
16168 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
16169 referenced VLAs.
16170 (gimplify_body): Do not create and destroy nonlocal_vlas.
16171 * tree-nested.c: Include diagnostic.h.
16172 (use_pointer_in_frame): Tweak.
16173 (lookup_field_for_decl): Add assertion and declare the transformation.
16174 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
16175 internal error when the reference is in a wrong context. Do not
16176 create a debug decl by default.
16177 (note_nonlocal_block_vlas): Delete.
16178 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
16179 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
16180 create a debug decl by default.
16181 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
16182 call is in a wrong context.
16183 (fixup_vla_decls): New function.
16184 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
16185 debug variables were created.
16186 * tree.c (decl_value_expr_lookup): Add checking assertion.
16187 (decl_value_expr_insert): Likewise.
16188
16189 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
16190
16191 PR middle-end/82479
16192 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
16193 * tree-scalar-evolution.c (interpret_expr): Likewise.
16194 (expression_expensive_p): Likewise.
16195 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
16196 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
16197 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
16198 (ssa_defined_by_minus_one_stmt_p): New.
16199
16200 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
16201
16202 PR middle-end/64946
16203 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
16204 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
16205 * dojump.c (do_jump): Likewise.
16206 * expr.c (expand_expr_real_2): Check operand type's sign.
16207 * fold-const.c (const_unop): Handle ABSU_EXPR.
16208 (fold_abs_const): Likewise.
16209 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
16210 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
16211 (strip_sign_op_1): Likesise.
16212 * match.pd: Add new pattern to generate ABSU_EXPR.
16213 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
16214 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
16215 * tree-eh.c (operation_could_trap_helper_p): Likewise.
16216 * tree-inline.c (estimate_operator_cost): Likewise.
16217 * tree-pretty-print.c (dump_generic_node): Likewise.
16218 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
16219 * tree.def (ABSU_EXPR): New.
16220
16221 2018-06-16 Jakub Jelinek <jakub@redhat.com>
16222
16223 PR middle-end/86095
16224 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
16225 documented as preserved for backward compatibility only.
16226 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
16227
16228 PR rtl-optimization/86108
16229 * bb-reorder.c (create_forwarder_block): Renamed to ...
16230 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
16231 jump from new landing pad to the second part.
16232 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
16233 Adjust callers.
16234
16235 2018-06-15 Jakub Jelinek <jakub@redhat.com>
16236
16237 PR middle-end/85878
16238 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
16239 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
16240 Only call store_expr for halves if the mode is the same.
16241
16242 PR middle-end/86123
16243 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
16244 Fix up comment formatting.
16245
16246 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
16247
16248 * typed-splay-tree.h (typed_splay_tree::remove): New function.
16249 (typed_splay_tree::closure,
16250 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
16251 (typed_splay_tree::typed_splay_tree,
16252 typed_splay_tree::operator =): Declared private.
16253 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
16254 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
16255 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
16256 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
16257 typed_splay_tree::splay_tree_splay,
16258 typed_splay_tree::splay_tree_foreach_helper,
16259 typed_splay_tree::splay_tree_insert,
16260 typed_splay_tree::splay_tree_remove,
16261 typed_splay_tree::splay_tree_lookup,
16262 typed_splay_tree::splay_tree_predecessor,
16263 typed_splay_tree::splay_tree_successor,
16264 typed_splay_tree::splay_tree_min,
16265 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
16266 (typed_splay_tree::root, typed_splay_tree::comp,
16267 typed_splay_tree::delete_key,
16268 typed_splay_tree::delete_value): New data members.
16269 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
16270 typed_splay_tree::remove.
16271
16272 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
16273
16274 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
16275 -mginv and -mno-ginv to the assembler.
16276 * config/mips/mips.opt (-mcrc): New option.
16277 (-mginv): Likewise.
16278 * doc/invoke.text (-mcrc): Document.
16279 (-mginv): Likewise.
16280
16281 2018-06-15 Nick Clifton <nickc@redhat.com>
16282
16283 PR 84195
16284 * tree.c (escaped_string): New class. Converts an unescaped
16285 string into its escaped equivalent.
16286 (warn_deprecated_use): Use the new class to convert the
16287 deprecation message, if present.
16288 (test_escaped_strings): New self test.
16289 (test_c_tests): Add test_escaped_strings.
16290 * doc/extend.texi (deprecated): Add a note that the
16291 deprecation message is affected by the -fmessage-length
16292 option, and that control characters will be escaped.
16293 (#pragma GCC error): Document this pragma.
16294 (#pragma GCC warning): Likewise.
16295 * doc/invoke.texi (-fmessage-length): Document this option's
16296 effect on the #warning and #error preprocessor directives and
16297 the deprecated attribute.
16298
16299 2018-06-15 Richard Biener <rguenther@suse.de>
16300
16301 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
16302 here, also noting vector size used.
16303 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
16304 size used in MSG_OPTIMIZED_LOCATIONS dump.
16305 (pass_slp_vectorize::execute): Adjust.
16306
16307 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
16308
16309 PR target/85968
16310 * config/arc/arc.c (arc_return_address_register): Fix
16311 if-condition.
16312
16313 2018-06-15 Richard Biener <rguenther@suse.de>
16314
16315 PR middle-end/86159
16316 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
16317 leave useless conversion stripping to force_gimple_operand_gsi.
16318 (gimplify_build2): Likewise.
16319 (gimplify_build1): Likewise.
16320
16321 2018-06-15 Richard Biener <rguenther@suse.de>
16322
16323 PR middle-end/86076
16324 * tree-cfg.c (move_stmt_op): unshare invariant addresses
16325 before adjusting their block.
16326
16327 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
16328
16329 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
16330 multilibs for *-*-rtems*.
16331 * config/riscv/t-rtems: New file.
16332
16333 2018-06-14 Jakub Jelinek <jakub@redhat.com>
16334
16335 PR middle-end/86122
16336 * match.pd ((A +- CST1) +- CST2): Punt if last resort
16337 unsigned_type_for returns NULL.
16338
16339 PR target/85945
16340 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
16341 subregs of multi-word pseudos unless the float mode has word size.
16342
16343 2018-06-14 Richard Biener <rguenther@suse.de>
16344
16345 PR middle-end/86139
16346 * tree-vect-generic.c (build_word_mode_vector_type): Remove
16347 duplicate and harmful type_hash_canon.
16348 * tree.c (type_hash_canon): Assert we didn't find ourselves.
16349
16350 2018-06-14 Richard Biener <rguenther@suse.de>
16351
16352 PR ipa/86124
16353 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
16354 NULL cgraph_node.
16355
16356 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
16357
16358 * config/rtems.h (STDINT_LONG32): Define.
16359
16360 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
16361 Prachi Godbole <prachi.godbole@imgtec.com>
16362
16363 * config/mips/mips-cpus.def: Define P6600.
16364 * config/mips/mips-tables.opt: Regenerate.
16365 * config/mips/mips.c (mips_ucbranch_type): New enum.
16366 (mips_rtx_cost_data): Add support for P6600.
16367 (mips_issue_rate): Likewise.
16368 (mips_multipass_dfa_lookahead): Likewise.
16369 (mips_avoid_hazard): Likewise.
16370 (mips_reorg_process_insns): Likewise.
16371 (mips_classify_branch_p6600): New function.
16372 * config/mips/mips.h (TUNE_P6600): New define.
16373 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
16374 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
16375 * config/mips/mips.md: Include p6600.md.
16376 (processor): Add p6600.
16377 * config/mips/p6600.md: New file.
16378 * doc/invoke.texi: Add p6600 to supported architectures.
16379
16380 2018-06-13 Martin Sebor <msebor@redhat.com>
16381
16382 PR tree-optimization/86114
16383 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
16384 of integer types.
16385 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
16386
16387 2018-06-13 Richard Biener <rguenther@suse.de>
16388
16389 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
16390 Properly set vector type of the intermediate stmt.
16391 * tree-vect-stmts.c (vectorizable_operation): The destination
16392 var always has vectype_out type.
16393
16394 2018-06-13 Jeff Law <law@redhat.com>
16395
16396 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
16397 integer 0 for argument to print_rtl_with_bb.
16398 (rl78_reorg): Likewise.
16399
16400 2018-06-13 David Malcolm <dmalcolm@redhat.com>
16401
16402 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
16403 from rtx to rtx_insn *.
16404 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
16405 "label".
16406 (add_sched_insns_for_speculation): Likewise for local "target",
16407 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16408 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
16409 from rtx_insn ** to rtx_code_label **.
16410 (reorg_emit_nops): Likewise.
16411 (c6x_reorg): Likewise for local "call_labels".
16412 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
16413 rtx to rtx_insn *.
16414 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
16415 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
16416 the loops over LABEL_REFS.
16417 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
16418 braf_label.
16419 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16420 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
16421 (split_branches): Strengthen local "olabel" from rtx to
16422 rtx_insn *, adding a safe_as_a cast.
16423 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
16424 to "rtx_insn *".
16425 (add_insn_after): Likewise for first two params.
16426 (add_insn_before): Likewise.
16427 (remove_insn): Likewise for param.
16428 (emit_pattern_before_noloc): Likewise for second and third params.
16429 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
16430 (emit_call_insn_before_noloc): Likewise.
16431 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
16432 to "rtx_insn *".
16433 (emit_barrier_before): Likewise.
16434 (emit_label_before): Strengthen "label" param from "rtx" to
16435 "rtx_code_label *". Strengthen "before" param from "rtx" to
16436 "rtx_insn *".
16437 (emit_insn_after_1): Strengthen "after" param from "rtx" to
16438 "rtx_insn *".
16439 (emit_pattern_after_noloc): Likewise.
16440 (emit_insn_after_noloc): Likewise.
16441 (emit_jump_insn_after_noloc): Likewise.
16442 (emit_call_insn_after_noloc): Likewise.
16443 (emit_debug_insn_after_noloc): Likewise.
16444 (emit_barrier_after): Likewise.
16445 (emit_label_after): Likewise for both params.
16446 (emit_pattern_after_setloc): Likewise for "after" param. Convert
16447 "loc" param from "int" to "location_t".
16448 (emit_insn_after_setloc): Likewise.
16449 (emit_jump_insn_after_setloc): Likewise.
16450 (emit_call_insn_after_setloc): Likewise.
16451 (emit_debug_insn_after_setloc): Likewise.
16452 (emit_pattern_before_setloc): Likewise for "before" param. Convert
16453 "loc" param from "int" to "location_t".
16454 (emit_pattern_before): Convert NULL_RTX to NULL.
16455 (emit_insn_before_setloc): Convert "loc" param from "int" to
16456 "location_t".
16457 (emit_jump_insn_before_setloc): Likewise.
16458 (emit_call_insn_before_setloc): Likewise.
16459 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
16460 rtx_insn *. Convert "loc" param from "int" to "location_t".
16461 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
16462 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
16463 Convert 3rd param from "int" to "location_t".
16464 (emit_barrier_before, emit_barrier_after, next_real_insn):
16465 Strengthen param from rtx to rtx_insn *.
16466 (emit_label_before): Strengthen 1st param from "rtx" to
16467 "rtx_code_label *". Strengthen 2nd param from "rtx" to
16468 "rtx_insn *".
16469 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
16470 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
16471 Strengthen 2nd param from "rtx" to "rtx_insn *".
16472 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
16473 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
16474 Likewise. Convert 3rd param from "int" to "location_t".
16475 (emit_label_after): Strengthen 1st param from "rtx" to
16476 "rtx_code_label *".
16477 (next_real_insn, remove_insn): Strengthen param from "rtx" to
16478 "rtx_insn *".
16479 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
16480 from "rtx" to "rtx_insn *".
16481
16482 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
16483
16484 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
16485 bodies streamed in with -Q.
16486 * dumpfile.c (dump_files): Add lto-stream-out dump file.
16487 * dumpfile.h (tree_dump_index): Add lto_stream_out.
16488 * gimple-streamer-out.c: Include gimple-pretty-print.h
16489 (output_bb): Dump stmts streamed.
16490 * lto-section-out.c: Include print-tree.h
16491 (lto_begin_section): Dump sections created.
16492 (lto_output_decl_index): Dump decl encoded.
16493 * lto-streamer-out.c: Include print-tree.h
16494 (create_output_block): Dump output block created.
16495 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
16496 (output_function): Dump function output.
16497 (output_constructor): Dump constructor streamed.
16498 (write_global_stream): Output indexes encoded.
16499 (produce_asm_for_decls): Dump streams encoded.
16500 * lto-streamer.c (streamer_dump_file): New global var.
16501 * lto-streamer.h (streamer_dump_file): Declare.
16502 * passes.c (ipa_write_summaries): Initialize streamer dump.
16503 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
16504 in.
16505
16506 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
16507
16508 PR target/86048
16509 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
16510 offsets for register save directives. Emit a second batch of save
16511 directives, if need be, when the function accesses prior frames.
16512
16513 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16514
16515 * config/arc/fpu.md (fmasf4): Force operand to register.
16516 (fnmasf4): Likewise.
16517
16518 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16519
16520 * config/arc/arc-protos.h (arc_pad_return): Remove.
16521 * config/arc/arc.c (machine_function): Remove force_short_suffix
16522 and size_reason.
16523 (arc_print_operand): Adjust printing of '&'.
16524 (arc_verify_short): Remove conditional printing of short suffix.
16525 (arc_final_prescan_insn): Remove reference to size_reason.
16526 (pad_return): New function.
16527 (arc_reorg): Call pad_return.
16528 (arc_pad_return): Remove.
16529 (arc_init_machine_status): Remove reference to force_short_suffix.
16530 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
16531 (attr length): When attribute iscompact is true force to 2
16532 regardless; in the case of maybe check if we want to force the
16533 instruction to have 4 bytes length.
16534 (nopv): Change it to generate 4 byte long nop as well.
16535 (blockage): New pattern.
16536 (simple_return): Remove call to arc_pad_return.
16537 (p_return_i): Likewise.
16538
16539 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16540
16541 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
16542
16543 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16544
16545 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
16546 ARC cores.
16547
16548 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16549
16550 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
16551 for ARC700 and ARCv2.
16552
16553 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
16554
16555 PR target/86076
16556 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
16557 operands[2] instead of operands[1].
16558
16559
16560 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16561
16562 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
16563 case, check whether the outer register overlaps an unallocatable
16564 register, not just whether it fits the required class.
16565
16566 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16567
16568 * poly-int.h (can_div_trunc_p): Add new overload in which all values
16569 are poly_ints.
16570 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
16571 (memrefs_conflict_p): Likewise.
16572 (init_alias_analysis): Likewise.
16573 * cfgexpand.c (expand_debug_expr): Likewise.
16574 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
16575 * cse.c (fold_rtx): Likewise.
16576 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
16577 * expr.c (emit_block_move_hints): Likewise.
16578 (clear_storage_hints, push_block, emit_push_insn): Likewise.
16579 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
16580 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
16581 (emit_group_store): Likewise.
16582 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
16583 to read the PRE/POST_MODIFY increment.
16584 * calls.c (store_one_arg): Use strip_offset.
16585 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
16586 poly_int_rtx_p.
16587 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
16588 by a VEC_SELECT.
16589 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
16590 (simplify_binary_operation_1): Extend CONST_INT handling to
16591 poly_int_rtx_p.
16592 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
16593 than a HOST_WIDE_INT.
16594 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
16595 poly_int64.
16596 (adjust_mems, add_stores): Update accodingly.
16597 (vt_canonicalize_addr): Track polynomial offsets.
16598 (emit_note_insn_var_location): Likewise.
16599 (vt_add_function_parameter): Likewise.
16600 (vt_initialize): Likewise.
16601
16602 2018-06-12 Jeff Law <law@redhat.com>
16603
16604 * config.gcc (alpha*-*-freebsd*): Remove.
16605 * config/alpha/freebsd.h: Remove.
16606
16607 2018-06-12 David Malcolm <dmalcolm@redhat.com>
16608
16609 PR other/69968
16610 * spellcheck-tree.c (levenshtein_distance): Rename to...
16611 (get_edit_distance): ...this, and update for underlying renaming.
16612 * spellcheck-tree.h (levenshtein_distance): Rename to...
16613 (get_edit_distance): ...this.
16614 * spellcheck.c (levenshtein_distance): Rename to...
16615 (get_edit_distance): ...this. Convert from Levenshtein distance
16616 to Damerau-Levenshtein distance by supporting transpositions of
16617 adjacent characters. Rename "v1" to "v_next" and "v0" to
16618 "v_one_ago".
16619 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
16620 (selftest::test_edit_distance_unit_test_oneway): ...this, and
16621 update for underlying renaming.
16622 (selftest::levenshtein_distance_unit_test): Rename to...
16623 (selftest::test_get_edit_distance_unit): ...this, and update for
16624 underlying renaming.
16625 (selftest::test_find_closest_string): Add example from PR 69968
16626 where transposition helps
16627 (selftest::test_metric_conditions): Update for renaming.
16628 (selftest::test_metric_conditions): Likewise.
16629 (selftest::spellcheck_c_tests): Likewise.
16630 * spellcheck.h (levenshtein_distance): Rename both overloads to...
16631 (get_edit_distance): ...this.
16632 (best_match::consider): Update for renaming.
16633
16634 2018-06-12 Martin Sebor <msebor@redhat.com>
16635
16636 PR tree-optimization/85259
16637 * builtins.c (compute_objsize): Handle constant offsets.
16638 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
16639 true iff a warning has been issued.
16640 * gimple.h (gimple_nonartificial_location): New function.
16641 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
16642 gimple_nonartificial_location and handle -Wno-system-headers.
16643 (handle_builtin_stxncpy): Same.
16644
16645 2018-06-12 Martin Sebor <msebor@redhat.com>
16646
16647 PR c/85931
16648 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
16649
16650 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
16651
16652 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16653 BUILTIN_VEC_XST entries for pointer to double and long long.
16654
16655 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
16656
16657 PR target/85990
16658 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16659 Update comments.
16660 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16661 Likewise.
16662
16663 2018-06-12 Martin Liska <mliska@suse.cz>
16664
16665 * doc/options.texi: Document IntegerRange.
16666
16667 2018-06-12 Martin Liska <mliska@suse.cz>
16668
16669 * config/i386/i386.opt: Make MPX-related options as Deprecated.
16670 * opt-functions.awk: Handle Deprecated flag.
16671 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
16672 and report error.
16673 (read_cmdline_option): Report warning for a deprecated option.
16674 * opts.h (struct cl_option): Add new field cl_deprecated.
16675 (CL_ERR_DEPRECATED): New.
16676
16677 2018-06-12 Martin Liska <mliska@suse.cz>
16678
16679 * doc/options.texi: Document Deprecated option flag.
16680
16681 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16682
16683 * config/arc/arc-arch.h (arc_extras): New enum.
16684 (arc_cpu_t):Add field extra.
16685 (arc_cpu_types): Consider the extras.
16686 * config/arc/arc-cpus.def: Add extras info.
16687 * config/arc/arc-opts.h (processor_type): Consider extra field.
16688 * config/arc/arc.c (arc_override_options): Handle extra field.
16689
16690 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16691
16692 * config/arc/arc-arch.h: Update ARC_OPTX macro.
16693 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16694 field.
16695 * config/arc/arc.c (arc_init): Update pic warning.
16696 (irq_range): Update irq range parsing warnings.
16697 (arc_override_options): Update various warning messages.
16698 (arc_handle_aux_attribute): Likewise.
16699
16700 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
16701
16702 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16703
16704 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16705
16706 * doc/sourcebuild.texi: Document usage of line number 0 in verify
16707 compiler messages directives.
16708
16709 2018-06-12 Matthew Fortune <mfortune@gmail.com>
16710
16711 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16712 * config/mips/mips-tables.opt: Regenerate.
16713 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16714 mips64r6.
16715 * doc/invoke.texi: Document -march=i6500.
16716
16717 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
16718
16719 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16720 (i6400_gpmul): Add cpu_unit.
16721 (i6400_gpdiv): Likewise.
16722 (i6400_msa_add_d): Update reservations.
16723 (i6400_msa_int_add) Likewise.
16724 (i6400_msa_short_logic3) Likewise.
16725 (i6400_msa_short_logic2) Likewise.
16726 (i6400_msa_short_logic) Likewise.
16727 (i6400_msa_move) Likewise.
16728 (i6400_msa_cmp) Likewise.
16729 (i6400_msa_short_float2) Likewise.
16730 (i6400_msa_div_d) Likewise.
16731 (i6400_msa_long_logic1) Likewise.
16732 (i6400_msa_long_logic2) Likewise.
16733 (i6400_msa_mult) Likewise.
16734 (i6400_msa_long_float2) Likewise.
16735 (i6400_msa_long_float4) Likewise.
16736 (i6400_msa_long_float5) Likewise.
16737 (i6400_msa_long_float8) Likewise.
16738 (i6400_fpu_fadd): Include frint type.
16739 (i6400_fpu_store): New define_insn_reservation.
16740 (i6400_fpu_load): Likewise.
16741 (i6400_fpu_move): Likewise.
16742 (i6400_fpu_fcmp): Likewise.
16743 (i6400_fpu_fmadd): Likewise.
16744 (i6400_int_mult): Include imul3nc type and update reservation.
16745 (i6400_int_div): Include idiv3 type and update reservation.
16746 (i6400_int_load): Update to check type not move_type.
16747 (i6400_int_store): Likewise.
16748 (i6400_int_prefetch): Set zero latency.
16749
16750 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
16751
16752 * gcc.c: Document new %@{...} sequence.
16753 (LINK_COMMAND_SPEC): Use it for the -L switches.
16754 (cpp_unique_options): Use it for the -I switches.
16755 (at_file_argbuf): New global variable.
16756 (in_at_file): Likewise.
16757 (alloc_args): Create at_file_argbuf.
16758 (clear_args): Truncate at_file_argbuf.
16759 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16760 (open_at_file): New function.
16761 (close_at_file): Likewise.
16762 (create_at_file): Delete.
16763 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
16764 <'o'>: Likewise.
16765 <'@'>: New case.
16766 (validate_switches_from_spec): Deal with %@{...} sequence.
16767 (validate_switches): Likewise.
16768 (driver::finalize): Call clear_args.
16769
16770 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
16771
16772 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
16773
16774 2018-06-11 Martin Sebor <msebor@redhat.com>
16775
16776 * doc/invoke.texi (-Wall): List -Wc++17-compat.
16777 (Wno-class-memaccess): Add @opindex.
16778 (Wno-templates, Wno-multiple-inheritance): Same.
16779 (Wno-virtual-inheritance, Wno-namespaces): Same.
16780 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
16781 (Wno-format-overflow, Wno-format-truncation): Same.
16782 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
16783 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
16784 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
16785 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
16786 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
16787 (Wno-misspelled-isr): Same.
16788
16789 2018-06-11 Martin Sebor <msebor@redhat.com>
16790
16791 * PR tree-optimization/86083
16792 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
16793
16794 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
16795
16796 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
16797
16798 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
16799
16800 PR target/85755
16801 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
16802 on the correct operand.
16803 (*movdi_internal64): Ditto.
16804
16805 2018-06-11 Martin Liska <mliska@suse.cz>
16806
16807 PR tree-optimization/86089
16808 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
16809
16810 2018-06-11 Julia Koval <julia.koval@intel.com>
16811
16812 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
16813 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
16814 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
16815
16816 2018-06-11 Olivier Hainque <hainque@adacore.com>
16817
16818 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
16819 for Ada with strict dwarf2.
16820
16821 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
16822
16823 PR target/85755
16824 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16825 addresses.
16826
16827 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
16828
16829 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16830
16831 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
16832
16833 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16834 TARGET_ELF.
16835
16836 2018-06-08 Martin Liska <mliska@suse.cz>
16837
16838 * tree-cfg.h (debug_function): Fix argument type to match
16839 implementation.
16840
16841 2018-06-08 Martin Liska <mliska@suse.cz>
16842
16843 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16844 Remove usage of MPX-related (and removed) fields.
16845 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16846
16847 2018-06-08 David Malcolm <dmalcolm@redhat.com>
16848
16849 * cfg.c (debug): Use TDF_NONE rather than 0.
16850 * cfghooks.c (debug): Likewise.
16851 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16852 (struct dump_option_value_info): Convert to...
16853 (struct kv_pair): ...this template type.
16854 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16855 rather than 0.
16856 (optinfo_verbosity_options): Likewise.
16857 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16858 OPTGROUP_NONE.
16859 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16860 than int for "optgroup_flags" param.
16861 (dump_generic_expr_loc): Use dump_flags_t rather than int for
16862 "dump_kind" param.
16863 (dump_dec): Likewise.
16864 (dump_finish): Use TDF_NONE rather than 0.
16865 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16866 rather than int for "optgroup_flags" param. Use TDF_NONE rather
16867 than 0. Update for change to option_ptr.
16868 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16869 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
16870 0. Update for changes to optinfo_verbosity_options and
16871 optgroup_options.
16872 (opt_info_switch_p): Convert optgroup_flags from int to
16873 optgroup_flags_t.
16874 (dump_basic_block): Use dump_flags_t rather than int
16875 for "dump_kind" param.
16876 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16877 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16878 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16879 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16880 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16881 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16882 TDF_NONE): Convert from macros to...
16883 (enum dump_flag): ...this new enum.
16884 (dump_flags_t): Update to use enum.
16885 (operator|, operator&, operator~, operator|=, operator&=):
16886 Implement for dump_flags_t.
16887 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16888 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16889 Convert from macros to...
16890 (enum optgroup_flag): ...this new enum.
16891 (optgroup_flags_t): New typedef.
16892 (operator|, operator|=): Implement for optgroup_flags_t.
16893 (struct dump_file_info): Convert field "alt_flags" to
16894 dump_flags_t. Convert field "optgroup_flags" to
16895 optgroup_flags_t.
16896 (dump_basic_block): Use dump_flags_t rather than int for param.
16897 (dump_generic_expr_loc): Likewise.
16898 (dump_dec): Likewise.
16899 (dump_register): Convert param "optgroup_flags" to
16900 optgroup_flags_t.
16901 (opt_info_enable_passes): Likewise.
16902 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16903 than 0.
16904 * gimple-pretty-print.c (debug): Likewise.
16905 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16906 (merged_store_group::apply_stores): Likewise.
16907 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16908 * gimple.c (verify_gimple_pp): Likewise.
16909 * graphite-poly.c (print_pbb_body): Likewise.
16910 * passes.c (pass_manager::register_one_dump_file): Convert
16911 local "optgroup_flags" to optgroup_flags_t.
16912 * print-tree.c (print_node): Use TDF_NONE rather than 0.
16913 (debug): Likewise.
16914 (debug_body): Likewise.
16915 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16916 to optgroup_flags_t.
16917 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16918 than 0.
16919 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16920 (convert_mult_to_fma): Likewise.
16921 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16922 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16923 * tree-vect-data-refs.c (dump_lower_bound): Convert param
16924 "dump_kind" to dump_flags_t.
16925
16926 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16927
16928 * config/rs6000/rs6000.c (min, max): Delete.
16929
16930 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16931
16932 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16933 -mabi=spe and -mabi=no-spe.
16934
16935 2018-06-08 Martin Liska <mliska@suse.cz>
16936
16937 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16938 where we expect an existing summary.
16939
16940 2018-06-08 Martin Liska <mliska@suse.cz>
16941
16942 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16943 * ipa-inline.h (estimate_edge_growth): Likewise.
16944
16945 2018-06-08 Martin Liska <mliska@suse.cz>
16946
16947 * cgraph.c (function_version_hasher::hash): Use
16948 cgraph_node::get_uid ().
16949 (function_version_hasher::equal):
16950 * cgraph.h (cgraph_node::get_uid): New method.
16951 * ipa-inline.c (update_caller_keys): Use
16952 cgraph_node::get_uid ().
16953 (update_callee_keys): Likewise.
16954 * ipa-utils.c (searchc): Likewise.
16955 (ipa_reduced_postorder): Likewise.
16956 * lto-cgraph.c (input_node): Likewise.
16957 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16958 * symbol-summary.h (symtab_insertion): Likewise.
16959 (symtab_removal): Likewise.
16960 (symtab_duplication): Likewise.
16961 * tree-pretty-print.c (dump_function_header): Likewise.
16962 * tree-sra.c (convert_callers_for_node): Likewise.
16963
16964 2018-06-08 Martin Liska <mliska@suse.cz>
16965
16966 * cgraph.c (symbol_table::create_edge): Always assign a new
16967 unique number.
16968 (symbol_table::free_edge): Do not recycle numbers.
16969 * cgraph.h (cgraph_edge::get): New method.
16970 * symbol-summary.h (symtab_removal): Use it.
16971 (symtab_duplication): Likewise.
16972 (call_summary::hashable_uid): Remove.
16973
16974 2018-06-08 Martin Liska <mliska@suse.cz>
16975
16976 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16977 (initialize_growth_caches): Remove.
16978 (free_growth_caches): Likewise.
16979 (do_estimate_edge_time): Use edge_growth_cache.
16980 (do_estimate_edge_size): Likewise.
16981 (do_estimate_edge_hints): Likewise.
16982 * ipa-inline.c (reset_edge_caches): Likewise.
16983 (recursive_inlining): Likewise.
16984 (inline_small_functions): Likewise.
16985 * ipa-inline.h (initialize_growth_caches): Remove.
16986 (estimate_edge_size): Likewise.
16987 (estimate_edge_time): Likewise.
16988 (estimate_edge_hints): Likewise.
16989 (reset_edge_growth_cache): Likewise.
16990 * symbol-summary.h (call_summary::remove): New method.
16991
16992 2018-06-08 Martin Liska <mliska@suse.cz>
16993
16994 * ipa-cp.c (class edge_clone_summary): New summary.
16995 (grow_edge_clone_vectors): Remove.
16996 (ipcp_edge_duplication_hook): Remove.
16997 (class edge_clone_summary_t): New call_summary class.
16998 (ipcp_edge_removal_hook): Remove.
16999 (edge_clone_summary_t::duplicate): New function.
17000 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
17001 (create_specialized_node): Likewise.
17002 (ipcp_driver): Initialize edge_clone_summaries and do not
17003 register hooks.
17004
17005 2018-06-08 Martin Liska <mliska@suse.cz>
17006
17007 * symbol-summary.h (get): New function.
17008 (call_summary::m_initialize_when_cloning): New class member.
17009
17010 2018-06-08 Martin Liska <mliska@suse.cz>
17011
17012 * cgraph.c (cgraph_node::remove): Do not recycle uid.
17013 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
17014 (symbol_table::allocate_cgraph_symbol): Do not set uid.
17015 * passes.c (uid_hash_t): Record removed_nodes by their uids.
17016 (remove_cgraph_node_from_order): Use the removed_nodes set.
17017 (do_per_function_toporder): Likwise.
17018 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
17019 instead of summary_uid.
17020 (symtab_removal): Likewise.
17021 (symtab_duplication): Likewise.
17022
17023 2018-06-08 Martin Liska <mliska@suse.cz>
17024
17025 * ipa-cp.c (ipcp_store_bits_results): Use
17026 ipcp_transformation_sum.
17027 (ipcp_store_vr_results): Likewise.
17028 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
17029 to ...
17030 (ipcp_transformation_initialize): ... this.
17031 (ipa_set_node_agg_value_chain):
17032 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
17033 (write_ipcp_transformation_info): Likewise.
17034 (read_ipcp_transformation_info): Likewise.
17035 (ipcp_update_bits): Likewise.
17036 (ipcp_update_vr): Likewise.
17037 (ipcp_transform_function): Likewise.
17038 * ipa-prop.h: Rename ipcp_transformation_summary to
17039 ipcp_transformation.
17040 (class ipcp_transformation_t): New function summary.
17041 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
17042 (ipa_get_agg_replacements_for_node): Likewise.
17043
17044 2018-06-08 Martin Liska <mliska@suse.cz>
17045
17046 * ipa-pure-const.c (struct funct_state_d): Do it class instead
17047 of struct.
17048 (class funct_state_summary_t): New function_summary class.
17049 (has_function_state): Remove.
17050 (get_function_state): Likewise.
17051 (set_function_state): Likewise.
17052 (add_new_function): Likewise.
17053 (funct_state_summary_t::insert): New function.
17054 (duplicate_node_data): Remove.
17055 (remove_node_data): Remove.
17056 (funct_state_summary_t::duplicate): New function.
17057 (register_hooks): Create new funct_state_summaries.
17058 (pure_const_generate_summary): Use it.
17059 (pure_const_write_summary): Likewise.
17060 (pure_const_read_summary): Likewise.
17061 (propagate_pure_const): Likewise.
17062 (propagate_nothrow): Likewise.
17063 (dump_malloc_lattice): Likewise.
17064 (propagate_malloc): Likewise.
17065 (execute): Do not register hooks, just remove summary
17066 instead.
17067 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
17068 constructor.
17069
17070 2018-06-08 Martin Liska <mliska@suse.cz>
17071
17072 * ipa-reference.c (remove_node_data): Remove.
17073 (duplicate_node_data): Likewise.
17074 (class ipa_ref_var_info_summary_t): New class.
17075 (class ipa_ref_opt_summary_t): Likewise.
17076 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
17077 (get_reference_optimization_summary): Use
17078 ipa_ref_opt_sum_summaries.
17079 (set_reference_vars_info): Remove.
17080 (set_reference_optimization_summary): Likewise.
17081 (ipa_init): Create summaries.
17082 (init_function_info): Use function summary.
17083 (ipa_ref_opt_summary_t::duplicate): New function.
17084 (ipa_ref_opt_summary_t::remove): New function.
17085 (get_read_write_all_from_node): Fix GNU coding style.
17086 (propagate): Use function summary.
17087 (write_node_summary_p): Fix GNU coding style.
17088 (stream_out_bitmap): Likewise.
17089 (ipa_reference_read_optimization_summary): Use function summary.
17090 (ipa_reference_c_finalize): Do not release hooks.
17091
17092 2018-06-08 Martin Liska <mliska@suse.cz>
17093
17094 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
17095 (analyze_function_body): Extract multiple calls of get_create.
17096 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17097 * ipa-inline.c (recursive_inlining): Use ::get method.
17098 * ipa-inline.h (estimate_edge_growth): Likewise.
17099
17100 2018-06-08 Martin Liska <mliska@suse.cz>
17101
17102 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
17103 HSA_INVALID.
17104 (hsa_function_summary::hsa_function_summary): Use the new enum
17105 value.
17106 (hsa_gpu_implementation_p): Use hsa_summaries::get.
17107 * hsa-gen.c (hsa_get_host_function): Likewise.
17108 (get_brig_function_name): Likewise.
17109 * ipa-hsa.c (process_hsa_functions): Likewise.
17110 (ipa_hsa_write_summary): Likewise.
17111 * symbol-summary.h (symtab_duplication): Use ::get function/
17112 (get): New function.
17113
17114 2018-06-08 Martin Liska <mliska@suse.cz>
17115
17116 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
17117 of get.
17118 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
17119 (hsa_register_kernel): Likewise.
17120 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
17121 * hsa-gen.c (hsa_get_host_function): Likewise.
17122 (get_brig_function_name): Likewise.
17123 (generate_hsa): Likewise.
17124 (pass_gen_hsail::execute): Likewise.
17125 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
17126 (devirtualization_time_bonus): Likewise.
17127 (ipcp_propagate_stage): Likewise.
17128 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17129 (edge_set_predicate): Likewise.
17130 (evaluate_conditions_for_known_args): Likewise.
17131 (evaluate_properties_for_edge): Likewise.
17132 (ipa_fn_summary::reset): Likewise.
17133 (ipa_fn_summary_t::duplicate): Likewise.
17134 (dump_ipa_call_summary): Likewise.
17135 (ipa_dump_fn_summary): Likewise.
17136 (analyze_function_body): Likewise.
17137 (compute_fn_summary): Likewise.
17138 (estimate_edge_devirt_benefit): Likewise.
17139 (estimate_edge_size_and_time): Likewise.
17140 (estimate_calls_size_and_time): Likewise.
17141 (estimate_node_size_and_time): Likewise.
17142 (inline_update_callee_summaries): Likewise.
17143 (remap_edge_change_prob): Likewise.
17144 (remap_edge_summaries): Likewise.
17145 (ipa_merge_fn_summary_after_inlining): Likewise.
17146 (ipa_update_overall_fn_summary): Likewise.
17147 (read_ipa_call_summary): Likewise.
17148 (inline_read_section): Likewise.
17149 (write_ipa_call_summary): Likewise.
17150 (ipa_fn_summary_write): Likewise.
17151 (ipa_free_fn_summary): Likewise.
17152 * ipa-hsa.c (process_hsa_functions): Likewise.
17153 (ipa_hsa_write_summary): Likewise.
17154 (ipa_hsa_read_section): Likewise.
17155 * ipa-icf.c (sem_function::merge): Likewise.
17156 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17157 (do_estimate_edge_time): Likewise.
17158 (estimate_size_after_inlining): Likewise.
17159 (estimate_growth): Likewise.
17160 (growth_likely_positive): Likewise.
17161 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17162 (inline_call): Likewise.
17163 * ipa-inline.c (caller_growth_limits): Likewise.
17164 (can_inline_edge_p): Likewise.
17165 (can_inline_edge_by_limits_p): Likewise.
17166 (compute_uninlined_call_time): Likewise.
17167 (compute_inlined_call_time): Likewise.
17168 (want_inline_small_function_p): Likewise.
17169 (edge_badness): Likewise.
17170 (update_caller_keys): Likewise.
17171 (update_callee_keys): Likewise.
17172 (recursive_inlining): Likewise.
17173 (inline_small_functions): Likewise.
17174 (inline_to_all_callers_1): Likewise.
17175 (dump_overall_stats): Likewise.
17176 (early_inline_small_functions): Likewise.
17177 (early_inliner): Likewise.
17178 * ipa-inline.h (estimate_edge_growth): Likewise.
17179 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17180 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17181 * ipa-prop.h (IPA_NODE_REF): Likewise.
17182 (IPA_EDGE_REF): Likewise.
17183 * ipa-pure-const.c (malloc_candidate_p): Likewise.
17184 (propagate_malloc): Likewise.
17185 * ipa-split.c (execute_split_functions): Likewise.
17186 * symbol-summary.h: Rename get to get_create.
17187 (get): Likewise.
17188 (get_create): Likewise.
17189 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17190
17191 2018-06-08 Martin Liska <mliska@suse.cz>
17192
17193 * symbol-summary.h (release): Move definition out of class
17194 declaration.
17195 (symtab_removal): Likewise.
17196 (symtab_duplication): Likewise.
17197
17198 2018-06-08 Martin Liska <mliska@suse.cz>
17199
17200 * symbol-summary.h (function_summary): Move constructor
17201 implementation out of class declaration.
17202 (release): Likewise.
17203 (symtab_insertion): Likewise.
17204 (symtab_removal): Likewise.
17205 (symtab_duplication): Likewise.
17206 (get): Likewise.
17207
17208 2018-06-08 Martin Liska <mliska@suse.cz>
17209
17210 * Makefile.in: Remove support for MPX (macros, related functions,
17211 fields in cgraph_node, ...).
17212 * builtin-types.def (BT_BND): Likewise.
17213 (BT_FN_BND_CONST_PTR): Likewise.
17214 (BT_FN_CONST_PTR_BND): Likewise.
17215 (BT_FN_VOID_PTR_BND): Likewise.
17216 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
17217 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
17218 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
17219 (expand_builtin_mempcpy_with_bounds): Likewise.
17220 (expand_builtin_memset_with_bounds): Likewise.
17221 (expand_builtin_memset_args): Likewise.
17222 (std_expand_builtin_va_start): Likewise.
17223 (expand_builtin): Likewise.
17224 (expand_builtin_with_bounds): Likewise.
17225 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
17226 (DEF_LIB_BUILTIN_CHKP): Likewise.
17227 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
17228 (DEF_CHKP_BUILTIN): Likewise.
17229 (BUILT_IN_MEMCPY): Likewise.
17230 (BUILT_IN_MEMMOVE): Likewise.
17231 (BUILT_IN_MEMPCPY): Likewise.
17232 (BUILT_IN_MEMSET): Likewise.
17233 (BUILT_IN_STPCPY): Likewise.
17234 (BUILT_IN_STRCAT): Likewise.
17235 (BUILT_IN_STRCHR): Likewise.
17236 (BUILT_IN_STRCPY): Likewise.
17237 (BUILT_IN_STRLEN): Likewise.
17238 (BUILT_IN_MEMCPY_CHK): Likewise.
17239 (BUILT_IN_MEMMOVE_CHK): Likewise.
17240 (BUILT_IN_MEMPCPY_CHK): Likewise.
17241 (BUILT_IN_MEMSET_CHK): Likewise.
17242 (BUILT_IN_STPCPY_CHK): Likewise.
17243 (BUILT_IN_STRCAT_CHK): Likewise.
17244 (BUILT_IN_STRCPY_CHK): Likewise.
17245 * calls.c (store_bounds): Likewise.
17246 (emit_call_1): Likewise.
17247 (special_function_p): Likewise.
17248 (maybe_warn_nonstring_arg): Likewise.
17249 (initialize_argument_information): Likewise.
17250 (finalize_must_preallocate): Likewise.
17251 (compute_argument_addresses): Likewise.
17252 (expand_call): Likewise.
17253 * cfgexpand.c (expand_call_stmt): Likewise.
17254 (expand_return): Likewise.
17255 (expand_gimple_stmt_1): Likewise.
17256 (pass_expand::execute): Likewise.
17257 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
17258 (cgraph_node::remove): Likewise.
17259 (cgraph_node::dump): Likewise.
17260 (cgraph_node::verify_node): Likewise.
17261 * cgraph.h (chkp_function_instrumented_p): Likewise.
17262 (symtab_node::get_alias_target): Likewise.
17263 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
17264 (cgraph_local_p): Likewise.
17265 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
17266 (cgraph_edge::rebuild_references): Likewise.
17267 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
17268 (walk_polymorphic_call_targets): Likewise.
17269 (cgraph_node::expand_thunk): Likewise.
17270 (symbol_table::output_weakrefs): Likewise.
17271 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
17272 (ix86_handle_option): Likewise.
17273 * config/i386/constraints.md: Likewise.
17274 * config/i386/i386-builtin-types.def (BND): Likewise.
17275 (VOID): Likewise.
17276 (PVOID): Likewise.
17277 (ULONG): Likewise.
17278 * config/i386/i386-builtin.def (BDESC_END): Likewise.
17279 (BDESC_FIRST): Likewise.
17280 (BDESC): Likewise.
17281 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
17282 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
17283 * config/i386/i386.c (enum reg_class): Likewise.
17284 (ix86_target_string): Likewise.
17285 (ix86_option_override_internal): Likewise.
17286 (ix86_conditional_register_usage): Likewise.
17287 (ix86_valid_target_attribute_inner_p): Likewise.
17288 (ix86_set_indirect_branch_type): Likewise.
17289 (ix86_set_current_function): Likewise.
17290 (ix86_function_arg_regno_p): Likewise.
17291 (init_cumulative_args): Likewise.
17292 (ix86_function_arg_advance): Likewise.
17293 (ix86_function_arg): Likewise.
17294 (ix86_pass_by_reference): Likewise.
17295 (ix86_function_value_regno_p): Likewise.
17296 (ix86_function_value_1): Likewise.
17297 (ix86_function_value_bounds): Likewise.
17298 (ix86_return_in_memory): Likewise.
17299 (ix86_setup_incoming_vararg_bounds): Likewise.
17300 (ix86_va_start): Likewise.
17301 (indirect_thunk_need_prefix): Likewise.
17302 (print_reg): Likewise.
17303 (ix86_print_operand): Likewise.
17304 (ix86_expand_call): Likewise.
17305 (ix86_output_function_return): Likewise.
17306 (reg_encoded_number): Likewise.
17307 (BDESC_VERIFYS): Likewise.
17308 (ix86_init_mpx_builtins): Likewise.
17309 (ix86_init_builtins): Likewise.
17310 (ix86_emit_cmove): Likewise.
17311 (ix86_emit_move_max): Likewise.
17312 (ix86_expand_builtin): Likewise.
17313 (ix86_builtin_mpx_function): Likewise.
17314 (ix86_get_arg_address_for_bt): Likewise.
17315 (ix86_load_bounds): Likewise.
17316 (ix86_store_bounds): Likewise.
17317 (ix86_load_returned_bounds): Likewise.
17318 (ix86_store_returned_bounds): Likewise.
17319 (ix86_class_likely_spilled_p): Likewise.
17320 (ix86_hard_regno_mode_ok): Likewise.
17321 (x86_order_regs_for_local_alloc): Likewise.
17322 (ix86_mitigate_rop): Likewise.
17323 (ix86_bnd_prefixed_insn_p): Likewise.
17324 (ix86_mpx_bound_mode): Likewise.
17325 (ix86_make_bounds_constant): Likewise.
17326 (ix86_initialize_bounds): Likewise.
17327 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
17328 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
17329 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
17330 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
17331 (TARGET_CHKP_BOUND_MODE): Likewise.
17332 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
17333 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
17334 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
17335 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
17336 * config/i386/i386.h (TARGET_MPX): Likewise.
17337 (TARGET_MPX_P): Likewise.
17338 (VALID_BND_REG_MODE): Likewise.
17339 (FIRST_BND_REG): Likewise.
17340 (LAST_BND_REG): Likewise.
17341 (enum reg_class): Likewise.
17342 (BND_REG_P): Likewise.
17343 (BND_REGNO_P): Likewise.
17344 (BNDmode): Likewise.
17345 (ADJUST_INSN_LENGTH): Likewise.
17346 * config/i386/i386.md: Likewise.
17347 * config/i386/i386.opt: Likewise.
17348 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
17349 (defined): Likewise.
17350 (LINK_MPX): Likewise.
17351 (MPX_SPEC): Likewise.
17352 (LIBMPX_SPEC): Likewise.
17353 (LIBMPXWRAPPERS_SPEC): Likewise.
17354 (CHKP_SPEC): Likewise.
17355 * config/i386/predicates.md: Likewise.
17356 * dbxout.c (dbxout_type): Likewise.
17357 * doc/extend.texi: Likewise.
17358 * doc/invoke.texi: Likewise.
17359 * doc/md.texi: Likewise.
17360 * doc/tm.texi: Likewise.
17361 * doc/tm.texi.in: Likewise.
17362 * dwarf2out.c (is_base_type): Likewise.
17363 (gen_formal_types_die): Likewise.
17364 (gen_subprogram_die): Likewise.
17365 (gen_type_die_with_usage): Likewise.
17366 (gen_decl_die): Likewise.
17367 (dwarf2out_late_global_decl): Likewise.
17368 * expr.c (expand_assignment): Likewise.
17369 (emit_storent_insn): Likewise.
17370 (store_expr_with_bounds): Likewise.
17371 (store_expr): Likewise.
17372 (expand_expr_real_1): Likewise.
17373 * expr.h (store_expr_with_bounds): Likewise.
17374 * function.c (use_register_for_decl): Likewise.
17375 (struct bounds_parm_data): Likewise.
17376 (assign_parms_augmented_arg_list): Likewise.
17377 (assign_parm_find_entry_rtl): Likewise.
17378 (assign_parm_is_stack_parm): Likewise.
17379 (assign_parm_load_bounds): Likewise.
17380 (assign_bounds): Likewise.
17381 (assign_parms): Likewise.
17382 (expand_function_start): Likewise.
17383 * gcc.c (CHKP_SPEC): Likewise.
17384 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
17385 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
17386 (wrestrict_dom_walker::check_call): Likewise.
17387 * gimple.c (gimple_build_call_from_tree): Likewise.
17388 * gimple.h (enum gf_mask): Likewise.
17389 (gimple_call_with_bounds_p): Likewise.
17390 (gimple_call_set_with_bounds): Likewise.
17391 * gimplify.c (gimplify_init_constructor): Likewise.
17392 * ipa-cp.c (initialize_node_lattices): Likewise.
17393 (propagate_constants_across_call): Likewise.
17394 (find_more_scalar_values_for_callers_subset): Likewise.
17395 * ipa-hsa.c (process_hsa_functions): Likewise.
17396 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
17397 * ipa-icf.c (sem_function::merge): Likewise.
17398 * ipa-inline.c (early_inliner): Likewise.
17399 * ipa-pure-const.c (warn_function_noreturn): Likewise.
17400 (warn_function_cold): Likewise.
17401 (propagate_pure_const): Likewise.
17402 * ipa-ref.h (enum GTY): Likewise.
17403 * ipa-split.c (find_retbnd): Likewise.
17404 (consider_split): Likewise.
17405 (split_function): Likewise.
17406 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
17407 * ipa.c (walk_polymorphic_call_targets): Likewise.
17408 (symbol_table::remove_unreachable_nodes): Likewise.
17409 (process_references): Likewise.
17410 (cgraph_build_static_cdtor_1): Likewise.
17411 * lto-cgraph.c (lto_output_node): Likewise.
17412 (output_refs): Likewise.
17413 (compute_ltrans_boundary): Likewise.
17414 (input_overwrite_node): Likewise.
17415 (input_node): Likewise.
17416 (input_cgraph_1): Likewise.
17417 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
17418 * passes.c (pass_manager::execute_early_local_passes): Likewise.
17419 (class pass_chkp_instrumentation_passes): Likewise.
17420 (make_pass_chkp_instrumentation_passes): Likewise.
17421 * passes.def: Likewise.
17422 * rtl.h (struct GTY): Likewise.
17423 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
17424 * stor-layout.c (layout_type): Likewise.
17425 * symtab.c: Likewise.
17426 * target.def: Likewise.
17427 * targhooks.c (default_chkp_bound_type): Likewise.
17428 (default_chkp_bound_mode): Likewise.
17429 (default_builtin_chkp_function): Likewise.
17430 (default_chkp_function_value_bounds): Likewise.
17431 (default_chkp_make_bounds_constant): Likewise.
17432 (default_chkp_initialize_bounds): Likewise.
17433 * targhooks.h (default_chkp_bound_type): Likewise.
17434 (default_chkp_bound_mode): Likewise.
17435 (default_builtin_chkp_function): Likewise.
17436 (default_chkp_function_value_bounds): Likewise.
17437 (default_chkp_make_bounds_constant): Likewise.
17438 (default_chkp_initialize_bounds): Likewise.
17439 * toplev.c (compile_file): Likewise.
17440 (process_options): Likewise.
17441 * tree-core.h (DEF_BUILTIN): Likewise.
17442 (DEF_BUILTIN_CHKP): Likewise.
17443 * tree-inline.c (declare_return_variable): Likewise.
17444 (remap_gimple_stmt): Likewise.
17445 (copy_bb): Likewise.
17446 (initialize_inlined_parameters): Likewise.
17447 (expand_call_inline): Likewise.
17448 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
17449 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
17450 (make_pass_ipa_chkp_produce_thunks): Likewise.
17451 (make_pass_chkp): Likewise.
17452 (make_pass_chkp_opt): Likewise.
17453 (make_pass_chkp_instrumentation_passes): Likewise.
17454 * tree-pretty-print.c (dump_generic_node): Likewise.
17455 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
17456 * tree-ssa-dce.c (propagate_necessity): Likewise.
17457 (eliminate_unnecessary_stmts): Likewise.
17458 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
17459 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
17460 * tree-ssa-sccvn.h: Likewise.
17461 * tree-ssa-strlen.c (get_string_length): Likewise.
17462 (valid_builtin_call): Likewise.
17463 (adjust_last_stmt): Likewise.
17464 (handle_builtin_strchr): Likewise.
17465 (handle_builtin_strcpy): Likewise.
17466 (handle_builtin_stxncpy): Likewise.
17467 (handle_builtin_memcpy): Likewise.
17468 (handle_builtin_strcat): Likewise.
17469 (strlen_check_and_optimize_stmt): Likewise.
17470 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
17471 * tree-streamer-in.c: Likewise.
17472 * tree-streamer.c (record_common_node): Likewise.
17473 * tree.c (tree_code_size): Likewise.
17474 (wide_int_to_tree_1): Likewise.
17475 (type_contains_placeholder_1): Likewise.
17476 (build_common_tree_nodes): Likewise.
17477 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
17478 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
17479 (POINTER_BOUNDS_P): Likewise.
17480 (BOUNDED_TYPE_P): Likewise.
17481 (BOUNDED_P): Likewise.
17482 (CALL_WITH_BOUNDS_P): Likewise.
17483 (pointer_bounds_type_node): Likewise.
17484 * value-prof.c (gimple_ic): Likewise.
17485 * var-tracking.c (vt_add_function_parameters): Likewise.
17486 * varasm.c (make_decl_rtl): Likewise.
17487 (assemble_start_function): Likewise.
17488 (output_constant): Likewise.
17489 (maybe_assemble_visibility): Likewise.
17490 * varpool.c (ctor_for_folding): Likewise.
17491 * chkp-builtins.def: Remove.
17492 * ipa-chkp.c: Remove.
17493 * ipa-chkp.h: Remove.
17494 * rtl-chkp.c: Remove.
17495 * rtl-chkp.h: Remove.
17496 * tree-chkp-opt.c: Remove.
17497 * tree-chkp.c: Remove.
17498 * tree-chkp.h: Remove.
17499
17500 2018-06-07 Carl Love <cel@us.ibm.com>
17501
17502 * config/rs6000/vsx.md (vextract_fp_from_shorth,
17503 vextract_fp_from_shortl): Add BE support.
17504
17505 2018-06-07 Paul Koning <ni1d@arrl.net>
17506
17507 * compare-elim.c (try_merge_compare): Don't merge compare if
17508 address contains a side effect.
17509 (try_eliminate_compare): Likewise.
17510
17511 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
17512
17513 * config.gcc: Support "tremont".
17514 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
17515 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17516 PROCESSOR_TREMONT.
17517 * config/i386/i386.c (m_TREMONT): Define.
17518 (processor_target_table): Add "tremont".
17519 (PTA_TREMONT): Define.
17520 (ix86_lea_outperforms): Add TARGET_TREMONT.
17521 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
17522 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
17523 and M_INTEL_GOLDMONT_PLUS.
17524 (fold_builtin_cpu): Add "tremont".
17525 (ix86_add_stmt_cost): Add TARGET_TREMONT.
17526 (ix86_option_override_internal): Add "tremont".
17527 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
17528 (processor_type): Add PROCESSOR_TREMONT.
17529 * config/i386/x86-tune.def: Add m_TREMONT.
17530 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
17531
17532 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17533
17534 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
17535 symbol defined for msp430i* devices to be lower case.
17536
17537 2018-06-07 Richard Biener <rguenther@suse.de>
17538
17539 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
17540 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
17541 Properly wrap signed arithmetic if overflow wraps.
17542
17543 2018-06-07 Jakub Jelinek <jakub@redhat.com>
17544
17545 PR tree-optimization/69615
17546 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
17547 of a cast from a same precision integral SSA_NAME in a bb dominated
17548 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
17549 cast to utype if rhs2 has already a compatible type.
17550
17551 2018-06-07 Richard Biener <rguenther@suse.de>
17552
17553 PR tree-optimization/85935
17554 * graphite-scop-detection.c (find_params_in_bb): Analyze
17555 condition operands with respect to the correct loop. Assert
17556 the analysis doesn't fail.
17557
17558 2018-06-04 Carl Love <cel@us.ibm.com>
17559
17560 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
17561 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
17562 as it is slightly cheaper.
17563 (first_match_or_eos_index_<mode>):
17564 Calculate index using natural element order.
17565 (first_match_index_<mode>):
17566 Calculate index using natural element order.
17567 (first_match_or_eos_index_<mode>):
17568 Calculate index using natural order.
17569 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
17570 for BE and LE modes.
17571 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
17572 P9V_BUILTIN_VCLZLSBB_V16QI.
17573 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
17574 specific.
17575
17576 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17577
17578 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
17579 indentation and line wrap for many prototypes. Add missing
17580 @smallexample directives around block of prototypes for vec_xl and
17581 vec_xst.
17582
17583 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
17584
17585 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
17586 track if we pass or return IEEE 128-bit floating point.
17587 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
17588 C++ mangling that is compatible with GCC 8.1.
17589 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
17590 (init_cumulative_args): Note if we pass or return IEEE 128-bit
17591 floating point types.
17592 (rs6000_function_arg_advance_1): Likewise.
17593 (rs6000_mangle_type): Optionally generate mangled names that match
17594 what GCC 8.1 generated for IEEE 128-bit floating point types.
17595 (rs6000_globalize_decl_name): If we have an external function that
17596 passes or returns IEEE 128-bit types, generate a weak reference
17597 from the mangled name used in GCC 8.1 to the current mangled
17598 name.
17599 (rs6000_init_builtins): Make __ibm128 use the long double type if
17600 long double is IBM extended double. Make __float128 use the long
17601 double type if long double is IEEE 128-bit.
17602
17603 PR target/85657
17604 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
17605 macro for __ibm128 built-in functions.
17606 (PACK_IF): Add __ibm128 pack/unpack functions.
17607 (UNPACK_IF): Likewise.
17608 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
17609 enable long double built-in functions if long double is IEEE
17610 128-bit floating point.
17611 (rs6000_invalid_builtin): Update long double built-in function
17612 error message.
17613 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
17614 functions, adjust the built-in function to use the long double
17615 built-in function if __ibm128 and long double are the same type.
17616 * doc/extend.texi (PowerPC builtins): Update documention for
17617 __builtin_{,un}pack_longdouble. Add documentation for
17618 __builtin_{,un}pack_ibm128.
17619
17620 2018-06-06 Jim Wilson <jimw@sifive.com>
17621
17622 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
17623 (struct machine_function): New field interrupt_mode.
17624 (riscv_handle_type_attribute): New function. Add forward declaration.
17625 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
17626 (riscv_expand_epilogue): Check interrupt_mode field.
17627 (riscv_set_current_function): Check interrupt attribute args and
17628 set interrupt_mode field.
17629 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
17630 (riscv_sret, riscv_uret): New.
17631 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
17632 new arguments to interrupt attribute.
17633
17634 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
17635
17636 PR target/63177
17637 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
17638 Don't handle -mcpu=power8 if -mpower9-vector is also used.
17639
17640 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17641
17642 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
17643 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
17644 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17645 several redundant entries.
17646
17647 2018-06-06 David Malcolm <dmalcolm@redhat.com>
17648
17649 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
17650 type from "rtx" to "rtx_insn *".
17651 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
17652 for local "call_insn", removing cast.
17653 (ix86_expand_call): Likewise, introducing a "call_insn" local.
17654
17655 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
17656
17657 PR tree-optimization/86066
17658 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
17659 for BIT_INSERT_EXPR stores.
17660
17661 2018-06-06 Richard Biener <rguenther@suse.de>
17662
17663 PR tree-optimization/86062
17664 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17665 component refs ontop
17666 of to be offsetted base.
17667
17668 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17669
17670 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
17671 to be static and remove check on interrupt attribute name.
17672
17673 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
17674
17675 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17676 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
17677
17678 2018-06-05 Steve Ellcey <sellcey@cavium.com>
17679
17680 PR target/79924
17681 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
17682 second argument.
17683 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
17684 Remove second argument, change how error is called.
17685 (aarch64_layout_arg): Remove second argument from
17686 aarch64_err_no_fpadvsimd call.
17687 (aarch64_init_cumulative_args): Ditto.
17688 (aarch64_gimplify_va_arg_expr): Ditto.
17689 * config/aarch64/aarch64.md (mov<mode>): Ditto.
17690
17691 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
17692
17693 * config/i386/i386.md (simple_return_indirect_internal): New expander.
17694 (*simple_return_indirect_internal<mode>): Rename from
17695 simple_return_indirect_internal. Use W mode iterator.
17696 (rstorssp): New expander.
17697 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
17698 (clrssbsy): New expander.
17699 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
17700
17701 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
17702
17703 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17704 __typeof__.
17705 (cmse_check_pointed_object): Likewise.
17706
17707 2018-06-05 Martin Liska <mliska@suse.cz>
17708
17709 PR gcov-profile/47618
17710 * doc/invoke.texi: Document how -fprofile-dir format
17711 is extended.
17712
17713 2018-06-05 Richard Biener <rguenther@suse.de>
17714
17715 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17716 removal pretend DOM info isn't available so we do not update
17717 it and only remove edges, not dominated blocks. Actually free
17718 DOM info in case we removed something. Remove unreachable blocks.
17719 (mfb_keep_latches): Work with either DOM info or marked backedges.
17720 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17721 first. Mark backedges if DOM info isn't available.
17722 (Re-)compute DOM info after cleanup_control_flow_pre.
17723
17724 2018-06-05 Richard Biener <rguenther@suse.de>
17725
17726 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17727 (locus_discrim_hasher::hash): Adjust.
17728 (locus_discrim_hasher::equal): Likewise.
17729 (next_discriminator_for_locus): Work on line directly.
17730 (same_line_p): Pass in expanded locus1 as well.
17731 (assign_discriminators): Avoid redundant location expansions.
17732
17733 2018-06-05 Richard Biener <rguenther@suse.de>
17734
17735 PR tree-optimization/86046
17736 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17737 if required after clearing TREE_ADDRESSABLE.
17738
17739 2018-06-05 Richard Biener <rguenther@suse.de>
17740
17741 PR tree-optimization/86047
17742 * tree-ssa-loop.c (for_each_index): Glob handling of all
17743 decls and constants and really handle all of them.
17744
17745 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17746
17747 PR target/81497
17748 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17749 qualifier_void_pointer and qualifier_const_void_pointer.
17750 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17751 (arm_init_builtins): Handle the above.
17752 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17753 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17754 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17755 void intrinsics.
17756
17757 2018-06-05 Martin Liska <mliska@suse.cz>
17758
17759 * auto-profile.c (read_autofdo_file): Do not use
17760 gcov_ctr_summary struct.
17761 (afdo_callsite_hot_enough_for_early_inline): Likewise.
17762 * coverage.c (struct counts_entry): Likewise.
17763 (read_counts_file): Read just single summary entry.
17764 (get_coverage_counts): Use gcov_summary struct.
17765 * coverage.h (get_coverage_counts): Likewise.
17766 * gcov-dump.c (dump_working_sets): Likewise.
17767 (tag_summary): Dump just single summary.
17768 * gcov-io.c (gcov_write_summary): Write just histogram
17769 summary.
17770 (gcov_read_summary): Read just single summary.
17771 (compute_working_sets): Use gcov_summary struct.
17772 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
17773 of GCOV_COUNTERS_SUMMABLE.
17774 (GCOV_COUNTERS_SUMMABLE): Remove.
17775 (GCOV_FIRST_VALUE_COUNTER): Replace with
17776 GCOV_COUNTER_V_INTERVAL.
17777 (struct gcov_ctr_summary): Remove.
17778 (struct gcov_summary): Directly use fields of former
17779 gcov_ctr_summary.
17780 (compute_working_sets): Use gcov_summary struct.
17781 * gcov.c (read_count_file): Do not use ctrs fields.
17782 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
17783 struct.
17784 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
17785 struct.
17786 * profile.c: Likewise.
17787 * profile.h: Likewise.
17788
17789 2018-06-05 Martin Liska <mliska@suse.cz>
17790
17791 PR gcov-profile/84846
17792 * gcov.c (output_lines): Print working directory only
17793 in intermediate format.
17794
17795 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
17796
17797 * config/s390/s390-builtin-types.def: Add void function type.
17798 * config/s390/s390-builtins.def: Use the function type for the
17799 tbeginc builtin.
17800
17801 2018-06-04 Jim Wilson <jimw@sifive.com>
17802
17803 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
17804 to int.
17805 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
17806 and maybe_eh_return. Change regno to unsigned int. Use new args to
17807 handle EH_RETURN_DATA_REGNO registers properly.
17808 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
17809 (riscv_expand_epilogue): Update comment. Change argument name and
17810 type. Update code to use new name and type. Pass new args to
17811 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
17812 EXCEPTION_RETURN.
17813 * config/riscv/riscv.md (NORMAL_RETURN): New.
17814 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
17815 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
17816 (eh_return): Call gen_eh_return_internal and emit barrier.
17817 (eh_return_internal): Call riscv_expand_epilogue.
17818
17819 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
17820
17821 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
17822 bit_insertion field and declare can_be_merged_into method.
17823 (merged_store_group::can_be_merged_into): New method.
17824 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17825 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
17826 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17827
17828 2018-06-04 Richard Biener <rguenther@suse.de>
17829
17830 PR tree-optimization/85955
17831 * builtins.c (fold_builtin_sincos): Convert pointers to
17832 destination to appropriate type before dereferencing.
17833
17834 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
17835
17836 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17837
17838 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
17839
17840 * expr.c (expand_expr_real_1): Force the operand into memory if
17841 its TYPE_MODE is BLKmode and if there is no integer mode for
17842 the number of bits being extracted.
17843
17844 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17845
17846 PR target/85832
17847 PR target/86036
17848 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17849 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17850
17851 2018-06-04 Richard Biener <rguenther@suse.de>
17852
17853 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17854 (cleanup_tree_cfg_noloop): ... single caller. Do
17855 start_recording_case_labels later.
17856
17857 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
17858
17859 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17860 to _IMMINTRIN_H_INCLUDED.
17861 * config/i386/pconfigintrin.h: Ditto.
17862 * config/i386/waitpkgintrin.h: Ditto.
17863 * config/i386/immintrin.h: Add includes for sgxintrin.h,
17864 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17865 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17866 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17867 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17868 waitpkgintrin.h and cldemoteintrin.h.
17869
17870 2018-06-04 Richard Biener <rguenther@suse.de>
17871
17872 PR tree-optimization/86038
17873 * tracer.c (find_best_successor): Check probability for
17874 being initialized, bail out if not.
17875
17876 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
17877
17878 PR target/86003
17879 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17880 of bits to ignore when comparing architectures.
17881
17882 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17883
17884 PR tree-optimization/69615
17885 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17886 maximum or minimum of the type, try to merge it also as if
17887 range1 is + [-, x - 1] or + [x + 1, -].
17888
17889 PR c++/86025
17890 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17891
17892 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
17893
17894 PR tree-optimization/86034
17895 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17896 the unsigned bitfield type in a bit insertion sequence if it does not
17897 have a larger precision than the bitfield size.
17898 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17899
17900 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
17901
17902 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17903
17904 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17905
17906 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17907 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17908 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17909 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17910
17911 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17912
17913 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17914 Disable -fdelete-null-pointer-checks for ELF toolchain.
17915
17916 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17917 Kito Cheng <kito.cheng@gmail.com>
17918
17919 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17920 (nds32le-*-*, nds32be-*-*): Integrate checking process.
17921 (nds32*-*-*): Add glibc and uclibc conditions.
17922 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17923 (TARGET_EXCEPT_UNWIND_INFO): Define.
17924 * config/nds32/elf.h: New file.
17925 * config/nds32/linux.h: New file.
17926 * config/nds32/nds32-elf.opt: New file.
17927 * config/nds32/nds32-linux.opt: New file.
17928 * config/nds32/nds32-fp-as-gp.c
17929 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17930 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17931 TARGET_LINUX_ABI.
17932 (nds32_asm_file_end): Ditto.
17933 (nds32_print_operand): Ditto.
17934 (nds32_insert_attributes): Ditto.
17935 (nds32_init_libfuncs): New function.
17936 (TARGET_HAVE_TLS): Define.
17937 (TARGET_INIT_LIBFUNCS): Define.
17938 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17939 spec content.
17940 (TARGET_ELF): Apply different mcmodel setting.
17941 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17942 been migrated into elf.h and linux.h files.
17943 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17944 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17945 (mcmodel): The content has been migrated into nds32-elf.opt and
17946 nds32-linux.opt files.
17947 * config/nds32/t-elf: New file.
17948 * config/nds32/t-linux: New file.
17949
17950 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17951 Shiva Chen <shiva0217@gmail.com>
17952
17953 * config/nds32/constants.md (unspec_volatile_element): Add
17954 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17955 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17956 optimization.
17957 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17958 (make_pass_nds32_fp_as_gp): Declare.
17959 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17960 optmization pass.
17961 (nds32_asm_function_end_prologue): Remove unused asm output.
17962 (nds32_asm_function_begin_epilogue): Remove unused asm output.
17963 (nds32_asm_file_start): Output necessary fp_as_gp information.
17964 (nds32_option_override): Adjust register usage.
17965 (nds32_expand_prologue): Consider fp_as_gp situation.
17966 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17967 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17968 (epilogue): Ditto.
17969 (return): Ditto.
17970 (simple_return): Ditto.
17971 (omit_fp_begin): Output special directive for fp_as_gp.
17972 (omit_fp_end): Output special directive for fp_as_gp.
17973 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17974 mforbid-fp-as-gp): New options.
17975
17976 2018-06-01 Mark Wielaard <mark@klomp.org>
17977
17978 * dwarf2out.c (dwarf2out_finish): Remove generation of
17979 DW_AT_loclists_base.
17980
17981 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
17982
17983 * gimple-ssa-store-merging.c: Include gimple-fold.h.
17984 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17985 (struct merged_store_group): Add bit_insertion field.
17986 (dump_char_array): Use standard hexadecimal format.
17987 (merged_store_group::merged_store_group): Set bit_insertion to false.
17988 (merged_store_group::apply_stores): Use optimal buffer size. Deal
17989 with BIT_INSERT_EXPR stores. Move up code updating the mask and
17990 also print the mask in the dump file.
17991 (pass_store_merging::gate): Minor tweak.
17992 (imm_store_chain_info::coalesce_immediate): Fix wrong association
17993 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
17994 stores with INTEGER_CST stores.
17995 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17996 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17997 and use it throughout. Generate bit insertion sequences if need be.
17998 (pass_store_merging::process_store): Remove redundant condition.
17999 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
18000
18001 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
18002
18003 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
18004 the 128-bit floating point types. Fix function comment.
18005
18006 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18007
18008 * config/aarch64/aarch64-simd.md
18009 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
18010 mnemonics.
18011 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
18012 mnemonics.
18013
18014 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18015
18016 PR tree-optimization/85989
18017 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
18018 variable.
18019 (backprop::intersect_uses): Check it when deciding whether this
18020 is a backedge reference.
18021 (backprop::process_block): Add each phi to m_visited_phis
18022 after visiting it, then clear it at the end.
18023
18024 2018-06-01 Richard Biener <rguenther@suse.de>
18025
18026 * tree-vectorizer.h (vect_dr_stmt): New function.
18027 (vect_get_load_cost): Adjust.
18028 (vect_get_store_cost): Likewise.
18029 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
18030 Use vect_dr_stmt instead of DR_SMTT.
18031 (vect_record_base_alignments): Likewise.
18032 (vect_calculate_target_alignment): Likewise.
18033 (vect_compute_data_ref_alignment): Likewise and make static.
18034 (vect_update_misalignment_for_peel): Likewise.
18035 (vect_verify_datarefs_alignment): Likewise.
18036 (vector_alignment_reachable_p): Likewise.
18037 (vect_get_data_access_cost): Likewise. Pass down
18038 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
18039 (vect_get_peeling_costs_all_drs): Likewise.
18040 (vect_peeling_hash_get_lowest_cost): Likewise.
18041 (vect_enhance_data_refs_alignment): Likewise.
18042 (vect_find_same_alignment_drs): Likewise.
18043 (vect_analyze_data_refs_alignment): Likewise.
18044 (vect_analyze_group_access_1): Likewise.
18045 (vect_analyze_group_access): Likewise.
18046 (vect_analyze_data_ref_access): Likewise.
18047 (vect_analyze_data_ref_accesses): Likewise.
18048 (vect_vfa_segment_size): Likewise.
18049 (vect_small_gap_p): Likewise.
18050 (vectorizable_with_step_bound_p): Likewise.
18051 (vect_prune_runtime_alias_test_list): Likewise.
18052 (vect_analyze_data_refs): Likewise.
18053 (vect_supportable_dr_alignment): Likewise.
18054 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
18055 (vect_gen_prolog_loop_niters): Likewise.
18056 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
18057 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
18058 modify DR_STMT.
18059 (vect_recog_mask_conversion_pattern): Likewise.
18060 (vect_try_gather_scatter_pattern): Likewise.
18061 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
18062 to vect_get_store_cost.
18063 (vect_get_store_cost): Get stmt_info instead of DR.
18064 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
18065 (vect_get_load_cost): Get stmt_info instead of DR.
18066
18067 2018-06-01 Richard Biener <rguenther@suse.de>
18068
18069 PR middle-end/86017
18070 * gimple-fold.c (var_decl_component_p): Also allow offsetted
18071 vars wrapped in MEM_REFs.
18072
18073 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18074
18075 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18076 Fix subreg tests so that we only return a choice between
18077 GENERAL_REGS and FP_REGS if the original classes included both.
18078
18079 2018-06-01 Richard Biener <rguenther@suse.de>
18080
18081 PR ipa/85960
18082 * tree-ssa-structalias.c (get_function_part_constraint):
18083 Handle NULL fi->decl.
18084 (find_func_aliases_for_call): Properly handle indirect
18085 fi from direct call.
18086 (find_func_clobbers): Likewise.
18087 (ipa_pta_execute): Likewise.
18088 (create_variable_info_for): For functions that are ifunc_resolver
18089 resolve to a varinfo that contains the result of the resolver call.
18090 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
18091 aliases.
18092
18093 2018-05-31 Michael Collison <michael.collison@arm.com>
18094
18095 * config/aarch64/aarch64.md:
18096 (*fix_to_zero_extenddfdi2): New pattern.
18097 * gcc.target/aarch64/fix_extend1.c: New testcase.
18098
18099 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
18100
18101 PR middle-end/78809
18102 PR middle-end/83026
18103 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
18104 and BUILT_IN_STRNCMP_EQ.
18105 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
18106 BUILT_IN_STRNCMP_EQ.
18107 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
18108 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18109 (gimple_fold_builtin): Likewise.
18110 * tree-ssa-strlen.c (compute_string_length): New function.
18111 (determine_min_obsize): New function.
18112 (handle_builtin_string_cmp): New function to handle calls to
18113 string compare functions.
18114 (strlen_optimize_stmt): Add handling to builtin string compare
18115 calls.
18116 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
18117 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18118 * tree.c (build_common_builtin_nodes): Add new defines of
18119 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
18120
18121 2018-05-31 Jakub Jelinek <jakub@redhat.com>
18122
18123 PR target/85984
18124 * bb-reorder.c (pass_partition_blocks::gate): Return false for
18125 functions with naked attribute.
18126
18127 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
18128
18129 * config/i386/sse.md (avx_vec_concat<mode>):
18130 Substitute concat_tg_mode mode attribute with xtg_mode.
18131 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
18132 (concat_tg_mode): Remove mode attribute.
18133
18134 2018-05-31 Martin Sebor <msebor@redhat.com>
18135
18136 PR c/82063
18137 * calls.c (alloc_max_size): Correct a logic error/typo.
18138 Treat excessive arguments as infinite. Warn for invalid arguments.
18139 * doc/invoke.texi (-Walloc-size-larger-than): Update.
18140
18141 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
18142
18143 PR target/85829
18144 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
18145 and movx for Haswell.
18146
18147 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
18148 Cesar Philippidis <cesar@codesourcery.com>
18149
18150 PR middle-end/85879
18151 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
18152 when emitting error on private/firstprivate reductions.
18153 * omp-low.c (lower_omp_target): Avoid reference-type processing
18154 on pointers for firstprivate clause.
18155
18156 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
18157
18158 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
18159 (st1x2): Likewise.
18160 (st1x3): Likewise.
18161 * config/aarch64/aarch64-simd.md
18162 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
18163 (aarch64_ld1_x3_<mode>): Likewise
18164 (aarch64_st1x2<VALLDIF:mode>): Likewise
18165 (aarch64_st1_x2_<mode>): Likewise
18166 (aarch64_st1x3<VALLDIF:mode>): Likewise
18167 (aarch64_st1_x3_<mode>): Likewise
18168 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
18169 (vld1_s8_x3): Likewise.
18170 (vld1_u16_x3): Likewise.
18171 (vld1_s16_x3): Likewise.
18172 (vld1_u32_x3): Likewise.
18173 (vld1_s32_x3): Likewise.
18174 (vld1_u64_x3): Likewise.
18175 (vld1_s64_x3): Likewise.
18176 (vld1_f16_x3): Likewise.
18177 (vld1_f32_x3): Likewise.
18178 (vld1_f64_x3): Likewise.
18179 (vld1_p8_x3): Likewise.
18180 (vld1_p16_x3): Likewise.
18181 (vld1_p64_x3): Likewise.
18182 (vld1q_u8_x3): Likewise.
18183 (vld1q_s8_x3): Likewise.
18184 (vld1q_u16_x3): Likewise.
18185 (vld1q_s16_x3): Likewise.
18186 (vld1q_u32_x3): Likewise.
18187 (vld1q_s32_x3): Likewise.
18188 (vld1q_u64_x3): Likewise.
18189 (vld1q_s64_x3): Likewise.
18190 (vld1q_f16_x3): Likewise.
18191 (vld1q_f32_x3): Likewise.
18192 (vld1q_f64_x3): Likewise.
18193 (vld1q_p8_x3): Likewise.
18194 (vld1q_p16_x3): Likewise.
18195 (vld1q_p64_x3): Likewise.
18196 (vst1_s64_x2): Likewise.
18197 (vst1_u64_x2): Likewise.
18198 (vst1_f64_x2): Likewise.
18199 (vst1_s8_x2): Likewise.
18200 (vst1_p8_x2): Likewise.
18201 (vst1_s16_x2): Likewise.
18202 (vst1_p16_x2): Likewise.
18203 (vst1_s32_x2): Likewise.
18204 (vst1_u8_x2): Likewise.
18205 (vst1_u16_x2): Likewise.
18206 (vst1_u32_x2): Likewise.
18207 (vst1_f16_x2): Likewise.
18208 (vst1_f32_x2): Likewise.
18209 (vst1_p64_x2): Likewise.
18210 (vst1q_s8_x2): Likewise.
18211 (vst1q_p8_x2): Likewise.
18212 (vst1q_s16_x2): Likewise.
18213 (vst1q_p16_x2): Likewise.
18214 (vst1q_s32_x2): Likewise.
18215 (vst1q_s64_x2): Likewise.
18216 (vst1q_u8_x2): Likewise.
18217 (vst1q_u16_x2): Likewise.
18218 (vst1q_u32_x2): Likewise.
18219 (vst1q_u64_x2): Likewise.
18220 (vst1q_f16_x2): Likewise.
18221 (vst1q_f32_x2): Likewise.
18222 (vst1q_f64_x2): Likewise.
18223 (vst1q_p64_x2): Likewise.
18224 (vst1_s64_x3): Likewise.
18225 (vst1_u64_x3): Likewise.
18226 (vst1_f64_x3): Likewise.
18227 (vst1_s8_x3): Likewise.
18228 (vst1_p8_x3): Likewise.
18229 (vst1_s16_x3): Likewise.
18230 (vst1_p16_x3): Likewise.
18231 (vst1_s32_x3): Likewise.
18232 (vst1_u8_x3): Likewise.
18233 (vst1_u16_x3): Likewise.
18234 (vst1_u32_x3): Likewise.
18235 (vst1_f16_x3): Likewise.
18236 (vst1_f32_x3): Likewise.
18237 (vst1_p64_x3): Likewise.
18238 (vst1q_s8_x3): Likewise.
18239 (vst1q_p8_x3): Likewise.
18240 (vst1q_s16_x3): Likewise.
18241 (vst1q_p16_x3): Likewise.
18242 (vst1q_s32_x3): Likewise.
18243 (vst1q_s64_x3): Likewise.
18244 (vst1q_u8_x3): Likewise.
18245 (vst1q_u16_x3): Likewise.
18246 (vst1q_u32_x3): Likewise.
18247 (vst1q_u64_x3): Likewise.
18248 (vst1q_f16_x3): Likewise.
18249 (vst1q_f32_x3): Likewise.
18250 (vst1q_f64_x3): Likewise.
18251 (vst1q_p64_x3): Likewise.
18252
18253 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18254
18255 * config/msp430/msp430.c (msp430_output_labelref): Prepend
18256 user_label_prefix to name.
18257
18258 * tree-core.h: Update comment about the format of NAME string
18259 passed to handler in attribute_spec.
18260
18261 * config/msp430/msp430.md: Remove erroneous subreg expression from
18262 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
18263 zero_extend{q,h}isi2.
18264
18265 2018-05-30 Borislav Petkov <bp@suse.de>
18266
18267 * doc/extend.texi: Document some architecture specific
18268 constraints and sort entries.
18269
18270 2018-05-30 Martin Sebor <msebor@redhat.com>
18271
18272 PR middle-end/85369
18273 * builtins.c (expand_builtin_stpcpy_1): New function.
18274 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
18275 only if the former succeeds.
18276
18277 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
18278
18279 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
18280 in saphira.
18281
18282 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18283
18284 * doc/invoke.texi (-flinker-output): Document
18285
18286 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18287
18288 * passes.c (ipa_write_summaries): Only modify statements if body
18289 is in memory.
18290 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
18291 incrementally linking.
18292 (ipa_passes): Likewise.
18293 * lto-cgraph.c (lto_output_node): When incrementally linking do not
18294 pass down resolution info.
18295 * common.opt (flag_incremental_link): Update info.
18296 * gcc.c (plugin specs): Turn flinker-output=* to
18297 -plugin-opt=-linker-output-known
18298 * toplev.c (compile_file): Also cut compilation when doing incremental
18299 link.
18300 * flag-types. (enum lto_partition_model): Add
18301 LTO_LINKER_OUTPUT_NOLTOREL.
18302 (invoke.texi): Add -flinker-output docs.
18303 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
18304 link same way as WPA; do not stream in dead initializers.
18305
18306 * dwarf2out.c (dwarf2out_die_ref_for_decl,
18307 darf2out_register_external_decl): Support incremental link.
18308
18309 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18310
18311 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
18312
18313 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18314
18315 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
18316 it down to simple_object_copy_lto_debug_sections.
18317 (run_gcc): Determine incremental LTO link time and configure
18318 lto1 into non-wpa mode, disable renaming of debug sections.
18319
18320 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
18321
18322 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18323 descriptions of various incorrectly documented functions.
18324
18325 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
18326
18327 Revert:
18328 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18329 address check not strict.
18330
18331 2018-05-30 Richard Biener <rguenther@suse.de>
18332
18333 PR tree-optimization/85964
18334 * tracer.c (better_p): Drop initialized count check, we only
18335 call the function with initialized counts now.
18336 (find_best_successor): Do find a best edge if one
18337 has uninitialized count.
18338 (find_best_predecessor): Likewise. Do BB frequency check only
18339 if count is initialized.
18340
18341 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
18342
18343 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
18344 (aarch64_ldrstr_offset_compare): New.
18345 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
18346 load/store orderings.
18347 (aarch64_gen_adjusted_ldpstp): Likewise.
18348
18349 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
18350
18351 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18352 Check for subset of GENERAL_REGS and FP_REGS.
18353 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
18354 r=w alternative.
18355
18356 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
18357
18358 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
18359 and wi::to_poly_offset. Add the current offset and then check
18360 whether the sum fits, rather than using an unchecked addition of
18361 a checked term. Check for a shwi rather than a uhwi.
18362 * expr.c (get_bit_range): Use tree_to_poly_uint64.
18363 (store_constructor): Use poly_int_tree_p.
18364 (expand_expr_real_1): Likewise.
18365 * function.c (assign_temp): Likewise.
18366 * fold-const.c (const_binop): Use poly_int_tree_p and
18367 wi::to_poly_offset.
18368 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
18369 division.
18370 * ipa-icf-gimple.c (func_checker::compare_operand): Use
18371 to_poly_offset for MEM offsets.
18372 * ipa-icf.c (sem_variable::equals): Likewise.
18373 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
18374 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
18375 wi::to_poly_offset for BIT_FIELD_REF offsets.
18376 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
18377 wi::to_poly_offset.
18378 * var-tracking.c (emit_note_insn_var_location): Use
18379 tree_to_poly_uint64.
18380
18381 2018-05-29 Jim Wilson <jimw@sifive.com>
18382
18383 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
18384
18385 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
18386
18387 PR target/85950
18388 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
18389 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
18390 sequence.
18391 (sse4_1_round<mode>2): Use nonimmediate_operand
18392 for operand 1 predicate.
18393
18394 2018-05-29 Martin Sebor <msebor@redhat.com>
18395 Richard Biener <rguenther@suse.de>
18396
18397 PR testsuite/85888
18398 * calls.c (get_size_range): Call determine_value_range instead
18399 of get_value_range..
18400 * tree-vrp.h (determine_value_range): Declared new function.
18401 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
18402
18403 2018-05-29 Richard Biener <rguenther@suse.de>
18404
18405 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
18406 sure to use non-pattern stmts for get_earlier_stmt arguments.
18407 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
18408 called on pattern stmts.
18409 (get_later_stmt): Likewise.
18410
18411 2018-05-29 Martin Liska <mliska@suse.cz>
18412
18413 PR gcov-profile/85759
18414 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
18415 env variables.
18416
18417 2018-05-29 Jakub Jelinek <jakub@redhat.com>
18418
18419 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
18420 VEC_UNPACK_*_EXPR.
18421 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
18422 VEC_PACK_*_EXPR.
18423
18424 PR target/85918
18425 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18426 VEC_PACK_FLOAT_EXPR): New tree codes.
18427 * tree-pretty-print.c (op_code_prio): Handle
18428 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18429 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18430 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18431 * tree-inline.c (estimate_operator_cost): Likewise.
18432 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
18433 * fold-const.c (const_binop): Likewise.
18434 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
18435 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18436 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18437 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
18438 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18439 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18440 * expr.c (expand_expr_real_2): Likewise.
18441 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
18442 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
18443 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
18444 optabs.
18445 * optabs.c (expand_widen_pattern_expr): For
18446 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
18447 sign from result type rather than operand's type.
18448 (expand_binop_directly): For vec_packu_float_optab and
18449 vec_packs_float_optab allow result type to be different from operand's
18450 type.
18451 * optabs-tree.c (optab_for_tree_code): Handle
18452 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18453 VEC_PACK_FLOAT_EXPR. Formatting fixes.
18454 * tree-vect-generic.c (expand_vector_operations_1): Handle
18455 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18456 VEC_PACK_FLOAT_EXPR.
18457 * tree-vect-stmts.c (supportable_widening_operation): Handle
18458 FIX_TRUNC_EXPR.
18459 (supportable_narrowing_operation): Handle FLOAT_EXPR.
18460 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
18461 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
18462 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
18463 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
18464 mode attributes.
18465 (vec_pack<floatprefix>_float_<mode>): New expander.
18466 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
18467 attributes.
18468 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
18469 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
18470 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
18471 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
18472 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
18473 Document.
18474 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
18475 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
18476 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18477 VEC_PACK_FLOAT_EXPR): Document.
18478
18479 2018-05-29 Richard Biener <rguenther@suse.de>
18480
18481 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
18482 member.
18483 (stmt_vec_info_vec): Make pointer.
18484 (init_stmt_vec_info_vec): Remove.
18485 (free_stmt_vec_info_vec): Likewise.
18486 (set_stmt_vec_info_vec): New function.
18487 (free_stmt_vec_infos): Likewise.
18488 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
18489 (set_vinfo_for_stmt): Likewise.
18490 (get_earlier_stmt): Likewise.
18491 (get_later_stmt): Likewise.
18492 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
18493 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
18494 (vec_info::~vec_info): Free stmt_vec_infos.
18495 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
18496 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
18497 (pass_slp_vectorize::execute): Likewise.
18498 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
18499 (free_stmt_vec_info_vec): Likewise.
18500 (set_stmt_vec_info_vec): New function.
18501 (free_stmt_vec_infos): Likewise.
18502 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
18503 the global stmt_vec_info_vec.
18504 * tree-parloops.c (gather_scalar_reductions): Use
18505 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
18506 vector.
18507
18508 2018-05-29 Richard Biener <rguenther@suse.de>
18509
18510 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
18511
18512 2018-05-29 Martin Liska <mliska@suse.cz>
18513 David Malcolm <dmalcolm@redhat.com>
18514
18515 * vec.c (test_reverse): New.
18516 (vec_c_tests): Add new test.
18517 * vec.h (vl_ptr>::reverse): New function.
18518
18519 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
18520
18521 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
18522
18523 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
18524 and later.
18525
18526 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
18527
18528 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
18529
18530 2018-05-28 Richard Biener <rguenther@suse.de>
18531
18532 PR tree-optimization/85933
18533 * tree-vect-data-refs.c (vect_record_base_alignments): Only
18534 look at stmts marked as vectorizable.
18535
18536 2018-05-28 Richard Biener <rguenther@suse.de>
18537
18538 PR tree-optimization/85934
18539 * tree-vect-generic.c (expand_vector_operations_1): Hoist
18540 vector boolean check before scalar optimization.
18541
18542 2018-05-28 Jakub Jelinek <jakub@redhat.com>
18543
18544 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
18545 for armv5te.
18546
18547 2018-05-28 Mark Wielaard <mark@klomp.org>
18548
18549 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
18550 if it is an expression containing a minus sign.
18551
18552 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
18553
18554 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
18555
18556 2018-05-27 Paul Koning <ni1d@arrl.net>
18557
18558 * config/pdp11/pdp11.md (truncsihi2): Remove.
18559
18560 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
18561 Chung-Ju Wu <jasonwucj@gmail.com>
18562
18563 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
18564 implementation.
18565 (unaligned_store_dw): Ditto.
18566 * config/nds32/nds32-memory-manipulation.c
18567 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
18568 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
18569 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
18570 (emit_setmem_word_loop): Rename to ...
18571 (emit_setmem_doubleword_loop): ... this.
18572 (nds32_gen_dup_4_byte_to_word_value): New function.
18573 (nds32_gen_dup_8_byte_to_double_word_value): New function.
18574 (nds32_expand_setmem_loop): Refine implementation.
18575 (nds32_expand_setmem_loop_v3m): Ditto.
18576 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
18577 pattern.
18578
18579 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18580
18581 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
18582
18583 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18584
18585 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
18586 (nds32_init_machine_status): Initialize machine->attr_naked_p and
18587 machine->attr_no_prologue_p.
18588 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
18589 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
18590 (nds32_expand_epilogue): Consider attr_naked_p.
18591 (nds32_expand_epilogue_v3pop): Likewise.
18592 (nds32_can_use_return_insn): Likewise.
18593 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
18594 attr_no_prologue_p fields.
18595 * config/nds32/nds32.opt (mret-in-naked-func): New option.
18596
18597 2018-05-27 Jakub Jelinek <jakub@redhat.com>
18598
18599 PR target/85918
18600 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
18601 attributes.
18602 * config/i386/sse.md
18603 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
18604 Rename to ...
18605 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
18606 ... this.
18607 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
18608 Rename to ...
18609 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
18610 ... this.
18611 (*<floatsuffix>floatv2div2sf2): Rename to ...
18612 (*float<floatunssuffix>v2div2sf2): ... this.
18613 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
18614 (float<floatunssuffix>v2div2sf2_mask): ... this.
18615 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
18616 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
18617 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
18618 to ...
18619 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
18620 ... this.
18621 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18622 Rename to ...
18623 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18624 ... this.
18625 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18626 Rename to ...
18627 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18628 ... this.
18629 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
18630 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
18631 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
18632 gen_ufix_truncv8dfv8si2.
18633 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
18634 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
18635 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
18636 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
18637 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
18638 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
18639 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
18640 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
18641
18642 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18643
18644 PR target/85900
18645 PR target/85345
18646 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
18647
18648 2018-05-25 Jim Wilson <jimw@sifive.com>
18649
18650 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
18651 * config/riscv/riscv.c (struct machine_function): Add
18652 interrupt_handler_p and attribute_checked_p fields.
18653 (riscv_attribute_table): Add interrupt.
18654 (riscv_interrupt_type_p): New.
18655 (riscv_save_reg_p): Save extra regs for interrupt handler.
18656 (riscv_use_save_libcall): Return false for interrupt handler.
18657 (riscv_first_stack_step): Add forward declaration.
18658 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
18659 for interrupt handler with large frame. Use it for saved reg list.
18660 (riscv_expand_prologue): Move flag_stack_usage_info support to
18661 eliminate duplication.
18662 (riscv_expand_epilogue): Generate mret for interrupt handler.
18663 (riscv_epilogue_uses): New.
18664 (riscv_can_use_return_insn): Return false for interrupt handler.
18665 (riscv_function_ok_for_sibcall): Likewise.
18666 (riscv_set_current_function): Add interrupt handler support.
18667 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
18668 * config/riscv/riscv.md (UNSPECV_MRET): New.
18669 (GP_REGNUM): New.
18670 (riscv_frflags, riscv_fsflags): Use tab after opcode.
18671 (riscv_mret): New.
18672 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
18673
18674 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
18675
18676 PR tree-optimization/85712
18677 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
18678 this candidate has already been replaced in-situ by a copy.
18679
18680 2018-05-25 Jason Merrill <jason@redhat.com>
18681
18682 PR c++/80485 - inline function non-zero address.
18683 * symtab.c (nonzero_address): Check DECL_COMDAT.
18684
18685 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
18686
18687 PR target/83628
18688 * config/alpha/alpha.md (ashlsi3): New insn pattern.
18689 (*ashlsi_se): Rename from *ashldi_se. Define as sign
18690 extension of SImode operation. Use const123_operand predicate.
18691 (*saddsi_1): Remove.
18692 (*saddl_se_1): Ditto.
18693 (*ssubsi_1): Ditto.
18694 (*ssubl_se_1): Ditto.
18695 * config/alpha/predicates.md (const123_operand): New predicate.
18696 * config/alpha/constraints.md (P): Use IN_RANGE.
18697
18698 2018-05-25 Richard Biener <rguenther@suse.de>
18699
18700 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18701 defaulted to true.
18702 (ref_maybe_used_by_stmt_p): Likewise.
18703 (stmt_may_clobber_ref_p): Likewise.
18704 (stmt_may_clobber_ref_p_1): Likewise.
18705 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18706 and pass it along.
18707 (ref_maybe_used_by_stmt_p): Likewise.
18708 (stmt_may_clobber_ref_p): Likewise.
18709 (stmt_may_clobber_ref_p_1): Likewise.
18710 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18711 the alias oracle to disambiguate DRs with stmts DR analysis
18712 couldn't handle.
18713 (vect_analyze_data_refs): Do not give up on not analyzable
18714 DRs for BB vectorization. Remove code truncating the dataref
18715 vector.
18716
18717 2018-05-25 Jakub Jelinek <jakub@redhat.com>
18718
18719 PR target/85832
18720 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18721 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
18722 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18723
18724 2018-05-25 Richard Biener <rguenther@suse.de>
18725
18726 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18727 function, combining stmt data ref gathering and fatal analysis
18728 parts.
18729 (vect_analyze_data_refs): Remove now redudnant code and simplify.
18730 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18731 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18732 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18733 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18734
18735 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18736
18737 PR tree-optimization/85720
18738 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18739 SCC if all partitions are builtins.
18740 (version_loop_by_alias_check): New parameter. Generate cancelable
18741 runtime alias check if all partitions are builtins.
18742 (distribute_loop): Update call to above function.
18743
18744 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18745
18746 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18747 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18748 (parm_default_def_partition_arg): Ditto.
18749 (set_parm_default_def_partition): Ditto.
18750 (get_parm_default_def_partitions): Ditto and make it static.
18751 (get_undefined_value_partitions): Ditto and make it static.
18752 (remove_ssa_form): Refactor call to init_var_map here.
18753 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18754 computation for loop region.
18755 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18756 (register_default_def): Delete.
18757 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18758 (parm_default_def_partition_arg): Ditto.
18759 (set_parm_default_def_partition): Ditto.
18760 (get_parm_default_def_partitions): Ditto and make it static.
18761 (get_undefined_value_partitions): Ditto and make it static.
18762 (coalesce_with_default, coalesce_with_default): Update comment.
18763 (create_coalesce_list_for_region): New func factored out from
18764 create_outofssa_var_map.
18765 (populate_coalesce_list_for_outofssa): New func factored out from
18766 create_outofssa_var_map and coalesce_ssa_name.
18767 (create_outofssa_var_map): Delete.
18768 (coalesce_ssa_name): Refactor to support live range computation.
18769 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
18770 (get_parm_default_def_partitions): Delete.
18771 (get_undefined_value_partitions): Ditto.
18772 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
18773 computation for loop region.
18774 (new_tree_live_info, loe_visit_block): Ditto.
18775 (live_worklist, set_var_live_on_entry): Ditto.
18776 (calculate_live_on_exit, verify_live_on_entry): Ditto.
18777 * tree-ssa-live.h (struct _var_map): New fields.
18778 (init_var_map): Change decl.
18779 (region_contains_p): New.
18780
18781 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18782
18783 * tree-ssa-live.h (live_merge_and_clear): Delete.
18784
18785 2018-05-25 Richard Biener <rguenther@suse.de>
18786
18787 PR c++/85912
18788 * tree-dump.c (dequeue_and_dump): Remove access to removed
18789 operand 2 of a SWITCH_EXPR.
18790
18791 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18792
18793 * doc/sourcebuild.texi (vect_double_cond_arith): Include
18794 multiplication and division.
18795 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
18796 (cond_udiv@var{m}, cond_umod@var{m}): Document.
18797 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
18798 (cond_udiv_optab, cond_umod_optab): New optabs.
18799 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
18800 (IFN_COND_RDIV): New internal functions.
18801 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
18802 TRUNC_MOD_EXPR and RDIV_EXPR.
18803 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
18804 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
18805 New unspecs.
18806 (SVE_INT_BINARY): Include mult.
18807 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18808 (optab, sve_int_op): Handle mult.
18809 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
18810 UNSPEC_COND_DIV.
18811 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
18812 for SVE_INT_BINARY_SD.
18813
18814 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18815
18816 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
18817 (optab, sve_int_op): Handle div and udiv.
18818 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
18819 for SVE_INT_BINARY_SD.
18820 (*<optab><mode>3): New insn for the same.
18821
18822 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18823
18824 * tree-vect-patterns.c: Include predict.h.
18825 (vect_recog_divmod_pattern): Restrict check for division support
18826 to when optimizing for size.
18827
18828 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18829
18830 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18831 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18832 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18833 (gimple_match_op::set_op): Likewise.
18834 (gimple_resimplify4): Declare.
18835 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18836 (expr::gen_transform): Likewise.
18837 (decision_tree::gen): Generate a simplification routine for 4 operands.
18838 * gimple-match-head.c (gimple_simplify): Add an overload for
18839 4 operands. In the top-level function, handle up to 4 call
18840 arguments and call gimple_resimplify4.
18841 (gimple_resimplify4): New function.
18842 (build_call_internal): Pass a fourth operand.
18843 (maybe_push_to_seq): Likewise.
18844 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18845 Fold VEC_COND_EXPRs of an operation and a default value into
18846 an IFN_COND_* function if possible.
18847 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18848 New unspecs.
18849 (SVE_COND_FP_BINARY): Include them.
18850 (optab, sve_fp_op): Handle them.
18851 (SVE_INT_BINARY_REV): New code iterator.
18852 (SVE_COND_FP_BINARY_REV): New int iterator.
18853 (commutative): New int attribute.
18854 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18855 Declare.
18856 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18857 function.
18858 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18859 (*cond_<optab><mode>): New patterns for reversed operands.
18860
18861 2018-05-25 Richard Biener <rguenther@suse.de>
18862
18863 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18864 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18865 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18866 (STMT_VINFO_GROUPED_ACCESS): Adjust.
18867 * tree-vect-data-refs.c (everywhere): Adjust users.
18868 * tree-vect-loop.c (everywhere): Likewise.
18869 * tree-vect-slp.c (everywhere): Likewise.
18870 * tree-vect-stmts.c (everywhere): Likewise.
18871 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18872
18873 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18874
18875 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18876 Rename to...
18877 (gcc_cv_as_section_exclude): ... this.
18878 Try Solaris as #exclude syntax.
18879 * configure: Regenerate.
18880 * config.in: Regenerate.
18881 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18882 SECTION_EXCLUDE.
18883 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18884 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18885
18886 * varasm.c (default_elf_asm_named_section): Don't check if
18887 HAVE_GAS_SECTION_EXCLUDE is defined.
18888
18889 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18890
18891 * doc/md.texi: Update the documentation of the cond_* optabs
18892 to mention the new final operand. Fix GET_MODE_NUNITS call.
18893 Describe the scalar case too.
18894 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18895 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18896 instead of 2.
18897 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18898 (get_conditional_internal_fn): Update comment.
18899 * tree-vect-loop.c (vectorizable_reduction): Pass the original
18900 accumulator value as a final argument to conditional functions.
18901 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18902 a define_expand and add an "else" operand. Assert for now that
18903 the else operand is equal to operand 2. Use SVE_INT_BINARY and
18904 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18905 (*cond_<optab><mode>): New patterns.
18906 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18907 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18908 (UNSPEC_COND_EOR): Delete.
18909 (optab): Remove associated mappings.
18910 (SVE_INT_BINARY): New code iterator.
18911 (sve_int_op): Remove int attribute and add "minus" to the code
18912 attribute.
18913 (SVE_COND_INT_OP): Delete.
18914 (SVE_COND_FP_OP): Rename to...
18915 (SVE_COND_FP_BINARY): ...this.
18916
18917 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18918
18919 * optabs.c (can_reuse_operands_p): New function.
18920 (maybe_legitimize_operands): Try to reuse the results for
18921 earlier operands.
18922
18923 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18924
18925 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18926 Add {q} suffix to insn mnemonic.
18927
18928 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18929
18930 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18931 (msp430_warn_func_return): New.
18932
18933 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
18934
18935 * fold-const.c (tree_nonzero_bits): New function.
18936 * fold-const.h (tree_nonzero_bits): Likewise.
18937 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18938 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18939
18940 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18941
18942 PR target/85900
18943 PR target/85345
18944 * varasm.c (assemble_alias): Check ifunc_resolver only on
18945 FUNCTION_DECL.
18946
18947 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18948
18949 PR target/85903
18950 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18951 when memory input operand is handled.
18952
18953 2018-05-24 Luis Machado <luis.machado@linaro.org>
18954
18955 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18956 global.
18957 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18958
18959 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18960
18961 * match.pd: Delay FMA folds until after vectorization.
18962
18963 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
18964
18965 PR target/83009
18966 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18967 address check not strict.
18968
18969 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18970
18971 * gimple-match.h (gimple_match_op): New class.
18972 (mprts_hook): Replace parameters with a gimple_match_op *.
18973 (maybe_build_generic_op): Likewise.
18974 (gimple_simplified_result_is_gimple_val): Replace parameters with
18975 a const gimple_match_op *.
18976 (gimple_simplify): Replace code_helper * and tree * parameters with
18977 a gimple_match_op * parameter.
18978 (gimple_resimplify1): Replace code_helper *, tree and tree *
18979 parameters with a gimple_match_op * parameter.
18980 (gimple_resimplify2): Likewise.
18981 (gimple_resimplify3): Likewise.
18982 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18983 parameters with a gimple_match_op * parameter.
18984 * gimple-match-head.c (gimple_simplify): Change prototypes of
18985 auto-generated functions to take a gimple_match_op * instead of
18986 separate code_helper * and tree * parameters. Make the same
18987 change in the top-level overload and update calls to the
18988 gimple_resimplify routines. Update calls to the auto-generated
18989 functions and to maybe_push_res_to_seq in the publicly-facing
18990 operation-specific gimple_simplify overloads.
18991 (gimple_match_op::MAX_NUM_OPS): Define.
18992 (gimple_resimplify1): Replace rcode and ops with a single res_op
18993 parameter. Update call to gimple_simplify.
18994 (gimple_resimplify2): Likewise.
18995 (gimple_resimplify3): Likewise.
18996 (mprts_hook): Replace parameters with a gimple_match_op *.
18997 (maybe_build_generic_op): Likewise.
18998 (build_call_internal): Replace type, nargs and ops with
18999 a gimple_match_op *.
19000 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
19001 with a single gimple_match_op *. Update calls to mprts_hook,
19002 build_call_internal and gimple_simplified_result_is_gimple_val.
19003 Factor out code that is common to the tree_code and combined_fn cases.
19004 * genmatch.c (expr::gen_transform): Replace tem_code and
19005 tem_ops with a gimple_match_op called tem_op. Update calls
19006 to the gimple_resimplify functions and maybe_push_res_to_seq.
19007 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
19008 res_ops. Update call to the gimple_resimplify functions.
19009 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
19010 (decision_tree::gen): Make the functions take a gimple_match_op *
19011 called res_op instead of separate res_code and res_ops parameters.
19012 Update call accordingly.
19013 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
19014 and ops with a single res_op parameter. Update calls to
19015 maybe_build_generic_op and maybe_push_res_to_seq.
19016 (fold_stmt_1): Update calls to gimple_simplify and
19017 replace_stmt_with_simplification.
19018 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
19019 and gimple_simplified_result_is_gimple_val.
19020 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
19021 gimple_simplify.
19022 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
19023 with a gimple_match_op *.
19024 (vn_nary_build_or_lookup): Likewise. Update call to
19025 vn_nary_build_or_lookup_1.
19026 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
19027 gimple_match_op *. Update calls to the gimple_resimplify routines
19028 and to gimple_simplified_result_is_gimple_val.
19029 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
19030 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
19031 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
19032 (visit_nary_op): Likewise.
19033 (visit_reference_op_load): Likewise.
19034
19035 2018-05-23 Luis Machado <luis.machado@linaro.org>
19036
19037 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
19038 modifier for printing the step amount.
19039
19040 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
19041
19042 PR target/78849
19043 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
19044 types.
19045
19046 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
19047
19048 * doc/sourcebuild.texi (Endianness): New subsubsection.
19049
19050 2018-05-23 Luis Machado <luis.machado@linaro.org>
19051
19052 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19053 <prefetch_dynamic_strides>: New const bool field.
19054 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19055 prefetch_dynamic_strides.
19056 (exynosm1_prefetch_tune): Likewise.
19057 (thunderxt88_prefetch_tune): Likewise.
19058 (thunderx_prefetch_tune): Likewise.
19059 (thunderx2t99_prefetch_tune): Likewise.
19060 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
19061 false.
19062 (aarch64_override_options_internal): Update to set
19063 PARAM_PREFETCH_DYNAMIC_STRIDES.
19064 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19065 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19066 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19067 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19068 prefetch-dynamic-strides setting.
19069
19070 2018-05-23 Luis Machado <luis.machado@linaro.org>
19071
19072 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19073 <minimum_stride>: New const int field.
19074 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19075 minimum_stride field defaulting to -1.
19076 (exynosm1_prefetch_tune): Likewise.
19077 (thunderxt88_prefetch_tune): Likewise.
19078 (thunderx_prefetch_tune): Likewise.
19079 (thunderx2t99_prefetch_tune): Likewise.
19080 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
19081 <default_opt_level>: Set to 3.
19082 (aarch64_override_options_internal): Update to set
19083 PARAM_PREFETCH_MINIMUM_STRIDE.
19084 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19085 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19086 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19087 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19088 stride is constant and is below the minimum stride threshold.
19089
19090 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19091
19092 * config/arm/arm-cpus.in (mode26): Delete.
19093 (armv4): Delete mode26 reference.
19094 * config/arm/arm.c (arm_configure_build_target): Delete use of
19095 isa_bit_mode26.
19096
19097 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
19098
19099 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
19100 New insn pattern.
19101 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
19102 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
19103 for non-SSE modes.
19104 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
19105 (floatunsdidf2): Ditto.
19106
19107 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
19108
19109 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
19110 (fixuns_trunc<mode>si2_avx512f): Ditto.
19111 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
19112 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
19113 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
19114
19115 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
19116
19117 PR rtl-optimization/79985
19118 * df-scan.c (df_insn_refs_collect): Remove special case for
19119 global registers and asm statements.
19120
19121 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
19122
19123 * extend.texi (Global Register Variables): Rewrite the bullet list.
19124 Note that the register is available for allocation. Note that access
19125 via inline asm must use constraints. Add note about async-signal
19126 handlers. Remove paragraph about automagic register selection.
19127
19128 2018-05-23 Richard Biener <rguenther@suse.de>
19129
19130 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
19131 of fixed offset from memset VN.
19132
19133 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
19134
19135 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
19136 first_interp field.
19137 (alloc_cand_and_find_basis): Initialize first_interp field.
19138 (slsr_process_mul): Modify first_interp field.
19139 (slsr_process_add): Likewise.
19140 (slsr_process_cast): Modify first_interp field for each new
19141 interpretation.
19142 (slsr_process_copy): Likewise.
19143 (dump_candidate): Dump first_interp field.
19144 (replace_mult_candidate): Process all interpretations, not just
19145 subsequent ones.
19146 (replace_rhs_if_not_dup): Likewise.
19147 (replace_one_candidate): Likewise.
19148
19149 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
19150
19151 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
19152 Add new boolean.
19153 (aarch64_needs_frame_chain): New function.
19154 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
19155
19156 2018-05-23 Sudakshina Das <sudi.das@arm.com>
19157
19158 PR target/84882
19159 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
19160 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
19161 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
19162 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
19163 as true for strict-align.
19164 (aarch64_can_inline_p): Perform checks even when callee has no
19165 attributes to check for strict alignment.
19166 * doc/extend.texi (AArch64 Function Attributes): Document
19167 no-strict-align.
19168 * doc/invoke.texi: (AArch64 Options): Likewise.
19169
19170 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
19171
19172 PR tree-optimization/85853
19173 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
19174 the handling of the root of the node to...
19175 (vect_slp_analyze_node_operations_1): ...this new function,
19176 and run the whole thing with the child nodes' def types
19177 set according to their SLP node's def type.
19178
19179 2018-05-23 Richard Biener <rguenther@suse.de>
19180
19181 PR middle-end/85874
19182 * tree-data-ref.c (create_runtime_alias_checks): Defer
19183 and ignore overflow warnings.
19184
19185 2018-05-23 Yury Gribov <tetra2005@gmail.com>
19186
19187 PR tree-optimization/85822
19188 * tree-vrp.c (is_masked_range_test): Fix handling of negative
19189 constants.
19190
19191 2018-05-23 Richard Biener <rguenther@suse.de>
19192
19193 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19194 memset constants via native_interpret_expr.
19195
19196 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
19197
19198 PR target/85345
19199 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
19200 attribute.
19201 (cgraph_node::create_alias): Likewise.
19202 (cgraph_node::get_availability): Check ifunc_resolver instead
19203 of looking up ifunc attribute.
19204 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
19205 * varasm.c (do_assemble_alias): Likewise.
19206 (assemble_alias): Likewise.
19207 (default_binds_local_p_3): Likewise.
19208 * cgraph.h (cgraph_node): Add ifunc_resolver.
19209 (cgraph_node::only_called_directly_or_aliased_p): Return false
19210 for IFUNC resolver.
19211 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
19212 attribute.
19213 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
19214 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
19215 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
19216 instead of looking up ifunc attribute.
19217
19218 2018-05-22 Luis Machado <luis.machado@linaro.org>
19219
19220 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
19221
19222 2018-05-22 Martin Sebor <msebor@redhat.com>
19223
19224 PR middle-end/85359
19225 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
19226 only when expasion succeeds.
19227 (expand_builtin_strcmp): Same.
19228 (expand_builtin_strncmp): Same.
19229
19230 2018-05-22 Martin Sebor <msebor@redhat.com>
19231
19232 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
19233
19234 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
19235 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19236
19237 * config/aarch64/aarch64-ldpstp.md: Replace uses of
19238 aarch64_mem_pair_operand with memory_operand and delete operand swapping
19239 code.
19240 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19241 Add check for legitimate_address.
19242 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
19243 (aarch64_swap_ldrstr_operands): New.
19244 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
19245 Define prototype.
19246
19247 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
19248 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19249
19250 * config/aarch64/aarch64.md: New patterns to generate stp
19251 and ldp.
19252 (store_pair_sw, store_pair_dw): New patterns to generate stp for
19253 single words and double words.
19254 (load_pair_sw, load_pair_dw): Likewise.
19255 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
19256 Delete.
19257 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
19258 Delete.
19259 * config/aarch64/aarch64-ldpstp.md: Modify peephole
19260 for different mode ldpstp and add peephole for merged zero stores.
19261 Likewise for loads.
19262 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19263 Add size check.
19264 (aarch64_gen_store_pair): Rename calls to match new patterns.
19265 (aarch64_gen_load_pair): Rename calls to match new patterns.
19266 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
19267 (load_pair<DREG:mode><DREG2:mode>): ... This.
19268 (store_pair<mode>): Rename to...
19269 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
19270 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
19271 New mode iterators.
19272 (V_INT_EQUIV): Handle SImode.
19273 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
19274 New predicate.
19275
19276 2018-05-22 Martin Sebor <msebor@redhat.com>
19277
19278 PR c/85623
19279 * calls.c (maybe_warn_nonstring_arg): Use string length to set
19280 or ajust the presumed bound on an operation to avoid unnecessary
19281 warnings.
19282
19283 2018-05-22 Martin Sebor <msebor@redhat.com>
19284
19285 PR tree-optimization/85826
19286 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
19287 assuming that a DECL necesarily has a constant size.
19288
19289 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
19290
19291 PR middle-end/85862
19292 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
19293
19294 2018-05-22 Richard Biener <rguenther@suse.de>
19295
19296 PR tree-optimization/85834
19297 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
19298 non-constant and non-zero memset arguments.
19299
19300 2018-05-22 Martin Liska <mliska@suse.cz>
19301
19302 PR ipa/85607
19303 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
19304
19305 2018-05-22 Richard Biener <rguenther@suse.de>
19306
19307 PR tree-optimization/85863
19308 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
19309 comparisons when vectype is specified.
19310 (vectorizable_condition): Do not specify vectype for
19311 vect_is_simple_cond when SLP vectorizing.
19312
19313 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
19314
19315 PR target/85657
19316 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
19317 define __ibm128 as long double.
19318 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
19319 as a distinct type when IEEE 128-bit support is enabled.
19320 (init_float128_ieee): Fix up conversions between IFmode and IEEE
19321 128-bit types to use the correct functions.
19322 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
19323 convert between 128-bit floating point types that have different
19324 modes but the same representation, instead of using gen_lowpart to
19325 makean alias.
19326 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
19327 KFmode.
19328 (IFKF_reg): New attributes to give the register constraints for
19329 IFmode and KFmode.
19330 (extend<mode>tf2_internal): New insns to mark an explicit
19331 conversion between 128-bit floating point types that have a
19332 different mode but share the same representation.
19333
19334 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
19335
19336 PR tree-optimization/85814
19337 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
19338 a null return from get_strinfo when unsharing the next
19339 strinfo in the chain.
19340
19341 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19342
19343 PR gcc/84923
19344 * varasm.c (weak_finish): Clean up weak_decls.
19345
19346 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19347
19348 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
19349 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
19350 UNSPEC_UADALP values.
19351 * config/aarch64/iterators.md (ABAL): New int iterator.
19352 (ABDL2): Likewise.
19353 (ADALP): Likewise.
19354 (sur): Add mappings for the above.
19355 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
19356 New define_insn.
19357 (aarch64_<sur>abal<mode>_4): Likewise.
19358 (aarch64_<sur>adalp<mode>_3): Likewise.
19359 (<sur>sadv16qi): New define_expand.
19360
19361 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
19362
19363 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
19364 (*movdf_internal): Ditto.
19365 (*rcpsf2_sse): Ditto.
19366 (*rsqrtsf2_sse): Ditto.
19367 (*sqrt<mode>2_sse): Ditto.
19368
19369 2018-05-21 Tamar Christina <tamar.christina@arm.com>
19370
19371 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
19372 eor3q<mode>4.
19373 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
19374 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
19375 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
19376 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
19377 vbcaxq_s64): New.
19378 * config/aarch64/arm_neon.h: Likewise.
19379 * config/aarch64/iterators.md (VQ_I): New.
19380
19381 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
19382
19383 * config.gcc: Add arc/t-multilib-linux to tmake_file for
19384 arc*-*-linux*.
19385 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
19386 MULTILIB_DIRNAMES
19387
19388 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
19389
19390 * config/nds32/constraints.md (S): New constraint.
19391 * config/nds32/nds32.md (call_internal): Use constraint S.
19392 (call_value_internal): Likewise.
19393 (sibcall_internal): Likewise.
19394 (sibcall_value_internal): Likewise.
19395
19396 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
19397 Chung-Ju Wu <jasonwucj@gmail.com>
19398
19399 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
19400 into consideration.
19401
19402 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
19403 Chung-Ju Wu <jasonwucj@gmail.com>
19404
19405 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
19406 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
19407 (nds32_rtx_costs_impl): Simplify.
19408 (nds32_address_cost_impl): Simplify.
19409 (nds32_init_rtx_costs): New function.
19410 (nds32_rtx_costs_speed_prefer): Likewise.
19411 (nds32_rtx_costs_size_prefer): Likewise.
19412 (nds32_address_cost_speed_prefer): Likewise.
19413 (nds32_address_cost_speed_fwprop): Likewise.
19414 (nds32_address_cost_size_prefer): Likewise.
19415 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
19416 * config/nds32/nds32.c (nds32_option_override): Use
19417 nds32_init_rtx_costs function.
19418
19419 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
19420
19421 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
19422 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
19423 (TARGET_PIPELINE_N8): Likewise.
19424 (TARGET_PIPELINE_N10): Likewise.
19425 (TARGET_PIPELINE_N13): Likewise.
19426 (TARGET_PIPELINE_GRAYWOLF): Likewise.
19427
19428 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
19429
19430 * config/nds32/nds32-fpu.md: Update copyright year.
19431
19432 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19433
19434 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
19435
19436 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19437
19438 * config/nds32/nds32.c
19439 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
19440 * config/nds32/nds32.opt (minline-asm-r15): New option.
19441
19442 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19443
19444 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
19445 MASK_HW_ABS.
19446 * config/nds32/nds32.md (abssi2): New pattern.
19447
19448 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
19449
19450 * config/i386/i386.md (rex64namesuffix): New mode attribute.
19451 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
19452 Merge insn pattern from sse_cvtsi2ss<round_name> and
19453 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
19454 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
19455 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
19456 using SWI48 mode iterator.
19457 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
19458 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
19459 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
19460 pattern from sse_cvttss2si<round_saeonly_name>
19461 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
19462 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
19463 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
19464 using SWI48 mode iterator.
19465 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
19466 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
19467 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
19468 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
19469 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
19470 using SWI48 mode iterator.
19471 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
19472 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
19473 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
19474 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
19475 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
19476 SWI48 mode iterator.
19477 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
19478 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
19479 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
19480 pattern from sse_cvttsd2si<round_saeonly_name>
19481 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
19482
19483 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19484
19485 * config/nds32/nds32-md-auxiliary.c
19486 (nds32_valid_smw_lwm_base_p): Refine.
19487 (nds32_output_smw_single_word): Refine.
19488 (nds32_output_smw_double_word): New.
19489 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
19490
19491 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19492
19493 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
19494 (nds32_output_stack_pop): Refine.
19495 (nds32_expand_unaligned_load): Refine.
19496 (nds32_expand_unaligned_store): Refine.
19497
19498 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19499 Chung-Ju Wu <jasonwucj@gmail.com>
19500
19501 * config/nds32/constants.md: Add TP_REGNUM constant.
19502 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
19503 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
19504 UNSPEC_ADD32.
19505 * config/nds32/nds32-doubleword.md: Consider flag_pic.
19506 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
19507 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
19508 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
19509 and PIC code generation.
19510 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
19511 code generation.
19512 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
19513 optimization.
19514 * config/nds32/nds32.md: Support TLS and PIC.
19515 * config/nds32/nds32.c: Support TLS and PIC.
19516 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
19517 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
19518 predicate.
19519
19520 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19521
19522 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
19523 mode with E_ prefix.
19524
19525 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19526 Chung-Ju Wu <jasonwucj@gmail.com>
19527
19528 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
19529 * config/nds32/nds32-md-auxiliary.c
19530 (symbolic_reference_mentioned_p): New.
19531 (nds32_legitimize_ict_address): New.
19532 (nds32_expand_ict_move): New.
19533 (nds32_indirect_call_referenced_p): New.
19534 (nds32_symbol_binds_local_p): Delete.
19535 (nds32_long_call_p): Modify.
19536 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
19537 * config/nds32/nds32-protos.h
19538 (symbolic_reference_mentioned_p): Declare.
19539 (nds32_legitimize_ict_address): Declare.
19540 (nds32_expand_ict_move): Declare.
19541 (nds32_indirect_call_referenced_p): Declare.
19542 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
19543 (nds32_relax_group): Use nds32_ict_const_p as condition.
19544 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
19545 (nds32_asm_file_start): Output ict_model directive in asm code.
19546 (nds32_legitimate_address_p): Consider indirect call.
19547 (nds32_print_operand): Consider indirect call.
19548 (nds32_print_operand_address): Consider indirect call.
19549 (nds32_insert_attributes): Handle "indirect_call" attribute.
19550 (TARGET_LEGITIMATE_ADDRESS_P): Define.
19551 (TARGET_LEGITIMATE_CONSTANT_P): Define.
19552 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
19553 (TARGET_DELEGITIMIZE_ADDRESS): Define.
19554 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
19555 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
19556 (TARGET_ICT_MODEL_SMALL): Define.
19557 (TARGET_ICT_MODEL_LARGE): Define.
19558 * config/nds32/nds32.md (movsi): Consider ict model.
19559 (call, call_value): Consider ict model.
19560 (sibcall, sibcall_value): Consider ict model.
19561 * config/nds32/nds32.opt (mict-model): New option.
19562 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
19563 model.
19564
19565 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
19566 Monk Chiang <sh.chiang04@gmail.com>
19567 Jim Wilson <jimw@sifive.com>
19568
19569 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
19570 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
19571 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
19572 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
19573 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
19574 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
19575 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
19576 compute save_libcall_adjustment properly.
19577 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
19578 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
19579 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
19580 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
19581 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
19582 (ABI_SPEC): Handle mabi=ilp32e.
19583 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
19584 (RVE): Add RVE mask.
19585 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
19586 <-march>: Add rv32e as an example.
19587
19588 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
19589
19590 PR c++/82899
19591 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
19592 (intra_create_variable_infos): Handle C++ constructors.
19593
19594 2018-05-18 Martin Liska <mliska@suse.cz>
19595
19596 * passes.def: Remove a redundant pass.
19597
19598 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
19599
19600 PR bootstrap/85838
19601 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
19602
19603 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19604
19605 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
19606 (ARMv4): Update.
19607 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
19608 (ARMv6m): Update.
19609 (armv2, armv2a, armv3, armv3m): Delete architectures.
19610 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
19611 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
19612 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
19613 Delete cpus.
19614 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
19615 (*mulsidi3adddi): Likewise.
19616 (mulsidi3): Likewise.
19617 (*mulsidi3_nov6): Likewise.
19618 (umulsidi3): Likewise.
19619 (umulsidi3_nov6): Likewise.
19620 (umaddsidi4): Likewise.
19621 (*umulsidi3adddi): Likewise.
19622 (smulsi3_highpart): Likewise.
19623 (*smulsi3_highpart_nov6): Likewise.
19624 (umulsi3_highpart): Likewise.
19625 (*umulsi3_highpart_nov6): Likewise.
19626 * config/arm/arm.h (arm_arch3m): Delete.
19627 * config/arm/arm.c (arm_arch3m): Delete.
19628 (arm_option_override_internal): Update armv3-related comment.
19629 (arm_configure_build_target): Delete use of isa_bit_mode32.
19630 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
19631 (arm_rtx_costs_internal): Delete check of arm_arch3m.
19632 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
19633 (mulsa3): Likewise.
19634 (mulusa3): Likewise.
19635 * config/arm/arm-protos.h (arm_arch3m): Delete.
19636 * config/arm/arm-tables.opt: Regenerate.
19637 * config/arm/arm-tune.md: Likewise.
19638 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
19639 deleted architectures.
19640
19641 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19642
19643 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
19644 (armv5t, armv5te): New features.
19645 (ARMv5, ARMv5e): Delete fgroups.
19646 (ARMv5t, ARMv5te): Adjust for above changes.
19647 (ARMv6m): Likewise.
19648 (armv5, armv5e): Delete arches.
19649 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
19650 arm_arch5.
19651 (*call_reg_arm): Likewise.
19652 (*call_value_reg_armv5): Likewise.
19653 (*call_value_reg_arm): Likewise.
19654 (*call_symbol): Likewise.
19655 (*call_value_symbol): Likewise.
19656 (*sibcall_insn): Likewise.
19657 (*sibcall_value_insn): Likewise.
19658 (clzsi2): Likewise.
19659 (prefetch): Likewise.
19660 (define_split and define_peephole2 dependent on arm_arch5):
19661 Likewise.
19662 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
19663 arm_arch5e.
19664 (TARGET_ARM_QBIT): Likewise.
19665 (TARGET_DSP_MULTIPLY): Likewise.
19666 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
19667 (arm_arch5, arm_arch5e): Delete.
19668 (arm_arch5t, arm_arch5te): Declare.
19669 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
19670 (arm_arch5t): Declare.
19671 (arm_option_reconfigure_globals): Update for the above.
19672 (arm_options_perform_arch_sanity_checks): Update comment, replace
19673 use of arm_arch5 with arm_arch5t.
19674 (use_return_insn): Likewise.
19675 (arm_emit_call_insn): Likewise.
19676 (output_return_instruction): Likewise.
19677 (arm_final_prescan_insn): Likewise.
19678 (arm_coproc_builtin_available): Likewise.
19679 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
19680 arm_arch5e with arm_arch5t and arm_arch5te.
19681 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
19682 (arm_arch5t, arm_arch5te): Declare.
19683 * config/arm/arm-tables.opt: Regenerate.
19684 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
19685 * config/arm/t-multilib: Likewise.
19686 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
19687 instead of arm_arch5.
19688 (*call_reg_thumb1): Likewise.
19689 (*call_value_reg_thumb1_v5): Likewise.
19690 (*call_value_reg_thumb1): Likewise.
19691 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19692 unreachable path.
19693 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19694
19695 2018-05-18 Martin Liska <mliska@suse.cz>
19696
19697 PR gcov-profile/84846
19698 * doc/gcov.texi: Document -t option of gcov tool.
19699
19700 2018-05-18 Martin Liska <mliska@suse.cz>
19701
19702 PR gcov-profile/84846
19703 * gcov.c (print_usage): Add new -t option.
19704 (process_args): Handle the option.
19705 (generate_results): Use stdout as output when requested by
19706 the option.
19707
19708 2018-05-18 Martin Liska <mliska@suse.cz>
19709
19710 PR gcov-profile/84846
19711 * coverage.c (coverage_init): Write PWD to .gcno file.
19712 * doc/gcov.texi: Document how working directory is printed.
19713 * gcov-dump.c (dump_gcov_file): Print PWD.
19714 * gcov.c (output_intermediate_file): Likewise.
19715 (read_graph_file): Read PWD string.
19716 (output_lines): Print PWD.
19717
19718 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19719
19720 PR middle-end/85817
19721 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19722 for retval and return false if all args to phi are zero.
19723
19724 2018-05-18 Richard Biener <rguenther@suse.de>
19725
19726 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19727 method.
19728 (evrp_dom_walker::before_dom_children): Call it.
19729
19730 2018-05-18 Richard Biener <rguenther@suse.de>
19731
19732 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19733 results when processing array refs with variable index.
19734
19735 2018-05-18 Toon Moene <toon@moene.org>
19736
19737 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19738 directly after that of -floop-interchange. Indicate that both
19739 options are enabled by default when specifying -O3.
19740
19741 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19742
19743 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19744 iterator. Delete separate integer-mode vec_set<mode> expander.
19745 (aarch64_simd_vec_setv2di): Delete.
19746 (vec_setv2di): Delete.
19747 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19748 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
19749 the "w, r" alternative.
19750
19751 2018-05-18 Martin Liska <mliska@suse.cz>
19752
19753 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19754 * tree-pass.h (make_pass_lower_switch_O0): New function.
19755 * tree-switch-conversion.c (node_has_low_bound): Remove.
19756 (node_has_high_bound): Likewise.
19757 (node_is_bounded): Likewise.
19758 (class pass_lower_switch): Make it a template type and create
19759 two instances.
19760 (pass_lower_switch::execute): Add template argument.
19761 (make_pass_lower_switch): New function.
19762 (make_pass_lower_switch_O0): New function.
19763 (do_jump_if_equal): Remove.
19764 (emit_case_nodes): Simplify to just handle all 3 cases and leave
19765 all the hard work to tree optimization passes.
19766
19767 2018-05-18 Martin Liska <mliska@suse.cz>
19768
19769 * dbgcnt.c (limit_low): Renamed from limit.
19770 (limit_high): New variable.
19771 (dbg_cnt_is_enabled): Check for upper limit.
19772 (dbg_cnt): Adjust dumping.
19773 (dbg_cnt_set_limit_by_index): Add new argument for high
19774 value.
19775 (dbg_cnt_set_limit_by_name): Likewise.
19776 (dbg_cnt_process_single_pair): Parse new format.
19777 (dbg_cnt_process_opt): Use strtok.
19778 (dbg_cnt_list_all_counters): Remove 'value' and add
19779 'limit_high'.
19780 * doc/invoke.texi: Document changes.
19781
19782 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
19783
19784 * doc/sourcebuild.texi (scalar_all_fma): Document.
19785 * tree.def (FMA_EXPR): Delete.
19786 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
19787 * internal-fn.c (ternary_direct): New macro.
19788 (expand_ternary_optab_fn): Likewise.
19789 (direct_ternary_optab_supported_p): Likewise.
19790 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
19791 * builtins.c (fold_builtin_fma): Delete.
19792 (fold_builtin_3): Don't call it.
19793 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
19794 * expr.c (expand_expr_real_2): Likewise.
19795 * fold-const.c (operand_equal_p): Likewise.
19796 (fold_ternary_loc): Likewise.
19797 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
19798 * gimple.c (DEFTREECODE): Likewise.
19799 * gimplify.c (gimplify_expr): Likewise.
19800 * optabs-tree.c (optab_for_tree_code): Likewise.
19801 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
19802 * tree-eh.c (operation_could_trap_p): Likewise.
19803 (stmt_could_throw_1_p): Likewise.
19804 * tree-inline.c (estimate_operator_cost): Likewise.
19805 * tree-pretty-print.c (dump_generic_node): Likewise.
19806 (op_code_prio): Likewise.
19807 * tree-ssa-loop-im.c (stmt_cost): Likewise.
19808 * tree-ssa-operands.c (get_expr_operands): Likewise.
19809 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
19810 * fold-const-call.h (fold_fma): Delete.
19811 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
19812 CFN_FNMA and CFN_FNMS.
19813 (fold_fma): Delete.
19814 * genmatch.c (combined_fn): New enum.
19815 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
19816 (commutative_op): New function.
19817 (commutate): Use it. Handle more than 2 operands.
19818 (dt_operand::gen_gimple_expr): Use commutative_op.
19819 (parser::parse_expr): Allow :c to be used with non-binary
19820 operators if the commutative operand is known.
19821 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
19822 CFN_FMS, CFN_FNMA and CFN_FNMS.
19823 (backprop::process_assign_use): Remove FMA_EXPR handling.
19824 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19825 (gen_hsa_fma): New function.
19826 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19827 IFN_FNMA and IFN_FNMS.
19828 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19829 * gimple-fold.h (follow_all_ssa_edges): Declare.
19830 * gimple-fold.c (follow_all_ssa_edges): New function.
19831 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19832 gimple_build interface and use follow_all_ssa_edges to fold the result.
19833 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19834 instead of checking for optabs directly.
19835 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19836 rather than FMA_EXPRs.
19837 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19838 call to IFN_FMA instead of an FMA_EXPR.
19839
19840 2018-05-17 Jim Wilson <jimw@sifive.com>
19841
19842 * expr.c (do_tablejump): When converting index to Pmode, if we have a
19843 sign extended promoted subreg, and the range does not have the sign bit
19844 set, then do a sign extend.
19845
19846 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19847 test, check for sign extended subreg and/or constant operands, and
19848 do a sign extend in that case.
19849
19850 2018-05-17 Steve Ellcey <sellcey@cavium.com>
19851
19852 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19853 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19854 Add untyped.
19855 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19856 Change logics_shift_reg to logics_shift_imm.
19857 (thunderx2t99_fp_loadpair_basic): Delete.
19858 (thunderx2t99_fp_storepair_basic): Delete.
19859 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19860 (thunderx2t99_asimd_polynomial): Delete.
19861 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19862 and neon_fp_mul_d_scalar_q.
19863 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19864 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19865 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19866 (thunderx2t99_asimd_lut): Add missing tbl types.
19867 (thunderx2t99_asimd_ext): Delete.
19868 (thunderx2t99_asimd_load1_1_mult): Delete.
19869 (thunderx2t99_asimd_load1_2_mult): Delete.
19870 (thunderx2t99_asimd_load1_ldp): New.
19871 (thunderx2t99_asimd_load1): New.
19872 (thunderx2t99_asimd_load2): Add missing *load2* types.
19873 (thunderx2t99_asimd_load3): New.
19874 (thunderx2t99_asimd_load4): New.
19875 (thunderx2t99_asimd_store1_1_mult): Delete.
19876 (thunderx2t99_asimd_store1_2_mult): Delete.
19877 (thunderx2t99_asimd_store2_mult): Delete.
19878 (thunderx2t99_asimd_store2_onelane): Delete.
19879 (thunderx2t99_asimd_store_stp): New.
19880 (thunderx2t99_asimd_store1): New.
19881 (thunderx2t99_asimd_store2): New.
19882 (thunderx2t99_asimd_store3): New.
19883 (thunderx2t99_asimd_store4): New.
19884
19885 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
19886
19887 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19888 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
19889
19890 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
19891 Segher Boessenkool <segher@kernel.crashing.org>
19892
19893 PR target/85698
19894 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19895 operand.
19896
19897 2018-05-17 Richard Biener <rguenther@suse.de>
19898
19899 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19900 for pruning loop and prune defs feeding only already visited PHIs.
19901
19902 2018-05-17 Richard Biener <rguenther@suse.de>
19903
19904 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19905
19906 2018-05-17 Bin Cheng <bin.cheng@arm.com>
19907 Richard Biener <rguenther@suse.de>
19908
19909 PR tree-optimization/85793
19910 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19911 for VMAT_ELEMENTWISE.
19912
19913 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19914
19915 * internal-fn.h (lookup_internal_fn): Declare
19916 * internal-fn.c (lookup_internal_fn): New function.
19917 * gimple.c (gimple_build_call_from_tree): Handle calls to
19918 internal functions.
19919 * gimple-pretty-print.c (dump_gimple_call): Print "." before
19920 internal function names.
19921 * tree-pretty-print.c (dump_generic_node): Likewise.
19922 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19923
19924 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19925
19926 * gimple-fold.h (gimple_build): Make the function forms take
19927 combined_fn rather than built_in_function.
19928 (gimple_simplify): Likewise.
19929 * gimple-match-head.c (gimple_simplify): Likewise.
19930 * gimple-fold.c (gimple_build): Likewise.
19931 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19932 rather than gimple_build_call_internal.
19933 (get_initial_defs_for_reduction): Likewise.
19934 (vect_create_epilog_for_reduction): Likewise.
19935 (vectorizable_live_operation): Likewise.
19936
19937 2018-05-17 Martin Liska <mliska@suse.cz>
19938
19939 * gimple-ssa-sprintf.c (format_directive): Do not use
19940 space in between 'G_' and '('.
19941
19942 2018-05-17 Jakub Jelinek <jakub@redhat.com>
19943
19944 PR target/85323
19945 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19946 even if the mask is not all ones.
19947
19948 PR target/85323
19949 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19950 vector.
19951 (ix86_gimple_fold_builtin): Likewise.
19952
19953 PR target/85323
19954 * config/i386/i386.c: Include tree-vector-builder.h.
19955 (ix86_vector_shift_count): New function.
19956 (ix86_fold_builtin): Fold shift builtins by scalar count.
19957 (ix86_gimple_fold_builtin): Likewise.
19958
19959 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19960 _mm512_setzero): New intrinsics.
19961
19962 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
19963 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19964
19965 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19966 code generation for cases where splatting a value is not useful.
19967 * simplify-rtx.c (simplify_ternary_operation): Simplify
19968 vec_merge across a vec_duplicate and a paradoxical subreg forming
19969 a vector mode to a vec_concat.
19970
19971 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
19972
19973 * config.gcc: Support "goldmont-plus".
19974 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19975 "goldmont-plus".
19976 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19977 PROCESSOR_GOLDMONT_PLUS.
19978 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19979 (processor_target_table): Add "goldmont-plus".
19980 (PTA_GOLDMONT_PLUS): Define.
19981 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19982 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19983 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19984 (fold_builtin_cpu): Add "goldmont-plus".
19985 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19986 (ix86_option_override_internal): Add "goldmont-plus".
19987 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19988 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19989 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19990 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19991
19992 2018-05-17 Richard Biener <rguenther@suse.de>
19993
19994 PR tree-optimization/85757
19995 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19996 remove defs that only feed that PHI from further processing.
19997
19998 2018-05-16 Jim Wilson <jimw@sifive.com>
19999
20000 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
20001 asterisk to name.
20002 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
20003
20004 2018-05-16 Mark Wielaard <mark@klomp.org>
20005
20006 * dwarf2out.c (count_index_strings): New function.
20007 (output_indirect_strings): Call count_index_strings and generate
20008 header for dwarf_version >= 5.
20009
20010 2018-05-16 Mark Wielaard <mark@klomp.org>
20011
20012 * dwarf2out.c (dwarf_FORM): New function.
20013 (set_indirect_string): Use dwarf_FORM.
20014 (reset_indirect_string): Likewise.
20015 (size_of_die): Likewise.
20016 (value_format): Likewise.
20017 (output_die): Likewise.
20018 (add_skeleton_AT_string): Likewise.
20019 (output_macinfo_op): Likewise.
20020 (index_string): Likewise.
20021 (output_index_string_offset): Likewise.
20022 (output_index_string): Likewise.
20023 (count_index_strings): Likewise.
20024
20025 2018-05-16 Carl Love <cel@us.ibm.com>
20026
20027 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20028 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
20029
20030 2018-05-16 Martin Jambor <mjambor@suse.cz>
20031
20032 * ipa-prop.c (ipa_free_all_edge_args): Remove.
20033 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
20034
20035 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
20036
20037 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
20038 (fnma<mode>4): Likewise.
20039 (fms<mode>4): Likewise.
20040 (fnms<mode>4): Likewise.
20041 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
20042 (aarch64_fnma<mode>4): Likewise.
20043 (aarch64_fms<mode>4): Likewise.
20044 (aarch64_fnms<mode>4): Likewise.
20045 (aarch64_fnmadd<mode>4): Likewise.
20046
20047 2018-05-16 Jason Merrill <jason@redhat.com>
20048
20049 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
20050
20051 2018-05-16 Richard Biener <rguenther@suse.de>
20052
20053 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
20054 (dump_stmt_cost): Declare.
20055 (add_stmt_cost): Dump cost we add.
20056 (add_stmt_costs): New function.
20057 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
20058 No longer exported.
20059 (vect_analyze_stmt): Adjust prototype.
20060 (vectorizable_condition): Likewise.
20061 (vectorizable_live_operation): Likewise.
20062 (vectorizable_reduction): Likewise.
20063 (vectorizable_induction): Likewise.
20064 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
20065 cost vector to pass to vectorizable_ and record afterwards.
20066 (vect_model_reduction_cost): Take cost vector argument and adjust.
20067 (vect_model_induction_cost): Likewise.
20068 (vectorizable_reduction): Likewise.
20069 (vectorizable_induction): Likewise.
20070 (vectorizable_live_operation): Likewise.
20071 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
20072 SLP_TREE_NUMBER_OF_VEC_STMTS.
20073 (vect_analyze_slp_cost_1): Remove.
20074 (vect_analyze_slp_cost): Likewise.
20075 (vect_slp_analyze_node_operations): Take visited args and
20076 a target cost vector. Avoid processing already visited stmt sets.
20077 (vect_slp_analyze_operations): Use a local cost vector to gather
20078 costs and register those of non-discarded instances.
20079 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
20080 (vect_schedule_slp_instance): Remove copying of
20081 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
20082 zero.
20083 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
20084 adding cost. Record cost entry location.
20085 (vect_prologue_cost_for_slp_op): Function to compute cost of
20086 a constant or invariant generated for SLP vect in the prologue,
20087 split out from vect_analyze_slp_cost_1.
20088 (vect_model_simple_cost): Make static. Adjust for SLP costing.
20089 (vect_model_promotion_demotion_cost): Likewise.
20090 (vect_model_store_cost): Likewise, make static.
20091 (vect_model_load_cost): Likewise.
20092 (vectorizable_bswap): Add cost vector arg and adjust.
20093 (vectorizable_call): Likewise.
20094 (vectorizable_simd_clone_call): Likewise.
20095 (vectorizable_conversion): Likewise.
20096 (vectorizable_assignment): Likewise.
20097 (vectorizable_shift): Likewise.
20098 (vectorizable_operation): Likewise.
20099 (vectorizable_store): Likewise.
20100 (vectorizable_load): Likewise.
20101 (vectorizable_condition): Likewise.
20102 (vectorizable_comparison): Likewise.
20103 (can_vectorize_live_stmts): Likewise.
20104 (vect_analyze_stmt): Likewise.
20105 (vect_transform_stmt): Adjust calls to vectorizable_*.
20106 * tree-vectorizer.c: Include gimple-pretty-print.h.
20107 (dump_stmt_cost): New function.
20108
20109 2018-05-16 Richard Biener <rguenther@suse.de>
20110
20111 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
20112 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
20113 * tree-ssa-dse.c: Include tree-ssa-loop.h.
20114 (check_name): New callback.
20115 (dse_classify_store): Track cycles via a visited bitmap of PHI
20116 defs and simplify handling of in-loop and across loop dead stores
20117 and properly fail for loop-variant refs. Handle byte-tracking with
20118 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
20119 limiting the walk.
20120
20121 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
20122
20123 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
20124 (vect_get_mask_type_for_stmt): Likewise.
20125 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
20126 split out from...
20127 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
20128 to determine the statement's vector type and the vector type that
20129 should be used for calculating nunits. Deal with cases in which
20130 the type has to be deferred.
20131 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
20132 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
20133 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
20134 (vect_determine_vf_for_stmt): New functions, split out from...
20135 (vect_determine_vectorization_factor): ...here.
20136 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
20137 (vect_get_mask_type_for_stmt): New functions, split out from
20138 vect_determine_vectorization_factor.
20139
20140 2018-05-16 Richard Biener <rguenther@suse.de>
20141
20142 * tree-cfg.c (verify_gimple_assign_ternary): Properly
20143 verify the [VEC_]COND_EXPR embedded comparison.
20144
20145 2018-05-15 Martin Sebor <msebor@redhat.com>
20146
20147 PR tree-optimization/85753
20148 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
20149 RECORD_TYPE in addition to ARRAY_TYPE.
20150
20151 2018-05-15 Martin Sebor <msebor@redhat.com>
20152
20153 PR middle-end/85643
20154 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
20155
20156 2018-05-15 Richard Biener <rguenther@suse.de>
20157
20158 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
20159 add by_clobber_p one. Change algorithm to collect all defs
20160 representing uses we need to walk and try reducing them to
20161 a single one before failing.
20162 (dse_dom_walker::dse_optimize_stmt): Adjust.
20163
20164 2018-05-13 Mark Wielaard <mark@klomp.org>
20165
20166 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
20167 (size_of_loc_descr): Likewise.
20168 (output_loc_operands): Likewise.
20169 (output_loc_operands_raw): Likewise.
20170 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
20171 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
20172 (hash_loc_operands): Likewise.
20173 (compare_loc_operands): Likewise.
20174
20175 2018-05-14 Mark Wielaard <mark@klomp.org>
20176
20177 * dwarf2out.c (count_index_addrs): New function.
20178 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
20179
20180 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20181
20182 PR tree-optimization/83648
20183 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
20184 return value as malloc candidate.
20185
20186 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20187
20188 PR ipa/85734
20189 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
20190 param as true in call to suggest_attribute.
20191
20192 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
20193
20194 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
20195 -mreadonly-in-sdata.
20196
20197 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20198
20199 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
20200 New pattern.
20201 (aarch64_crypto_aesd_fused): Likewise.
20202
20203 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
20204
20205 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
20206 (movsi_aarch64): Likewise.
20207 (load_pairsi): Likewise.
20208 (load_pairdi): Likewise.
20209 (store_pairsi): Likewise.
20210 (store_pairdi): Likewise.
20211 (load_pairsf): Likewise.
20212 (load_pairdf): Likewise.
20213 (store_pairsf): Likewise.
20214 (store_pairdf): Likewise.
20215 (zero_extend): Likewise.
20216 (trunc): Swap alternatives.
20217 (fcvt_target): Add '?' to prefer w over r.
20218
20219 2018-05-14 Jakub Jelinek <jakub@redhat.com>
20220
20221 PR target/85756
20222 * config/i386/i386.md: Disallow non-commutative arithmetics in
20223 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
20224 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
20225 in the peephole2 before it.
20226
20227 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
20228
20229 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
20230 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
20231 (ix86_handle_option): Handle -mcldemote.
20232 * config.gcc: New header.
20233 * config/i386/cldemoteintrin.h: New file.
20234 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
20235 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20236 -mcldemote.
20237 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20238 OPTION_MASK_ISA_CLDEMOTE.
20239 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
20240 (ix86_valid_target_attribute_inner_p): Ditto.
20241 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
20242 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
20243 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
20244 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
20245 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
20246 (cldemote): New.
20247 * config/i386/i386.opt: Add -mcldemote.
20248 * config/i386/x86intrin.h: New header.
20249 * doc/invoke.texi: Add -mcldemote.
20250
20251 2018-05-14 Richard Biener <rguenther@suse.de>
20252
20253 * doc/match-and-simplify.texi: Adjust :s documentation.
20254
20255 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
20256
20257 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
20258 intended memcpy size.
20259 (REORDER_45): Likewise.
20260
20261 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
20262
20263 * sort.cc: New file.
20264 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
20265 * vec.c (qsort_chk): Use gcc_qsort.
20266 * Makefile.in (OBJS-libcommon): Add sort.o.
20267 (build/sort.o): New target. Use it...
20268 (BUILD_RTL): ... here, and...
20269 (build/gencfn-macros): ... here, and...
20270 (build/genmatch): ... here.
20271
20272 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20273 Chung-Ju Wu <jasonwucj@gmail.com>
20274
20275 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
20276 * config/nds32/nds32-graywolf.md: New file.
20277 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
20278 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
20279 pipeline.
20280 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
20281 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
20282 * config/nds32/nds32.md (pipeline_model): Add graywolf.
20283 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
20284 * config/nds32/pipelines.md: Include n15 settings.
20285
20286 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20287 Chung-Ju Wu <jasonwucj@gmail.com>
20288
20289 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
20290 * config/nds32/nds32-n13.md: New file.
20291 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
20292 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
20293 pipeline.
20294 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
20295 * config/nds32/nds32.md (pipeline_model): Add n13.
20296 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
20297 * config/nds32/pipelines.md: Include n13 settings.
20298
20299 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20300 Chung-Ju Wu <jasonwucj@gmail.com>
20301
20302 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
20303 * config/nds32/nds32-n10.md: New file.
20304 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
20305 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
20306 pipeline.
20307 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
20308 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
20309 * config/nds32/nds32.md (pipeline_model): Add n10.
20310 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
20311 * config/nds32/pipelines.md: Include n10 settings.
20312
20313 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
20314 Kito Cheng <kito.cheng@gmail.com>
20315 Chung-Ju Wu <jasonwucj@gmail.com>
20316
20317 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
20318 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20319 Add enum values for DSP extension instructions.
20320 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
20321 New constraints.
20322 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
20323 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
20324 New code iterators.
20325 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
20326 * config/nds32/nds32-dspext.md: New file for DSP implementation.
20327 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
20328 * config/nds32/nds32-intrinsic.md: Likewise.
20329 * config/nds32/nds32_intrinsic.h: Likewise.
20330 * config/nds32/nds32-md-auxiliary.c: Likewise.
20331 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
20332 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
20333 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
20334 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
20335 * config/nds32/nds32-protos.h: New declarations for DSP extension.
20336 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
20337 TYPE_DMAC in switch statement.
20338 * config/nds32/nds32.c: New checking and implementation for DSP
20339 extension instructions.
20340 * config/nds32/nds32.h: Likewise.
20341 * config/nds32/nds32.md: Likewise.
20342 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
20343 * config/nds32/predicates.md: Implement new predicates for DSP
20344 extension.
20345
20346 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
20347
20348 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
20349 Reformat alternatives and attributes so it is easier to identify
20350 which constraints/attributes go with which instruction.
20351 (mov<mode>_hardfloat32, FMOVE64): Likewise.
20352 (mov<mode>_softfloat32, FMOVE64): Likewise.
20353 (mov<mode>_hardfloat64, FMOVE64): Likewise.
20354 (mov<mode>_softfloat64, FMOVE64): Likewise.
20355
20356 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
20357
20358 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20359 subsection.
20360 (Basic PowerPC Built-in Functions): The new name of the
20361 subsection previously known as "PowerPC Built-in Functions".
20362 (Basic PowerPC Built-in Functions Available on all Configurations):
20363 New subsubsection.
20364 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
20365 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
20366 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
20367 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
20368
20369 2018-05-11 Martin Jambor <mjambor@suse.cz>
20370
20371 PR ipa/85655
20372 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
20373 single const.
20374
20375 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
20376
20377 PR target/85733
20378 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
20379
20380 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
20381
20382 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
20383 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
20384 (ix86_handle_option): Handle -mwaitpkg.
20385 * config.gcc: New header.
20386 * config/i386/cpuid.h (bit_WAITPKG): New bit.
20387 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
20388 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
20389 function type.
20390 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20391 OPTION_MASK_ISA_WAITPKG.
20392 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
20393 (ix86_option_override_internal): Add PTA_WAITPKG.
20394 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
20395 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
20396 IX86_BUILTIN_TPAUSE.
20397 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
20398 __builtin_ia32_umwait and __builtin_ia32_tpause.
20399 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
20400 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
20401 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
20402 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
20403 UNSPECV_TPAUSE): New.
20404 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
20405 * config/i386/i386.opt: Add -mwaitpkg.
20406 * config/i386/waitpkgintrin.h: New file.
20407 * config/i386/x86intrin.h: New header.
20408 * doc/invoke.texi: Add -mwaitpkg.
20409
20410 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
20411
20412 PR target/85606
20413 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
20414 equivalent.
20415 (cortex-m0): Use armv6s-m isa.
20416 (cortex-m0plus): Likewise.
20417 (cortex-m1): Likewise.
20418 (cortex-m0.small-multiply): Likewise.
20419 (cortex-m0plus.small-multiply): Likewise.
20420 (cortex-m1.small-multiply): Likewise.
20421
20422 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
20423 Jakub Jelinek <jakub@redhat.com>
20424
20425 PR tree-optimization/85692
20426 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
20427 source permute as well.
20428
20429 2018-05-11 Martin Liska <mliska@suse.cz>
20430
20431 PR sanitizer/85556
20432 * doc/extend.texi: Document LLVM style format for no_sanitize
20433 attribute.
20434
20435 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20436
20437 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
20438 mode_supports_vsx_dform_quad to mode_supports_dq_form.
20439 (mode_supports_vsx_dform_quad): Likewise.
20440 (mode_supports_vmx_dform): Move these functions to be next to the
20441 other mode_supports functions.
20442 (mode_supports_dq_form): Likewise.
20443 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
20444 mode_supports_dq_form.
20445 (reg_offset_addressing_ok_p): Likewise.
20446 (offsettable_ok_by_alignment): Likewise.
20447 (rs6000_legitimate_offset_address_p): Likewise.
20448 (legitimate_lo_sum_address_p): Likewise.
20449 (rs6000_legitimize_address): Likewise.
20450 (rs6000_legitimize_reload_address): Likewise.
20451 (rs6000_secondary_reload_inner): Likewise.
20452 (rs6000_preferred_reload_class): Likewise.
20453 (rs6000_output_move_128bit): Likewise.
20454
20455 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20456
20457 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
20458 Generate SImode target register for null target.
20459 <case IX86_BUILTIN_XGETBV>: Ditto.
20460 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
20461 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
20462
20463 2018-05-10 Carl Love <cel@us.ibm.com>
20464
20465 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20466 dcbtt and dcbtstt if operands[2] is 0.
20467
20468 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20469
20470 PR target/85693
20471 * config/i386/sse.md (usadv64qi): New expander.
20472
20473 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
20474
20475 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
20476 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
20477 -maltivec=be support.
20478 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
20479 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
20480 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
20481 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
20482 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
20483 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
20484 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
20485 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
20486 altivec_vsumsws): Adjust.
20487 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
20488 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
20489 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
20490 support.
20491 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
20492 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
20493 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
20494 (altivec_lve<VI_char>x): Delete expand.
20495 (*altivec_lve<VI_char>x_internal): Rename to...
20496 (altivec_lve<VI_char>x): ... this.
20497 (altivec_lvxl_<mode>): Delete expand.
20498 (*altivec_lvxl_<mode>_internal): Rename to ...
20499 (altivec_lvxl_<mode>): ... this.
20500 (altivec_stvxl_<mode>): Delete expand.
20501 (*altivec_stvxl_<mode>_internal): Rename to ...
20502 (altivec_stvxl_<mode>): ... this.
20503 (altivec_stve<VI_char>x): Delete expand.
20504 (*altivec_stve<VI_char>x_internal): Rename to ...
20505 (altivec_stve<VI_char>x): ... this.
20506 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
20507 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
20508 reduc_plus_scal_<mode>): Adjust.
20509 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
20510 comment.
20511 (rs6000_cpu_cpp_builtins): Adjust.
20512 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
20513 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
20514 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
20515 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
20516 -maltivec=be support.
20517 (rs6000_split_vec_extract_var): Adjust.
20518 (rs6000_split_v4si_init): Adjust.
20519 (swap_selector_for_mode): Delete.
20520 (altivec_expand_lvx_be, altivec_expand_stvx_be,
20521 altivec_expand_stvex_be): Delete.
20522 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
20523 -maltivec=be support.
20524 (rs6000_gimple_fold_builtin): Ditto.
20525 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
20526 Adjust.
20527 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
20528 (TARGET_DIRECT_MOVE_64BIT): Adjust.
20529 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
20530 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
20531 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
20532 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
20533 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
20534 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
20535 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
20536 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
20537 anonymous split): Adjust.
20538 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
20539 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
20540
20541 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
20542
20543 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
20544 when --with-gxx-include-dir is also specified.
20545 * configure: Regenerate.
20546
20547 2018-05-09 Jim Wilson <jimw@sifive.com>
20548
20549 PR target/84797
20550 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
20551 * config/riscv/t-withmultilib: New.
20552 * config/riscv/withmultilib.h: New.
20553 * doc/install.texi: Document RISC-V --with-multilib-list support.
20554
20555 2018-05-09 Richard Biener <rguenther@suse.de>
20556
20557 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
20558 vector.
20559 (vect_bb_vectorization_profitable_p): Adjust. Compute
20560 actual scalar cost using the cost vector and the add_stmt_cost
20561 machinery.
20562
20563 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20564
20565 PR rtl-optimization/85645
20566 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
20567 in the REG_CFA_REGISTER note for LR, don't leave it empty.
20568
20569 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20570
20571 PR rtl-optimization/85645
20572 * shrink-wrap.c (spread_components): Return a boolean saying if
20573 anything was changed.
20574 (try_shrink_wrapping_separate): Iterate spread_components until
20575 nothing changes anymore.
20576
20577 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20578
20579 PR rtl-optimization/85645
20580 * regrename.c (build_def_use): Also kill the chains that include the
20581 destination of a REG_CFA_REGISTER note.
20582
20583 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20584
20585 PR rtl-optimization/85645
20586 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
20587 insn that has a REG_CFA_REGISTER note.
20588
20589 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
20590
20591 * cfgexpand.c (expand_clobber): New function.
20592 (expand_gimple_stmt_1): Use it.
20593 * tree-vect-stmts.c (vect_clobber_variable): New function,
20594 split out from...
20595 (vectorizable_simd_clone_call): ...here.
20596 (vectorizable_store): Emit a clobber either side of an
20597 IFN_STORE_LANES sequence.
20598 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
20599
20600 2018-05-09 Tom de Vries <tom@codesourcery.com>
20601
20602 PR target/85626
20603 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
20604 (define_insn "trap_if_false"): Add exit after trap.
20605
20606 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
20607
20608 PR rtl-optimization/85638
20609 * bb-reorder.c: Include common/common-target.h.
20610 (create_forwarder_block): New function extracted from...
20611 (fix_up_crossing_landing_pad): ...here. Rename into...
20612 (dw2_fix_up_crossing_landing_pad): ...this.
20613 (sjlj_fix_up_crossing_landing_pad): New function.
20614 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
20615 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
20616 from both partitions and exit the loop after one iteration.
20617
20618 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20619
20620 Revert:
20621 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20622 subsection.
20623 (Basic PowerPC Built-in Functions): The new name of the
20624 subsection previously known as "PowerPC Built-in Functions".
20625 (Basic PowerPC Built-in Functions Available on all Configurations):
20626 New subsubsection.
20627 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20628 subsubsection.
20629 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20630 subsubsection.
20631 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20632 subsubsection.
20633 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20634 subsubsection.
20635
20636 2018-05-08 Jim Wilson <jimw@sifive.com>
20637
20638 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
20639 (LD_EMUL_SUFFIX): New.
20640 (LINK_SPEC): Use it.
20641
20642 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20643
20644 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20645 subsection.
20646 (Basic PowerPC Built-in Functions): The new name of the
20647 subsection previously known as "PowerPC Built-in Functions".
20648 (Basic PowerPC Built-in Functions Available on all Configurations):
20649 New subsubsection.
20650 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20651 subsubsection.
20652 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20653 subsubsection.
20654 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20655 subsubsection.
20656 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20657 subsubsection.
20658
20659 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20660
20661 PR target/85683
20662 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
20663 after cmpelim optimization.
20664
20665 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
20666
20667 * config.gcc: Support "goldmont".
20668 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
20669 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20670 PROCESSOR_GOLDMONT.
20671 * config/i386/i386.c (m_GOLDMONT): Define.
20672 (processor_target_table): Add "goldmont".
20673 (PTA_GOLDMONT): Define.
20674 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
20675 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
20676 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
20677 (fold_builtin_cpu): Add "goldmont".
20678 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
20679 (ix86_option_override_internal): Add "goldmont".
20680 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
20681 (processor_type): Add PROCESSOR_GOLDMONT.
20682 * config/i386/i386.md: Add CPU "glm".
20683 * config/i386/glm.md: New file.
20684 * config/i386/x86-tune.def: Add m_GOLDMONT.
20685 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
20686
20687 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20688
20689 PR target/85572
20690 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
20691 E_V4DImode.
20692 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20693 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
20694 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
20695
20696 PR target/85317
20697 * config/i386/i386.c (ix86_fold_builtin): Handle
20698 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20699
20700 PR target/85480
20701 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20702 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20703
20704 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
20705
20706 PR target/85658
20707 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20708 (check_arch): Likewise.
20709 (check_fpu): Return the result rather than printing it.
20710 (end arch): Fix operator precedence.
20711 (end cpu): Likewise.
20712 (END): Print the result from check_fpu.
20713
20714 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20715 Alan Hayward <alan.hayward@arm.com>
20716 David Sherwood <david.sherwood@arm.com>
20717
20718 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20719 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20720 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20721 (*fcmuo<mode>_and): New patterns.
20722
20723 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20724
20725 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20726 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20727 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20728 (cmp_op, sve_imm_con): New code attributes.
20729 (SVE_COND_INT_CMP, imm_con): Delete.
20730 (cmp_op): Remove above unspecs from int attribute.
20731 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20732 to...
20733 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
20734 comparison-specific unspecs.
20735 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20736 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20737 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20738 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20739 (*vec_fcm<cmp_op><mode>): Rename to...
20740 (*fcm<cmp_op><mode>): ...this and adjust likewise.
20741 (*vec_fcmuo<mode>): Rename to...
20742 (*fcmuo<mode>): ...this and adjust likewise.
20743 (*pred_fcm<cmp_op><mode>): New pattern.
20744 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20745 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20746 functions.
20747 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20748 and UNORDERED.
20749 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20750 (aarch64_emit_sve_predicated_cond): New function.
20751 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20752 (aarch64_emit_unspec_cond_or): Replace with...
20753 (aarch64_emit_sve_or_conds): ...this new function. Use
20754 aarch64_emit_sve_ptrue_op for the individual comparisons and
20755 aarch64_emit_binop to OR them together.
20756 (aarch64_emit_inverted_unspec_cond): Replace with...
20757 (aarch64_emit_sve_inverted_cond): ...this new function. Use
20758 aarch64_emit_sve_ptrue_op for the comparison and
20759 aarch64_emit_unop to invert the result.
20760 (aarch64_expand_sve_vec_cmp_float): Update after the above
20761 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
20762
20763 2018-05-07 Nathan Sidwell <nathan@acm.org>
20764
20765 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
20766 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
20767 (Backwards Compatibility): Likewise.
20768
20769 2018-05-07 Luis Machado <luis.machado@linaro.org>
20770
20771 PR bootstrap/85681
20772 Revert:
20773 2018-05-07 Luis Machado <luis.machado@linaro.org>
20774
20775 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20776 <prefetch_dynamic_strides>: New const bool field.
20777 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20778 prefetch_dynamic_strides.
20779 (exynosm1_prefetch_tune): Likewise.
20780 (thunderxt88_prefetch_tune): Likewise.
20781 (thunderx_prefetch_tune): Likewise.
20782 (thunderx2t99_prefetch_tune): Likewise.
20783 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20784 to false.
20785 (aarch64_override_options_internal): Update to set
20786 PARAM_PREFETCH_DYNAMIC_STRIDES.
20787 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20788 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20789 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20790 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20791 prefetch-dynamic-strides setting.
20792
20793 2018-05-07 Luis Machado <luis.machado@linaro.org>
20794
20795 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20796 <minimum_stride>: New const int field.
20797 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20798 minimum_stride field.
20799 (exynosm1_prefetch_tune): Likewise.
20800 (thunderxt88_prefetch_tune): Likewise.
20801 (thunderx_prefetch_tune): Likewise.
20802 (thunderx2t99_prefetch_tune): Likewise.
20803 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20804 (aarch64_override_options_internal): Update to set
20805 PARAM_PREFETCH_MINIMUM_STRIDE.
20806 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20807 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20808 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20809 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20810 stride is constant and is below the minimum stride threshold.
20811
20812 2018-05-07 Luis Machado <luis.machado@linaro.org>
20813
20814 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
20815 to 512.
20816
20817 2018-05-07 Luis Machado <luis.machado@linaro.org>
20818
20819 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20820 <prefetch_dynamic_strides>: New const bool field.
20821 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20822 prefetch_dynamic_strides.
20823 (exynosm1_prefetch_tune): Likewise.
20824 (thunderxt88_prefetch_tune): Likewise.
20825 (thunderx_prefetch_tune): Likewise.
20826 (thunderx2t99_prefetch_tune): Likewise.
20827 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20828 to false.
20829 (aarch64_override_options_internal): Update to set
20830 PARAM_PREFETCH_DYNAMIC_STRIDES.
20831 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20832 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20833 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20834 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20835 prefetch-dynamic-strides setting.
20836
20837 2018-05-07 Luis Machado <luis.machado@linaro.org>
20838
20839 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20840 <minimum_stride>: New const int field.
20841 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20842 minimum_stride field.
20843 (exynosm1_prefetch_tune): Likewise.
20844 (thunderxt88_prefetch_tune): Likewise.
20845 (thunderx_prefetch_tune): Likewise.
20846 (thunderx2t99_prefetch_tune): Likewise.
20847 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20848 (aarch64_override_options_internal): Update to set
20849 PARAM_PREFETCH_MINIMUM_STRIDE.
20850 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20851 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20852 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20853 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20854 stride is constant and is below the minimum stride threshold.
20855
20856 2018-05-06 Jakub Jelinek <jakub@redhat.com>
20857
20858 PR c++/85659
20859 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20860 the type is addressable. Don't force op into register if it has
20861 BLKmode.
20862
20863 2018-05-05 Roland McGrath <mcgrathr@google.com>
20864
20865 PR other/77609
20866 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20867 any section for which we don't know a specific type it should have,
20868 regardless of name. Previously this was done only for the exact
20869 names ".init_array", ".fini_array", and ".preinit_array".
20870 (default_elf_asm_named_section): Add comment about
20871 relationship with default_section_type_flags and SECTION_NOTYPE.
20872 (get_section): Don't consider it a type conflict if one side has
20873 SECTION_NOTYPE and the other doesn't, as long as neither has the
20874 SECTION_BSS et al used in the default_section_type_flags logic.
20875
20876 2018-05-05 Tom de Vries <tom@codesourcery.com>
20877
20878 PR target/85653
20879 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20880 (workaround_barsyncs): New function.
20881 (nvptx_reorg): Use workaround_barsyncs.
20882 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20883 (define_expand "nvptx_membar_cta"): New define_expand.
20884 (define_insn "*nvptx_membar_cta"): New insn.
20885
20886 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
20887
20888 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20889 To improve optimization opportunities.
20890 * builtin-types.def: The new needed builtin types for the above.
20891
20892 2018-05-04 Richard Biener <rguenther@suse.de>
20893
20894 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20895 * gimple-ssa-store-merging.c
20896 (imm_store_chain_info::output_merged_store): Remove redundant create,
20897 release split_store vector contents on failure.
20898 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20899 scalar stmt vector on cache hit.
20900
20901 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
20902
20903 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20904 Xilinx FP support.
20905 * config.gcc (powerpc-xilinx-eabi*): Remove.
20906 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20907 support.
20908 (fusion_addis_mem_combo_load): Ditto.
20909 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20910 FP support.
20911 (rs6000_cpu_cpp_builtins): Ditto.
20912 * config/rs6000/rs6000-linux.c
20913 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20914 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20915 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20916 support.
20917 (rs6000_setup_reg_addr_masks): Ditto.
20918 (rs6000_init_hard_regno_mode_ok): Ditto.
20919 (rs6000_option_override_internal): Ditto.
20920 (legitimate_lo_sum_address_p): Ditto.
20921 (rs6000_legitimize_address): Ditto.
20922 (rs6000_legitimize_reload_address): Ditto.
20923 (rs6000_legitimate_address_p): Ditto.
20924 (abi_v4_pass_in_fpr): Ditto.
20925 (setup_incoming_varargs): Ditto.
20926 (rs6000_gimplify_va_arg): Ditto.
20927 (rs6000_split_multireg_move): Ditto.
20928 (rs6000_savres_strategy): Ditto.
20929 (rs6000_emit_prologue_components): Ditto.
20930 (rs6000_emit_epilogue_components): Ditto.
20931 (rs6000_emit_prologue): Ditto.
20932 (rs6000_emit_epilogue): Ditto.
20933 (rs6000_elf_file_end): Ditto.
20934 (rs6000_function_value): Ditto.
20935 (rs6000_libcall_value): Ditto.
20936 * config/rs6000/rs6000.h: Ditto.
20937 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20938 (TARGET_MINMAX): ... this. New.
20939 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20940 * config/rs6000/rs6000.md: Remove Xilinx FP support.
20941 (*movsi_internal1_single): Delete.
20942 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20943 mfpu=, mxilinx-fpu): Delete.
20944 * config/rs6000/singlefp.h: Delete.
20945 * config/rs6000/sysv4.h: Remove Xilinx FP support.
20946 * config/rs6000/t-rs6000: Ditto.
20947 * config/rs6000/t-xilinx: Delete.
20948 * config/rs6000/titan.md: Adjust for fp_type removal.
20949 * config/rs6000/vsx.md: Remove Xilinx FP support.
20950 (VStype_simple): Delete.
20951 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20952 * config/rs6000/xfpu.h: Delete.
20953 * config/rs6000/xfpu.md: Delete.
20954 * config/rs6000/xilinx.h: Delete.
20955 * config/rs6000/xilinx.opt: Delete.
20956 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20957 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20958
20959 2018-05-04 Tom de Vries <tom@codesourcery.com>
20960
20961 PR libgomp/85639
20962 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20963 if ignore == 0.
20964
20965 2018-05-04 Richard Biener <rguenther@suse.de>
20966
20967 PR middle-end/85627
20968 * tree-complex.c (update_complex_assignment): We are always in SSA form.
20969 (expand_complex_div_wide): Likewise.
20970 (expand_complex_operations_1): Likewise.
20971 (expand_complex_libcall): Preserve EH info of the original stmt.
20972 (tree_lower_complex): Handle removed blocks.
20973 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20974 on complex multiplication and division libcall builtins.
20975
20976 2018-05-04 Richard Biener <rguenther@suse.de>
20977
20978 PR middle-end/85574
20979 * fold-const.c (negate_expr_p): Restrict negation of operand
20980 zero of a division to when we know that can happen without
20981 overflow.
20982 (fold_negate_expr_1): Likewise.
20983
20984 2018-05-04 Jakub Jelinek <jakub@redhat.com>
20985
20986 PR libstdc++/85466
20987 * real.h (real_nextafter): Declare.
20988 * real.c (real_nextafter): New function.
20989 * fold-const-call.c (fold_const_nextafter): New function.
20990 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20991 CASE_CFN_NEXTTOWARD.
20992 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20993 even when arg1_mode is different from arg0_mode.
20994
20995 2018-05-03 Nathan Sidwell <nathan@acm.org>
20996
20997 * doc/extend.texi (Deprecated Features): Remove
20998 -ffriend-injection.
20999 (Backwards Compatibility): Likewise.
21000 * doc/invoke.texi (C++ Language Options): Likewise.
21001 (C++ Dialect Options): Likewise.
21002
21003 2018-05-03 Jakub Jelinek <jakub@redhat.com>
21004
21005 PR target/85530
21006 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
21007 _mm512_mask_mullox_epi64): New intrinsics.
21008
21009 2018-05-03 Tom de Vries <tom@codesourcery.com>
21010
21011 PR testsuite/85106
21012 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21013 dump files): Add offload-tree.
21014
21015 2018-05-03 Richard Biener <rguenther@suse.de>
21016
21017 PR tree-optimization/85615
21018 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
21019 to loops not nested in BBs loop father to avoid creating multi-entry
21020 loops.
21021
21022 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21023
21024 PR tree-optimization/70291
21025 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
21026 arguments. Change return type to tree. Emit libcall as a new
21027 statement rather than replacing existing one when inplace_p is true.
21028 (expand_complex_multiplication_components): New function.
21029 (expand_complex_multiplication): Expand floating-point complex
21030 multiplication using the above.
21031 (expand_complex_division): Rename inner_type parameter to type.
21032 Update expand_complex_libcall call-site.
21033 (expand_complex_operations_1): Update expand_complex_multiplication
21034 and expand_complex_division call-sites.
21035
21036 2018-05-02 Jakub Jelinek <jakub@redhat.com>
21037
21038 PR target/85582
21039 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21040 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21041 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
21042 the highest significant bit of the shift count mask is clear. In
21043 check whether and[sq]i3 is needed verify that all significant bits
21044 of the shift count other than the highest are set.
21045
21046 2018-05-02 Tom de Vries <tom@codesourcery.com>
21047
21048 PR libgomp/82428
21049 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
21050 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
21051 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
21052 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
21053 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
21054 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
21055 __builtin_goacc_parlevel_size.
21056
21057 2018-05-02 Richard Biener <rguenther@suse.de>
21058
21059 PR tree-optimization/85597
21060 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
21061 do not use split vect_get_vec_defs call but call vect_get_slp_defs
21062 directly.
21063
21064 2018-05-02 Tom de Vries <tom@codesourcery.com>
21065
21066 PR testsuite/85106
21067 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21068 dump files): Add ltrans-tree.
21069
21070 2018-05-02 Tom de Vries <tom@codesourcery.com>
21071
21072 PR testsuite/85106
21073 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21074 dump files): Add wpa-ipa.
21075
21076 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
21077
21078 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
21079 powerpc*-*-linux*paired* target.
21080 * config/rs6000/750cl.h: Delete.
21081 * config/rs6000/paired.h: Delete.
21082 * config/rs6000/paired.md: Delete.
21083 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
21084 float support.
21085 * config/rs6000/rs6000-builtin.def: Remove paired float support.
21086 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
21087 comment. Remove paired float support.
21088 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
21089 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
21090 VECTOR_PAIRED.
21091 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
21092 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
21093 declarations.
21094 * config/rs6000/rs6000.c: Remove paired float support.
21095 (paired_expand_vector_init, paired_expand_vector_move,
21096 paired_emit_vector_compare, paired_emit_vector_cond_expr,
21097 (paired_expand_lv_builtin, paired_expand_stv_builtin,
21098 paired_expand_builtin, paired_expand_predicate_builtin,
21099 paired_init_builtins): Delete.
21100 * config/rs6000/rs6000.h: Remove paired float support.
21101 * config/rs6000/rs6000.md: Remove paired float support.
21102 (move_from_CR_ov_bit): Delete.
21103 * config/rs6000/rs6000.opt (mpaired): Delete.
21104 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
21105 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
21106
21107 2018-05-02 Richard Biener <rguenther@suse.de>
21108
21109 PR middle-end/85567
21110 * gimplify.c (gimplify_save_expr): When in SSA form allow
21111 SAVE_EXPRs to compute to SSA vars.
21112
21113 2018-05-02 Jakub Jelinek <jakub@redhat.com>
21114
21115 PR target/85582
21116 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21117 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21118 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
21119 clobber operands[2], instead use a new pseudo. Formatting fixes.
21120
21121 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
21122
21123 PR tree-optimization/85586
21124 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
21125 exit early for statements in the same group if the accesses are
21126 not strided.
21127
21128 2018-05-02 Tom de Vries <tom@codesourcery.com>
21129
21130 PR lto/85451
21131 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
21132 error message.
21133
21134 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
21135
21136 PR tree-optimization/85143
21137 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
21138
21139 2018-05-01 Tom de Vries <tom@codesourcery.com>
21140
21141 PR lto/85451
21142 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
21143 not found" error message.
21144
21145 2018-05-01 Tom de Vries <tom@codesourcery.com>
21146
21147 PR other/83786
21148 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
21149 * vec.c (test_ordered_remove_if): New function.
21150 (vec_c_tests): Call test_ordered_remove_if.
21151 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
21152 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
21153 * tree-vect-patterns.c (vect_pattern_recog_1): Use
21154 VEC_ORDERED_REMOVE_IF.
21155
21156 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21157
21158 PR tree-optimization/82665
21159 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
21160 pointer subtraction where arguments come from a memchr call.
21161
21162 2018-05-01 Jakub Jelinek <jakub@redhat.com>
21163
21164 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
21165 --push-state --as-needed and --pop-state instead of --as-needed and
21166 --no-as-needed if ld supports it.
21167 * configure: Regenerated.
21168
21169 PR web/85578
21170 * doc/install.texi2html: Replace _002d with - and _002a with * in
21171 generated html files using sed.
21172
21173 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21174
21175 PR c++/85523
21176 * gcc-rich-location.c (blank_line_before_p): New function.
21177 (use_new_line): New function.
21178 (gcc_rich_location::add_fixit_insert_formatted): New function.
21179 * gcc-rich-location.h
21180 (gcc_rich_location::add_fixit_insert_formatted): New function.
21181
21182 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21183
21184 * selftest.c (assert_streq): Rename "expected" and "actual" to
21185 "val1" and "val2". Extend NULL-handling to cover both inputs
21186 symmetrically, while still requiring both to be non-NULL for a pass.
21187 * selftest.h (assert_streq): Rename "expected" and "actual" to
21188 "val1" and "val2".
21189 (ASSERT_EQ): Likewise.
21190 (ASSERT_EQ_AT): Likewise.
21191 (ASSERT_KNOWN_EQ): Likewise.
21192 (ASSERT_KNOWN_EQ_AT): Likewise.
21193 (ASSERT_NE): Likewise.
21194 (ASSERT_MAYBE_NE): Likewise.
21195 (ASSERT_MAYBE_NE_AT): Likewise.
21196 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
21197 the assertion to pass.
21198 (ASSERT_STREQ_AT): Likewise.
21199
21200 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
21201
21202 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
21203 interaction with -pie.
21204
21205 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21206
21207 * selftest.h: Fix alphabetization of per-source-file selftest
21208 declarations.
21209
21210 2018-04-30 Jason Merrill <jason@redhat.com>
21211
21212 PR c++/61982 - dead stores to destroyed objects.
21213 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
21214 of clobber.
21215
21216 2018-04-30 Jason Merrill <jason@redhat.com>
21217
21218 * tree.c (build_clobber): New.
21219 * tree.h: Declare it.
21220 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
21221
21222 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21223
21224 * diagnostic-show-locus.c (layout::layout): Update for
21225 location_get_source_line returning a char_span.
21226 (struct char_span): Move to input.h.
21227 (struct correction): Update for fields in char_span becoming
21228 private.
21229 (struct source_line): Update for location_get_source_line
21230 returning a char_span.
21231 (layout::print_line): Likewise.
21232 * edit-context.c (edited_file::print_content): Likewise.
21233 (edited_file::print_diff_hunk): Likewise.
21234 (edited_file::print_run_of_changed_lines): Likewise.
21235 (edited_file::get_num_lines): Likewise.
21236 (edited_line::edited_line): Likewise.
21237 * final.c (asm_show_source): Likewise.
21238 * input.c (location_get_source_line): Convert return type
21239 from const char * to char_span, losing the final "line_len"
21240 param.
21241 (dump_location_info): Update for the above.
21242 (get_substring_ranges_for_loc): Likewise. Use a char_span
21243 when handling the literal within the line.
21244 (test_reading_source_line): Update for location_get_source_line
21245 returning a char_span.
21246 * input.h (class char_span): Move here from
21247 diagnostic-show-locus.c, converting from a struct to a class.
21248 Make data members private.
21249 (char_span::operator bool): New.
21250 (char_span::length): New.
21251 (char_span::get_buffer): New.
21252 (char_span::operator[]): New.
21253 (char_span::subspan): Make const.
21254 (char_span::xstrdup): New.
21255 (location_get_source_line): Convert return type from const char *
21256 to char_span, losing the final "line_size" param.
21257
21258 2018-04-30 Jan Hubicka <jh@suse.cz>
21259
21260 * lto-wrapper.c (ltrans_priorities): New static var.
21261 (cmp_priority): New.
21262 (run_gcc): Read priorities and if doing parallel build order
21263 the Makefile by them.
21264
21265 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21266
21267 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
21268
21269 2018-04-30 Richard Biener <rguenther@suse.de>
21270
21271 * tree-cfg.c (verify_address): Remove base argument, add
21272 flag whether to check TREE_ADDRESSABLE and do that.
21273 (verify_expr): Remove.
21274 (verify_types_in_gimple_reference): Add pieces from verify_expr.
21275 (verify_gimple_assign_single): Likewise.
21276 (verify_gimple_switch): Likewise.
21277 (verify_expr_location_1): Dereference tp once. Add (disabled)
21278 piece from verify_expr.
21279 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
21280
21281 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
21282
21283 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
21284
21285 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
21286
21287 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
21288 (small_data_pattern): Likewise.
21289 (arc_rewrite_small_data): Likewise.
21290 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
21291 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
21292 (get_symbol_alignment): New function.
21293 (legitimate_small_data_address_p): Likewise.
21294 (legitimate_scaled_address): Update, call
21295 legitimate_small_data_address_p.
21296 (output_sdata): New static variable.
21297 (arc_print_operand): Update how we handle small data operands.
21298 (arc_print_operand_address): Likewise.
21299 (arc_legitimate_address_p): Update, use
21300 legitimate_small_data_address_p.
21301 (arc_rewrite_small_data_p): Remove.
21302 (arc_rewrite_small_data_1): Likewise.
21303 (arc_rewrite_small_data): Likewise.
21304 (small_data_pattern): Likewise.
21305 (compact_sda_memory_operand): Update to use
21306 legitimate_small_data_address_p and get_symbol_alignment.
21307 (prepare_move_operands): Don't rewite sdata pattern.
21308 (prepare_extend_operands): Remove.
21309 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
21310 pattern.
21311 (zero_extendqisi2): Likewise.
21312 (zero_extendhisi2): Likewise.
21313 (extendqihi2): Likewise.
21314 (extendqisi2): Likewise.
21315 (extendhisi2): Likewise.
21316 (addsi3): Likewise.
21317 (subsi3): Likewise.
21318 (andsi3): Likewise.
21319 * config/arc/constraints.md (Usd): Change it to memory constraint.
21320
21321 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
21322
21323 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
21324 as source of std instructions.
21325 * config/arc/arc.md (movsi_insn): Update pattern predicate to
21326 allow 6-bit constants as source for store instructions.
21327 (movdi_insn): Update instruction pattern to allow 6-bit constants
21328 as source for store instructions.
21329
21330 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
21331
21332 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
21333
21334 2018-04-30 Nathan Sidwell <nathan@acm.org>
21335 Sandra Loosemore <sandra@codesourcery.com>
21336
21337 * dumpfile.c (dump_open): Allow '-' for stdout.
21338 * doc/invoke.texi (Developer Options): Document dump filename
21339 determination early. Document stdin/stdout selection.
21340
21341 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
21342
21343 Microblaze Target: PIC data text relative
21344
21345 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
21346 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
21347 Add declaration.
21348 * config/microblaze/microblaze.h (microblaze_constant_address_p):
21349 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
21350 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
21351 New addressing mode for data-text relative position indepenedent code.
21352 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
21353 'ADDRESS_SYMBOLIC_TXT_REL'.
21354 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
21355 (microblaze_legitimate_pic_operand): Exclude function calls from
21356 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
21357 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
21358 addresses cases.
21359 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21360 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21361 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
21362 for 'address + offset'.
21363 (microblaze_expand_prologue): Add new function prologue call for
21364 'r20' assignation.
21365 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
21366 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
21367 table in case of TARGET_PIC_DATA_TEXT_REL.
21368 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
21369 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
21370 Add new macros 'UNSPEC_TEXT',
21371 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
21372 + exclude function calls from 'UNSPEC_PLT' in case of data text
21373 relative mode.
21374 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21375 new target hook for generating address diff vector tables in case of
21376 flag_pic.
21377 * doc/tm.texi : Regenerate.
21378 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
21379 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
21380 of addr diff vector generation.
21381 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21382 target hook definition.
21383 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
21384 Add default function for generate_pic_addr_diff_vec -> flag_pic.
21385 * doc/invoke.texi (Add new pic option): Add new microblaze pic
21386 option for data text relative.
21387
21388 2018-04-30 Richard Biener <rguenther@suse.de>
21389
21390 * tree-chrec.h (evolution_function_is_constant_p): Remove
21391 redundant check.
21392 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
21393
21394 2018-04-30 Richard Biener <rguenther@suse.de>
21395
21396 PR bootstrap/85571
21397 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
21398
21399 2018-04-30 Richard Biener <rguenther@suse.de>
21400
21401 PR tree-optimization/28364
21402 PR tree-optimization/85275
21403 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
21404 copying first exit test.
21405
21406 2018-04-28 Mark Wielaard <mark@klomp.org>
21407
21408 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
21409 dwarf_version >= 5.
21410 (dwarf_AT): Handle DW_AT_addr_base.
21411 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
21412
21413 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
21414
21415 PR target/84431
21416 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
21417 (*ashl<dwi>3_doubleword_mask_1): Ditto.
21418 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
21419 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
21420
21421 2018-04-28 Richard Biener <rguenther@suse.de>
21422
21423 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
21424 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
21425 to reflect use. Only add interesting stmts.
21426
21427 2018-04-27 Martin Jambor <mjambor@suse.cz>
21428
21429 PR ipa/85549
21430 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
21431 the jump function allows for passing through aggregate values.
21432
21433 2018-04-27 David Malcolm <dmalcolm@redhat.com>
21434
21435 * input.h (in_system_header_at): Convert from macro to inline
21436 function.
21437 (from_macro_expansion_at): Likewise.
21438 (from_macro_definition_at): Likewise.
21439
21440 2018-04-27 Jeff Law <law@redhat.com>
21441
21442 * config.gcc: Mark tile* targets as deprecated/obsolete.
21443
21444 2018-04-27 Richard Biener <rguenther@suse.de>
21445
21446 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
21447 fix for ILP32.
21448
21449 2018-04-27 Richard Biener <rguenther@suse.de>
21450
21451 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
21452
21453 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
21454
21455 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
21456 with Yd constraint. Set "preferred_for_speed" attribute from
21457 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
21458 with Yd constraint.
21459 (*movdi_internal): Ditto.
21460 (movti_interunit splitters): Remove
21461 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
21462 (movdi_interunit splitters): Ditto.
21463 * config/i386/constraints.md (Ye): Remove.
21464 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
21465
21466 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21467
21468 PR target/85512
21469 * config/aarch64/constraints.md (Usg): Limit to 31.
21470 (Usj): Limit to 63.
21471
21472 2018-04-27 Jakub Jelinek <jakub@redhat.com>
21473
21474 PR tree-optimization/85529
21475 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
21476 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
21477 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
21478 zero extension or masking of the MSB bit.
21479 (optimize_range_tests): Add FIRST_BB argument, pass it through
21480 to optimize_range_tests_var_bound.
21481 (maybe_optimize_range_tests, reassociate_bb): Adjust
21482 optimize_range_tests callers.
21483
21484 2018-04-26 Richard Biener <rguenther@suse.de>
21485 Jakub Jelinek <jakub@redhat.com>
21486
21487 * cgraph.h (symbol_table): Just declare debug method here.
21488 * symtab.c (symbol_table::debug): Define.
21489
21490 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
21491
21492 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
21493
21494 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
21495
21496 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
21497 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
21498 (*movdi_internal): Substitute Yi and Yj constraint with x
21499 and Ym and Yn constraint with y constraint. Update "isa"
21500 attribute and set "preferred_for_speed" attribute from
21501 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
21502 (*movsi_internal): Ditto.
21503 (*movdf_internal): Ditto.
21504 (*movsf_internal): Ditto.
21505 (*zero_extendsidi2): Ditto.
21506 * config/i386/sse.md (vec_set<mode>_0): Ditto.
21507 (sse2_loadld): Ditto.
21508 (*vec_extract<ssevecmodelower>_0): Ditto.
21509 (*vec_extractv4si_0_zext_sse4): Ditto.
21510 (vec_concatv2di): Ditto.
21511 (*vec_dup<mode>): Ditto.
21512 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
21513 * config/i386/constraints.md (Yi): Remove.
21514 (Yj): Remove.
21515 (Ym): Remove.
21516 (Yn): Remove.
21517
21518 2018-04-26 Nathan Sidwell <nathan@acm.org>
21519
21520 * dumpfile.c (dump_open): New.
21521 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
21522 (dump_finish): Detect stdio/stderr by value not name.
21523
21524 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
21525
21526 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
21527
21528 2018-04-26 Tom de Vries <tom@codesourcery.com>
21529
21530 PR target/84952
21531 * config/nvptx/nvptx.c (verify_neutering_jumps)
21532 (verify_neutering_labels): New function
21533 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
21534
21535 2018-04-26 Tom de Vries <tom@codesourcery.com>
21536
21537 PR target/84025
21538 * config/nvptx/nvptx.c (needs_neutering_p): New function.
21539 (nvptx_single): Use needs_neutering_p to skip over insns that do not
21540 need neutering.
21541
21542 2018-04-26 Richard Biener <rguenther@suse.de>
21543 Tom de Vries <tom@codesourcery.com>
21544
21545 PR lto/85422
21546 * lto-streamer-out.c (output_function): Fixup loops if required to match
21547 discovery done in the reader.
21548
21549 2018-04-26 Richard Biener <rguenther@suse.de>
21550
21551 PR tree-optimization/85116
21552 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
21553 have a loop exit from the single latch predecessor. Remove
21554 case of header with just condition.
21555 (ch_base::copy_headers): Exclude infinite loops from any
21556 processing.
21557 (pass_ch::execute): Record exits.
21558
21559 2018-04-26 Richard Biener <rguenther@suse.de>
21560
21561 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
21562 prologue cost vector and pass it to vect_get_load_cost.
21563 (vect_get_peeling_costs_all_drs): Likewise.
21564 (vect_peeling_hash_get_lowest_cost): Likewise.
21565 (vect_enhance_data_refs_alignment): Likewise.
21566
21567 2018-04-26 Richard Biener <rguenther@suse.de>
21568
21569 PR middle-end/85450
21570 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
21571 checking of integer<->pointer conversions.
21572 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
21573 sign-/zero-extending pointer types.
21574 (expand_omp_for_static_chunk): Likewise.
21575
21576 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
21577 Jean Lee <xiaoyur347@gmail.com>
21578
21579 * config/mips/mips.c (mips_asan_shadow_offset): New function.
21580 (TARGET_ASAN_SHADOW_OFFSET): Define.
21581 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
21582 true for -fsanitize=address.
21583
21584 2018-04-25 Mark Wielaard <mark@klomp.org>
21585
21586 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
21587 shorter ones.
21588
21589 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21590
21591 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
21592 than "alu", remove explicit "memory" and "imm_disp" attributes.
21593 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
21594
21595 PR middle-end/85414
21596 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
21597 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
21598 gen_lowpart_no_emit.
21599
21600 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
21601
21602 PR target/85473
21603 * config/i386/i386.c (ix86_expand_builtin): Change memory
21604 operand to XI, extend p0 to Pmode.
21605 * config/i386/i386.md: Change unspec volatile and operand
21606 1 mode to XI, change operand 0 mode to P.
21607
21608 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21609
21610 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
21611 GET_MODE_MASK before any checking.
21612 (nds32_can_use_bset_p): Likewise.
21613 (nds32_can_use_btgl_p): Likewise.
21614
21615 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21616
21617 * config/nds32/nds32-doubleword.md: New define_split pattern for
21618 illegal register number.
21619
21620 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21621
21622 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
21623
21624 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21625
21626 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
21627
21628 2018-04-25 Richard Biener <rguenther@suse.de>
21629
21630 * lto-streamer.h (LTO_major_version): Bump to 8.
21631
21632 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21633
21634 * BASE-VER: Set to 9.0.0.
21635
21636 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
21637
21638 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
21639 in __abskf2 and __powikf2.
21640
21641 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21642
21643 PR target/85512
21644 * config/aarch64/constraints.md (Usg, Usj): New constraints.
21645 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
21646 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
21647 Use the above on operand 2. Reindent.
21648 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
21649
21650 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21651
21652 PR target/85485
21653 * common/config/i386/i386-common.c (ix86_handle_option): Don't
21654 handle OPT_mcet.
21655 * config/i386/i386.opt (mcet): Removed.
21656 * doc/install.texi: Remove -mcet documentation.
21657 * doc/invoke.texi: Likewise.
21658
21659 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21660
21661 PR target/85485
21662 * doc/install.texi: Remove -mcet from bootstrap-cet.
21663
21664 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21665
21666 PR target/85511
21667 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
21668 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
21669 if TARGET_64BIT.
21670
21671 PR target/85503
21672 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
21673 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
21674 containing a CONST_VECTOR.
21675
21676 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
21677
21678 * doc/install.texi: Update newlib dependency for nvptx.
21679
21680 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21681
21682 PR target/85508
21683 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
21684 instead of INTVAL when shifting x left.
21685
21686 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
21687
21688 PR tree-optimization/85478
21689 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
21690 vect_grouped_store_supported for single element vectors.
21691
21692 2018-04-24 Richard Biener <rguenther@suse.de>
21693
21694 PR target/85491
21695 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21696 load cost increase to the case of non-constant step.
21697
21698 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21699
21700 PR target/84828
21701 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21702 destination if any_malformed_asm.
21703
21704 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
21705
21706 PR middle-end/85496
21707 * expr.c (store_field): In the bitfield case, if the value comes from
21708 a function call and is returned in registers by means of a PARALLEL,
21709 do not change the mode of the temporary unless BLKmode and VOIDmode.
21710
21711 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
21712
21713 PR rtl-optimization/85423
21714 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21715 dependencies to debug insns when the previous insn is non-debug.
21716
21717 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21718
21719 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21720 enums into a single definition.
21721 (fls): Fix predicates and printing.
21722 (seti): Likewise.
21723
21724 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21725
21726 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21727 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21728 and short u6 immediate.
21729 (check_if_valid_sleep_operand): Remove.
21730 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21731
21732 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21733
21734 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21735 flag_always_save_lp condition.
21736 * config/nds32/nds32.opt (malways-save-lp): New option.
21737
21738 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21739
21740 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21741 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21742 * config/nds32/nds32.h
21743 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21744 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21745
21746 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21747
21748 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21749 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21750
21751 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21752 Chung-Ju Wu <jasonwucj@gmail.com>
21753
21754 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21755 Declare.
21756 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21757 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21758
21759 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21760
21761 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
21762
21763 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21764
21765 * config/nds32/nds32-protos.h (nds32_data_alignment,
21766 nds32_local_alignment): Declare.
21767 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
21768 nds32_local_alignment): New functions.
21769 (TARGET_CONSTANT_ALIGNMENT): Define.
21770 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
21771
21772 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21773
21774 * config/nds32/nds32.c
21775 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
21776 (TARGET_MODES_TIEABLE_P): Likewise.
21777
21778 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21779
21780 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
21781 level Ofast and Og.
21782
21783 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
21784 Chung-Ju Wu <jasonwucj@gmail.com>
21785
21786 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21787 for unaligned access.
21788 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21789 unaligned access.
21790 * config/nds32/nds32-intrinsic.md: Likewise.
21791 * config/nds32/nds32_intrinsic.h: Likewise.
21792 * config/nds32/nds32.h (nds32_builtins): Likewise.
21793 * config/nds32/nds32.opt (munaligned-access): New option.
21794 * config/nds32/nds32.c (nds32_asm_file_start): Display
21795 flag_unaligned_access status.
21796
21797 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21798
21799 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
21800 -mno-relax is present.
21801 * config/riscv/linux.h (LINK_SPEC): Ditto.
21802
21803 2018-04-20 Martin Sebor <msebor@redhat.com>
21804
21805 PR c/85365
21806 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
21807 for null pointers.
21808 (gimple_fold_builtin_stxcpy_chk): Same.
21809 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
21810
21811 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
21812
21813 PR target/85456
21814 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
21815 __powikf2 when long double is IEEE 128-bit.
21816
21817 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21818
21819 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
21820 step to make sure stack always aligned.
21821
21822 2018-04-20 Carl Love <cel@us.ibm.com>
21823
21824 PR target/83402
21825 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21826 size check for arg0.
21827
21828 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
21829 Tom de Vries <tom@codesourcery.com>
21830
21831 PR target/85445
21832 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21833 Emit insns for calls too.
21834 (nvptx_find_par): Always look for worker-level predecessor insn.
21835 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
21836 calls.
21837 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21838 (nvptx_process_pars): Propagate frames for calls.
21839
21840 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
21841
21842 PR target/85469
21843 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21844 Removed.
21845 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21846 (ix86_handle_option): Don't handle OPT_mibt.
21847 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21848 __SHSTK__.
21849 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21850 has_ibt and ibt.
21851 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21852 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21853 (ix86_target_macros): Define __CET__ with flag_cf_protection
21854 for -fcf-protection.
21855 * config/i386/i386.c (isa2_opts): Remove -mibt.
21856 * config/i386/i386.h (TARGET_IBT): Removed.
21857 (TARGET_IBT_P): Likewise.
21858 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21859 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21860 * config/i386/i386.opt (mcet): Update help message.
21861 (mshstk): Likewise.
21862 (mibt): Removed.
21863 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
21864 -mcet as an alias for -mshstk.
21865
21866 2018-04-20 Richard Biener <rguenther@suse.de>
21867
21868 PR middle-end/85475
21869 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21870 complexity by forcing a single use of the multiply operand.
21871
21872 2018-04-20 Martin Jambor <mjambor@suse.cz>
21873
21874 ipa/85449
21875 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21876 recursion dependency to only apply to non-clones.
21877
21878 2018-04-20 Martin Jambor <mjambor@suse.cz>
21879
21880 ipa/85447
21881 * ipa-cp.c (create_specialized_node): Check that clones of
21882 self-recursive edges exist during IPA-CP.
21883
21884 2018-04-19 Toon Moene <toon@moene.org>
21885
21886 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21887 by -O3.
21888
21889 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21890
21891 PR tree-optimization/85467
21892 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21893 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
21894 VECTOR_CST element to type.
21895
21896 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21897
21898 PR target/85397
21899 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21900 * config/i386/i386.md (builtin_setjmp_setup): Removed.
21901 (builtin_longjmp): Likewise.
21902 (save_stack_nonlocal): New pattern.
21903 (restore_stack_nonlocal): Likewise.
21904
21905 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21906
21907 PR target/85404
21908 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21909 Replace ASM_OUTPUT_LABEL with fprintf.
21910
21911 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21912
21913 PR target/85417
21914 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21915 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21916 * config/i386/i386-c.c (ix86_target_macros_internal): Also
21917 define __IBT__ and __SHSTK__ for -fcf-protection.
21918 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21919 TARGET_IBT.
21920 (ix86_trampoline_init): Likewise.
21921 (x86_output_mi_thunk): Likewise.
21922 (ix86_notrack_prefixed_insn_p): Likewise.
21923 (ix86_option_override_internal): Don't disallow -fcf-protection.
21924 * config/i386/i386.md (rdssp<mode>): Also enable for
21925 -fcf-protection.
21926 (incssp<mode>): Likewise.
21927 (nop_endbr): Likewise.
21928 * config/i386/i386.opt (mcet): Change help message to built-in
21929 functions only.
21930 (mibt): Likewise.
21931 (mshstk): Likewise.
21932 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21933 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
21934 enable CET built-in functions.
21935
21936 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
21937
21938 * common/config/i386/i386-common.c
21939 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21940 OPTION_MASK_ISA_MOVDIRI_UNSET,
21941 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21942 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21943 * config.gcc (movdirintrin.h): New header.
21944 * config/i386/cpuid.h (bit_MOVDIRI,
21945 bit_MOVDIR64B): New bits.
21946 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21947 and -mmvodir64b.
21948 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21949 (VOID, PVOID, PCVOID)): New function types.
21950 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21951 __builtin_ia32_directstoreu_u64,
21952 __builtin_ia32_movdir64b): New builtins.
21953 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21954 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21955 and -mmovdiri.
21956 (ix86_valid_target_attribute_inner_p): Ditto.
21957 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21958 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21959 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21960 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21961 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21962 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21963 (movdiri<mode>, movdir64b_<mode>): New.
21964 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21965 * config/i386/immintrin.h: Include movdirintrin.h.
21966 * config/i386/movdirintrin.h: New file.
21967 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21968
21969 2018-04-19 Richard Biener <rguenther@suse.de>
21970
21971 PR middle-end/85455
21972 * cfg.c (clear_bb_flags): When loop state says we have
21973 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21974
21975 2018-04-19 Richard Biener <rguenther@suse.de>
21976
21977 PR tree-optimization/84737
21978 * tree-vect-data-refs.c (vect_copy_ref_info): New function
21979 copying restrict info.
21980 (vect_setup_realignment): Use it.
21981 * tree-vectorizer.h (vect_copy_ref_info): Declare.
21982 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21983 the first DR to all generated stores.
21984 (vectorizable_load): Likewise for loads.
21985
21986 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21987
21988 PR tree-optimization/85446
21989 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21990 the integral and pointer types to have the same precision.
21991
21992 * doc/install.texi: Document --disable-cet being the default and
21993 --enable-cet=auto.
21994
21995 2018-04-18 Martin Liska <mliska@suse.cz>
21996
21997 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21998 style.
21999
22000 2018-04-18 Martin Liska <mliska@suse.cz>
22001
22002 Revert
22003 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22004
22005 PR ipa/83983
22006 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22007 arguments if they are comparable.
22008
22009 2018-04-18 Martin Liska <mliska@suse.cz>
22010
22011 Revert
22012 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
22013
22014 PR lto/84805
22015 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22016 incomplete types.
22017
22018 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
22019
22020 PR target/85388
22021 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
22022 ENDBR after calling __morestack.
22023
22024 2018-04-18 David Malcolm <dmalcolm@redhat.com>
22025
22026 PR jit/85384
22027 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
22028 by using gcc_base_ver to generate a gcc_driver_version, and use
22029 it when generating GCC_DRIVER_NAME.
22030 * configure: Regenerate.
22031
22032 2018-04-18 Jakub Jelinek <jakub@redhat.com>
22033
22034 PR target/81084
22035 * config.gcc: Obsolete powerpc*-*-*spe*.
22036
22037 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22038
22039 PR debug/84637
22040 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
22041 (stabstr_D): Change type of unum from unsigned int to
22042 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
22043 type.
22044
22045 2018-04-17 Jim Wilson <jimw@sifive.com>
22046
22047 PR 84856
22048 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
22049 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
22050 Set arg_pointer_offset after using pretend_args_size.
22051
22052 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22053
22054 PR rtl-optimization/85431
22055 * dse.c (record_store): Ignore zero width stores.
22056
22057 PR sanitizer/85230
22058 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
22059 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
22060 __builtin_stack_restore rather than after it.
22061 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
22062 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
22063 argument instead of virtual_dynamic_stack_rtx.
22064
22065 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
22066
22067 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
22068 New prototype.
22069 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
22070 Add note to error message to explain internal mapping of overloaded
22071 built-in function name to non-overloaded built-in function name.
22072 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
22073 function.
22074
22075 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
22076
22077 PR target/85424
22078 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
22079 where the inputs overlap with the output.
22080
22081 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22082
22083 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
22084 (=v, v) alternative and explicit "memory" attribute.
22085 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
22086 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22087 attributes.
22088 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
22089 "sselog1" type instead of "sselog".
22090 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
22091 "sselog". Remove explicit "memory" attribute.
22092 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
22093 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22094 attributes.
22095 (vec_extract_hi_v32hi): Merge all alternatives into one, use
22096 "sselog1" type instead of "sselog". Remove explicit "memory"
22097 attribute.
22098 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
22099 use "sselog1" type instead of "sselog". Remove explicit "memory"
22100 attribute.
22101 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
22102 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22103 attributes.
22104 (vec_extract_hi_v64qi): Merge all alternatives into one, use
22105 "sselog1" type instead of "sselog". Remove explicit "memory"
22106 attribute.
22107 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
22108 use "sselog1" type instead of "sselog". Remove explicit "memory"
22109 attribute.
22110
22111 PR target/85430
22112 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
22113
22114 PR middle-end/85414
22115 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
22116 on a SUBREG.
22117
22118 2018-04-17 Martin Jambor <mjambor@suse.cz>
22119
22120 PR ipa/85421
22121 * ipa-cp.c (create_specialized_node): Call
22122 expand_all_artificial_thunks if necessary.
22123
22124 2018-04-17 Martin Liska <mliska@suse.cz>
22125
22126 PR lto/85405
22127 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
22128 in message, remote space in between '_G' and '('.
22129
22130 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22131
22132 PR target/85281
22133 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
22134 avx512f_vmcmp<mode>3<round_saeonly_name>,
22135 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
22136 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
22137 avx512f_rndscale<mode><round_saeonly_name>,
22138 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
22139 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
22140 Use %<iptr>2 instead of %2 for -masm=intel.
22141 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
22142 avx512f_vcvttss2usi<round_saeonly_name>,
22143 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
22144 -masm=intel.
22145 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
22146 avx512f_vcvttsd2usi<round_saeonly_name>,
22147 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
22148 Use %q1 instead of %1 for -masm=intel.
22149 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
22150 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
22151 of %3 for -masm=intel.
22152 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
22153 -masm=intel.
22154 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
22155 -masm=intel.
22156 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
22157 -masm=intel.
22158 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
22159 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
22160 %g1.
22161 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
22162 -masm=intel.
22163 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
22164 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
22165 %g1 and one with %0 and %1.
22166 (avx512er_vmrcp28<mode><round_saeonly_name>,
22167 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
22168 %1 for -masm=intel.
22169 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
22170 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
22171 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
22172 of %0 and %{%4%} for -masm=intel.
22173 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
22174 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
22175 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
22176 order of %0 and %{%5%}%{z%} for -masm=intel.
22177
22178 2018-04-17 Jan Hubicka <jh@suse.cz>
22179
22180 PR lto/85405
22181 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
22182
22183 2018-04-17 Martin Liska <mliska@suse.cz>
22184
22185 PR ipa/85329
22186 * multiple_target.c (create_dispatcher_calls): Set apostrophes
22187 for target_clone error message. Make default implementation
22188 clone to be a local declaration.
22189 (separate_attrs): Add new argument and check for an empty
22190 string.
22191 (expand_target_clones): Handle it.
22192 (ipa_target_clone): Make redirection just for target_clones
22193 functions.
22194
22195 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
22196 Tom de Vries <tom@codesourcery.com>
22197
22198 PR middle-end/84955
22199 * omp-expand.c (expand_oacc_for): Add dummy false branch for
22200 tiled basic blocks without omp continue statements.
22201
22202 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
22203
22204 PR target/83660
22205 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
22206 vec_extract expression as having side effects to make sure it gets
22207 a cleanup point.
22208
22209 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
22210
22211 PR target/85403
22212 * config/i386/i386.c (get_builtin_code_for_version): Check
22213 error_mark_node.
22214
22215 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
22216
22217 PR target/84331
22218 * config.gcc: Support "skylake".
22219 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22220 PROCESSOR_SKYLAKE.
22221 * config/i386/i386.c (m_SKYLAKE): Define.
22222 (processor_target_table): Add "skylake".
22223 (ix86_option_override_internal): Add "skylake".
22224 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
22225 PROCESSOR_CANNONLAKE.
22226 (get_builtin_code_for_version): Fix priority for
22227 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
22228 PROCESSOR_SKYLAKE-AVX512.
22229 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
22230 (processor_type): Add PROCESSOR_SKYLAKE.
22231
22232 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
22233 Jason Merrill <jason@redhat.com>
22234
22235 PR c++/85112
22236 * convert.c (convert_to_integer_1): Use direct recursion for
22237 enumeral types and types with a precision less than the number
22238 of bits in their mode.
22239
22240 2018-04-16 Julia Koval <julia.koval@intel.com>
22241
22242 PR target/84413
22243 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
22244 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
22245
22246 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
22247
22248 PR target/85293
22249 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
22250 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
22251 and -mno-direct-move.
22252
22253 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
22254
22255 PR target/83402
22256 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
22257 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
22258 Ensure negative shifts result in {0}.
22259
22260 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
22261
22262 PR rtl-optimization/79916
22263 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
22264 regs (if any) to define how to gnerate SD moves when LRA is in
22265 progress.
22266
22267 2018-04-13 Jakub Jelinek <jakub@redhat.com>
22268
22269 PR rtl-optimization/85393
22270 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
22271 * except.c (expand_dw2_landing_pad_for_region): Make static.
22272 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
22273 a label and unconditional jump to old_bb, rather than
22274 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
22275 basic block.
22276
22277 PR rtl-optimization/85376
22278 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
22279 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
22280 instead of a specific value.
22281
22282 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
22283 Bin Cheng <bin.cheng@arm.com>
22284
22285 PR tree-optimization/82965
22286 PR tree-optimization/83991
22287 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
22288 by_profile_only parameter.
22289 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
22290 information if the loop was predicted to iterate too many times.
22291 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
22292
22293 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
22294
22295 PR lto/71991
22296 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
22297 always inline.
22298
22299 2018-04-13 Martin Liska <mliska@suse.cz>
22300 Jakub Jelinek <jakub@redhat.com>
22301
22302 PR middle-end/81657
22303 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
22304 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
22305 * builtins.c (expand_builtin_memory_copy_args): Use
22306 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
22307 handle dest_addr == pc_rtx.
22308
22309 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
22310
22311 PR target/85291
22312 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
22313 asked to not generate direct moves.
22314 (fix_trunc<mode>si2_stfiwx): Similar.
22315 (fix_trunc<mode>si2_internal): Similar.
22316
22317 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22318
22319 PR debug/83157
22320 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
22321 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
22322 lookup if dest in some wider mode is known to be const0_rtx and
22323 if so, record permanent equivalence for it to be ZERO_EXTEND of
22324 the narrower mode destination.
22325
22326 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
22327
22328 * lto-streamer-out.c (output_function): Revert 259346.
22329 * omp-expand.c (expand_oacc_for): Likewise.
22330
22331 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
22332
22333 PR rtl-optimization/85354
22334 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
22335 * sel-sched.c (sel_global_init): ... here.
22336
22337 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
22338
22339 PR target/85238
22340 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
22341 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
22342 mode for PE-COFF targets.
22343 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
22344 (i386_pe_asm_lto_end): Likewise.
22345 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
22346 (TARGET_ASM_LTO_END): Likewise.
22347 * config/i386/winnt.c (saved_debug_info_level): New static variable.
22348 (i386_pe_asm_lto_start): New function.
22349 (i386_pe_asm_lto_end): Likewise.
22350
22351 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
22352 Richard Biener <rguenther@suse.de>
22353
22354 PR middle-end/84955
22355 * lto-streamer-out.c (output_function): Fix CFG loop state before
22356 streaming out.
22357 * omp-expand.c (expand_oacc_for): Handle calls to internal
22358 functions like regular functions.
22359
22360 2018-04-12 Richard Biener <rguenther@suse.de>
22361
22362 PR lto/85371
22363 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
22364 for the early LTO debug to properly generate references to it
22365 during DIE emission. Do not re-use that for the skeleton for
22366 split-dwarf.
22367 (dwarf2out_early_finish): Likewise.
22368
22369 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22370
22371 PR target/85328
22372 * config/i386/sse.md
22373 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
22374 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
22375 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
22376 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
22377 and output is a reg, avoid creating invalid lowpart subreg, but
22378 instead split into a 512-bit move. Don't split if not AVX512VL,
22379 input is xmm16+ reg and output is a mem.
22380 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
22381 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
22382 xmm16+ reg and output is a mem.
22383
22384 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22385
22386 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
22387 also for flag_dwarf2_cfi_asm.
22388
22389 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22390
22391 PR rtl-optimization/85342
22392 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
22393 a bool scalar var inside of the loop instead. Don't try to update
22394 recog_data.operand after failed apply_change_group.
22395
22396 2018-04-12 Tom de Vries <tom@codesourcery.com>
22397
22398 PR target/85296
22399 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
22400 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
22401 array with flexible array member as array without given dimension.
22402 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
22403 argument for undefined param to true.
22404
22405 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
22406
22407 PR target/85321
22408 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22409 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
22410 from PowerPC section.
22411 * config/rs6000/sysv4.opt (mcall-): Improve help text.
22412 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
22413 help text that is too long.
22414 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
22415 help text that is too long.
22416 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
22417 help text that is too long.
22418
22419 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
22420
22421 * config/alpha/alpha.md (stack_probe_internal): Rename
22422 from "probe_stack". Update all callers.
22423
22424 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22425
22426 PR rtl-optimization/84566
22427 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
22428 sched_macro_fuse_insns.
22429
22430 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22431
22432 PR target/84301
22433 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
22434 (compute_block_dependences): ... from here.
22435
22436 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22437
22438 PR tree-optimization/85331
22439 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
22440 from int to HOST_WIDE_INT.
22441
22442 2018-04-11 Martin Jambor <mjambor@suse.cz>
22443
22444 PR ipa/84149
22445 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
22446 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
22447 not the same as the source val.
22448 (cgraph_edge_brings_value_p): New parameter.
22449 (gather_edges_for_value): Pass destination value to
22450 cgraph_edge_brings_value_p.
22451 (perhaps_add_new_callers): Likewise.
22452 (get_info_about_necessary_edges): Likewise and exclude values brought
22453 only by self-recursive edges.
22454 (create_specialized_node): Redirect only clones of self-calling edges.
22455 (+self_recursive_pass_through_p): New function.
22456 (find_more_scalar_values_for_callers_subset): Use it.
22457 (find_aggregate_values_for_callers_subset): Likewise.
22458 (known_aggs_to_agg_replacement_list): Removed.
22459 (decide_whether_version_node): Re-calculate known constants for all
22460 remaining context clones.
22461
22462 2018-04-11 Richard Biener <rguenther@suse.de>
22463
22464 PR lto/85339
22465 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
22466 from early DWARF output.
22467 (dwarf2out_early_finish): Output line info unconditionally into
22468 early DWARF and add reference to it.
22469
22470 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22471
22472 PR target/85281
22473 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
22474 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
22475 other than V2DFmode using iptr mode attribute.
22476 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
22477
22478 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22479
22480 PR rtl-optimization/84659
22481 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
22482
22483 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22484
22485 PR debug/85302
22486 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
22487 SIZEP is NULL.
22488 (output_loc_list): Pass address of a dummy size variable even in the
22489 locview handling loop.
22490 (index_location_lists): Add comment on why skip_loc_list_entry can't
22491 call size_of_locs.
22492
22493 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
22494
22495 PR target/85261
22496 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
22497 into register.
22498
22499 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
22500
22501 PR target/85321
22502 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22503 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
22504 and -mstring-compare-inline-limit.
22505
22506 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22507
22508 PR target/85287
22509 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
22510 for stack clash protection in a register whenever we need it to be in
22511 a register.
22512
22513 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22514
22515 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
22516 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
22517
22518 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22519
22520 PR target/85321
22521 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
22522 the help text.
22523 (mlong-double-): Ditto.
22524 * config/rs6000/sysv4.opt (msdata=): Ditto.
22525 (mtls-size=): Ditto.
22526
22527 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22528
22529 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
22530 erroneous entries for
22531 "vector int vec_ldl (int, long int *)", and
22532 "vector unsigned int vec_ldl (int, unsigned long int *)".
22533 Add comments and entries for
22534 "vector bool char vec_ldl (int, bool char *)",
22535 "vector bool short vec_ldl (int, bool short *)",
22536 "vector bool int vec_ldl (int, bool int *)",
22537 "vector bool long long vec_ldl (int, bool long long *)",
22538 "vector pixel vec_ldl (int, pixel *)",
22539 "vector long long vec_ldl (int, long long *)",
22540 "vector unsigned long long vec_ldl (int, unsigned long long *)".
22541 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
22542 type tree bool_long_long_type_node and correct definition of
22543 bool_V2DI_type_node to make reference to this new type tree.
22544 (rs6000_mangle_type): Replace erroneous reference to
22545 bool_long_type_node with bool_long_long_type_node.
22546 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
22547 comments to emphasize sign distinctions for char and int types and
22548 replace RS6000_BTI_bool_long constant with
22549 RS6000_BTI_bool_long_long constant. Also add comment to restrict
22550 use of RS6000_BTI_pixel.
22551 (bool_long_type_node): Remove this macro definition.
22552 (bool_long_long_type_node): New macro definition
22553
22554 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22555
22556 PR rtl-optimization/85300
22557 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
22558 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
22559 simplify_unary_operation fails.
22560
22561 2018-04-10 Martin Liska <mliska@suse.cz>
22562
22563 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
22564 cgraph_edge and ipa_ref.
22565
22566 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22567
22568 PR target/85177
22569 PR target/85255
22570 * config/i386/sse.md
22571 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
22572 computation of the VEC_MERGE selector from mask.
22573 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
22574 Fix decoding of the VEC_MERGE selector into mask.
22575
22576 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22577
22578 PR tree-optimization/85286
22579 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
22580
22581 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22582
22583 * final.c (final_1): Set insn_last_address as well as
22584 insn_current_address.
22585
22586 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22587
22588 PR target/85173
22589 * explow.c (emit_stack_probe): Call validize_mem on memory location
22590 before passing it to gen_probe_stack. Create address operand and
22591 legitimize it for the probe_stack_address case.
22592
22593 2018-04-09 Jan Hubicka <jh@suse.cz>
22594
22595 PR lto/85078
22596 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
22597 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
22598 * tree.c (free_lang_data_in_type): Fix handling of binfos;
22599 walk basetypes.
22600 (free_lang_data): Rebuild type inheritance graph.
22601
22602 2018-04-09 Martin Sebor <msebor@redhat.com>
22603
22604 * invoke.texi (-finline-small-functions): Mention other optimization
22605 options.
22606 (-findirect-inlining, -fpartial-inlining): Same.
22607 (-finline-functions-called-once): Same.
22608 (-freorder-blocks-and-partition): Same.
22609
22610 2018-04-09 Jan Hubicka <jh@suse.cz>
22611
22612 PR rtl/84058
22613 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
22614 jumps; choose last target that matches the criteria (i.e.
22615 no partition changes for non-crossing jumps).
22616 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
22617 support for redirecting crossing jumps to non-crossing.
22618
22619 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
22620
22621 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
22622 also for naked functions.
22623
22624 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
22625
22626 * config/arc/arc.md (add_shift): New pattern.
22627 (add_shift2): Likewise.
22628 (sub_shift): Likewise.
22629 (sub_shift_cmp0_noout): Likewise.
22630 (compare_si_ashiftsi): Likewise.
22631 (xbfu_cmp0_noout): New combine pattern.
22632 (xbfu_cmp0"): Likewise.
22633 (movsi_set_cc_insn): Place the predicable variant first.
22634 (commutative_binary_cmp0_noout): Remove clobber.
22635 (commutative_binary_cmp0): New pattern.
22636 (noncommutative_binary_cmp0): Likewise.
22637 (noncommutative_binary_cmp0_noout): Likewise.
22638 (noncommutative_binary_comparison_result_used): Removed.
22639 (rsub_cmp0): New pattern.
22640 (rsub_cmp0_noout): Likewise.
22641 (extzvsi): Changed, keep only meaningful variants.
22642 (SQH, SEZ): New iterators.
22643 (SQH_postfix): New mode attribute.
22644 (SEZ_prefix): New code attribute.
22645 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
22646 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
22647 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
22648 of numerical value.
22649 (noncommutative_operator): Check the availability of barrel
22650 shifter option.
22651
22652 2018-04-09 Richard Biener <rguenther@suse.de>
22653
22654 PR tree-optimization/85284
22655 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
22656 Only use the niter constraining form of simple_iv when the exit
22657 is always executed.
22658
22659 2018-04-09 Tom de Vries <tom@codesourcery.com>
22660
22661 PR target/84041
22662 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22663 (define_expand "*memory_barrier"): New define_expand.
22664 (define_insn "memory_barrier"): New insn.
22665
22666 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22667
22668 PR rtl-optimization/80463
22669 PR rtl-optimization/83972
22670 PR rtl-optimization/83480
22671
22672 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
22673 correct producer for the insn.
22674 (tidy_control_flow): Fixup seqnos in case of debug insns.
22675
22676 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22677
22678 PR rtl-optimization/83913
22679
22680 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
22681 different sched-times when merging exprs.
22682
22683 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22684
22685 PR rtl-optimization/83962
22686
22687 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
22688 tidy_fallthru_edge and tidy_control_flow.
22689
22690 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22691
22692 PR rtl-optimization/83530
22693
22694 * sel-sched.c (force_next_insn): New global variable.
22695 (remove_insn_for_debug): When force_next_insn is true, also leave only
22696 next insn in the ready list.
22697 (sel_sched_region): When the region wasn't scheduled, make another pass
22698 over it with force_next_insn set to 1.
22699
22700 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22701
22702 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22703 into tm_file.
22704 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22705 for interrupt control.
22706 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22707 functions for interrupt control.
22708 * config/nds32/nds32-intrinsic.md: Likewise.
22709 * config/nds32/nds32_intrinsic.h: Likewise.
22710 * config/nds32/nds32.h (nds32_builtins): Likewise.
22711
22712 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22713
22714 * config/nds32/nds32.c (nds32_init_machine_status,
22715 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22716 strict_aligned_p field.
22717 (nds32_expand_to_rtl_hook): New function.
22718 (TARGET_EXPAND_TO_RTL_HOOK): Define.
22719 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22720
22721 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22722 Chung-Ju Wu <jasonwucj@gmail.com>
22723
22724 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22725 * config/nds32/nds32-n7.md: New file.
22726 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22727 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22728 pipeline.
22729 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22730 * config/nds32/nds32.md (pipeline_model): Add n7.
22731 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22732 * config/nds32/pipelines.md: Include n7 settings.
22733
22734 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22735 Chung-Ju Wu <jasonwucj@gmail.com>
22736
22737 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22738 * config/nds32/nds32-e8.md: New file.
22739 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22740 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22741 pipeline.
22742 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22743 * config/nds32/nds32.md (pipeline_model): Add e8.
22744 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22745 * config/nds32/pipelines.md: Include e8 settings.
22746
22747 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22748 Chung-Ju Wu <jasonwucj@gmail.com>
22749
22750 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22751 * config/nds32/nds32-n8.md: New file.
22752 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22753 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22754 pipeline.
22755 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22756 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22757 * config/nds32/nds32.md (pipeline_model): Add n8.
22758 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22759 * config/nds32/pipelines.md: Include n8 settings.
22760
22761 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22762 Chung-Ju Wu <jasonwucj@gmail.com>
22763
22764 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
22765 * config/nds32/nds32-n9-2r1w.md: New file.
22766 * config/nds32/nds32-n9-3r2w.md: New file.
22767 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
22768 nds32_register_ports): New or modify for cpu n9.
22769 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
22770 pipeline.
22771 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
22772 * config/nds32/nds32-utils.c: New file.
22773 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
22774 TARGET_MUL_SLOW): Define.
22775 * config/nds32/nds32.md (pipeline_model): New attribute.
22776 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
22777 New options that support cpu n9.
22778 * config/nds32/pipelines.md: Include n9 settings.
22779 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
22780
22781 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22782
22783 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
22784 information if necessary.
22785 (output_cond_branch_compare_zero): Likewise.
22786 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
22787 (nds32_target_alignment): Refine for alignment.
22788 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
22789 (FUNCTION_BOUNDARY): Modify.
22790 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
22791 align case.
22792 * config/nds32/nds32.opt (malways-align, malign-functions): New.
22793
22794 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22795
22796 * config/nds32/constants.md (unspec_volatile_element): Add values for
22797 TLB operation and data prefetch.
22798 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22799 functions for TLB operation and data prefetch.
22800 * config/nds32/nds32-intrinsic.md: Likewise.
22801 * config/nds32/nds32_intrinsic.h: Likewise.
22802 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
22803 (nds32_print_operand): Likewise.
22804 * config/nds32/nds32.h (nds32_builtins): Likewise.
22805
22806 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
22807 Andrew Pinski <pinsika@gcc.gnu.org>
22808
22809 PR middle-end/82976
22810 * match.pd: Use constant_boolean_node of correct type instead of
22811 boolean_true_node or boolean_false_node for simplifying
22812 pointer comparisons to zero.
22813
22814 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22815
22816 PR tree-optimization/80021
22817 * tree.c (verify_type_variant): Make error call in verify_variant_match
22818 translatable and remove final full stop.
22819
22820 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22821
22822 * config/nds32/constants.md (unspec_volatile_element): Add
22823 UNSPEC_VOLATILE_EH_RETURN.
22824 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22825 nds32_output_stack_pop): Support dwarf exception handling process.
22826 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22827 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22828 exception handling process.
22829 (nds32_compute_stack_frame): Likewise.
22830 (nds32_return_addr_rtx): Likewise.
22831 (nds32_initial_elimination_offset): Likewise.
22832 (nds32_expand_prologue): Likewise.
22833 (nds32_expand_epilogue): Likewise.
22834 (nds32_dynamic_chain_address): New function.
22835 * config/nds32/nds32.h (machine_function): Add fields for dwarf
22836 exception handling.
22837 (DYNAMIC_CHAIN_ADDRESS): Define.
22838 (EH_RETURN_DATA_REGNO): Define.
22839 (EH_RETURN_STACKADJ_RTX): Define.
22840 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22841 patterns for dwarf exception handling.
22842
22843 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22844
22845 * config/nds32/nds32.h: Clean up obsolete macros.
22846
22847 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22848
22849 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22850 Add enum values for particular instructions.
22851 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22852 particular intrinsic functions.
22853 * config/nds32/nds32-intrinsic.md: Likewise.
22854 * config/nds32/nds32_intrinsic.h: Likewise.
22855 * config/nds32/nds32.h (nds32_builtins): Likewise.
22856 * config/nds32/nds32.md (type): Add pbsad and pbsada.
22857 (btst, ave): New patterns for particular instructions.
22858
22859 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22860
22861 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22862 Add enum values for atomic load/store and memory sync.
22863 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22864 and memory sync.
22865 * config/nds32/nds32-intrinsic.md: Likewise.
22866 * config/nds32/nds32_intrinsic.h: Likewise.
22867 * config/nds32/nds32.h (nds32_builtins): Likewise.
22868
22869 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22870
22871 PR tree-optimization/85257
22872 * fold-const.c (native_encode_vector): If not all elts could fit
22873 and off is -1, return 0 rather than offset.
22874 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22875 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22876 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
22877 adjust buffer in native_interpret_expr call.
22878
22879 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22880
22881 * config/nds32/constants.md (unspec_volatile_element): Add cache
22882 control enum values.
22883 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22884 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22885 * config/nds32/nds32.c (nds32_cctl_names): New.
22886 (nds32_print_operand): Handle cache control register names.
22887 * config/nds32/nds32.h (nds32_builtins): New enum values.
22888 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22889 macros.
22890 * config/nds32/nds32.md (type): Add mmu.
22891 * config/nds32/pipelines.md (simple_insn): Add mmu.
22892
22893 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22894
22895 * config/nds32/nds32.md (type): Remove call.
22896 * config/nds32/pipelines.md (simple_insn): Likewise.
22897
22898 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22899
22900 * config/nds32/constants.md (unspec_volatile_element): Add
22901 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22902 UNSPEC_VOLATILE_FMFCFG.
22903 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22904 description for fmfcfg and fmfcsr.
22905 (bdesc_1arg): Add fmtcsr.
22906 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22907 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22908 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22909 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22910 unspec_fmfcfg): New patterns.
22911 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22912 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22913 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22914 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22915 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22916 __nds32__fmfcfg): Define.
22917
22918 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22919
22920 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22921 intrinsic register names.
22922 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22923 intrinsic register enum values and macros.
22924
22925 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22926
22927 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22928 for load/store addressing form.
22929 (nds32_print_operand_address): Likewise.
22930
22931 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
22932
22933 PR target/85196
22934 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22935 based on LABEL_REF. Remove useless assertion.
22936 (pic_address_needs_scratch): Fix formatting.
22937 (sparc_legitimize_pic_address): Minor tweaks.
22938 (sparc_delegitimize_address): Adjust assertion accordingly.
22939 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22940 into symbolic_operand.
22941 (movsi_high_pic_label_ref): Likewise.
22942 (movsi_lo_sum_pic_label_ref): Likewise.
22943 (movdi_pic_label_ref): Likewise.
22944 (movdi_high_pic_label_ref): Likewise.
22945 (movdi_lo_sum_pic_label_ref): Likewise.
22946
22947 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
22948
22949 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22950 custom LIB_SPEC setup.
22951
22952 2018-04-06 Ruslan Bukin <br@bsdpad.com>
22953 Kito Cheng <kito.cheng@gmail.com>
22954
22955 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22956 * config/riscv/freebsd.h: New.
22957
22958 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22959
22960 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22961 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22962 file.
22963
22964 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22965 Kito Cheng <kito.cheng@gmail.com>
22966
22967 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22968 nds32_output_call, nds32_symbol_binds_local_p): New functions.
22969 * config/nds32/nds32-protos.h (nds32_output_call,
22970 nds32_output_return): Declare.
22971 * config/nds32/nds32.md: Refine all the call and return patterns.
22972
22973 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22974
22975 PR debug/85252
22976 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22977 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22978
22979 PR rtl-optimization/84872
22980 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22981 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22982 EDGE_CROSSING edge.
22983
22984 2018-04-06 Tamar Christina <tamar.christina@arm.com>
22985
22986 * expr.c (copy_blkmode_to_reg): Revert 254862.
22987 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22988
22989 2018-04-06 Richard Biener <rguenther@suse.de>
22990
22991 PR middle-end/85244
22992 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22993 after seeing a component reference with an adjacent field. Treat
22994 refs to arrays at struct end of external decls similar to
22995 refs to unconstrained commons.
22996
22997 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22998
22999 PR sanitizer/85213
23000 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
23001 look through SAVE_EXPRs with non-side-effects argument. Adjust
23002 recursive calls.
23003 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
23004 save_p here.
23005
23006 2018-04-06 Richard Biener <rguenther@suse.de>
23007
23008 PR middle-end/85180
23009 * alias.c (find_base_term): New wrapper around find_base_term
23010 unwinding CSELIB_VAL_PTR changes.
23011 (find_base_term): Do not restore CSELIB_VAL_PTR during the
23012 recursion.
23013
23014 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23015
23016 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
23017 instructions.
23018 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
23019 constant definitions.
23020 ("nop"): lr 0,0 -> nopr r0
23021 ("nop_lr0", "nop_lr1"): New insn definitions.
23022
23023 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23024
23025 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
23026 NDS32_V3PUSH_AVAILABLE_P macro.
23027
23028 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
23029 Chung-Ju Wu <jasonwucj@gmail.com>
23030
23031 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
23032 (nds32*-*-*): Add float and fpu_config into supported_defaults.
23033 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
23034 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
23035 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
23036 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
23037 * config/nds32/constraints.md: New constraints and checking for hard
23038 float configuration.
23039 * config/nds32/iterators.md: New mode iterator and attribute for hard
23040 float configuration.
23041 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
23042 patterns.
23043 * config/nds32/nds32-fpu.md: New file.
23044 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
23045 deal with hard float code generation.
23046 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
23047 ARCH_V3S.
23048 (abi_type, float_reg_number): New enum type.
23049 * config/nds32/nds32-predicates.c: New predicates for hard float.
23050 * config/nds32/nds32-protos.h: Declare functions for hard float.
23051 * config/nds32/nds32.c: Implementation for hard float configuration.
23052 * config/nds32/nds32.h: Definitions for hard float configuration.
23053 * config/nds32/nds32.md: Include hard float machine description and
23054 modify patterns for hard float configuration.
23055 * config/nds32/nds32.opt: New options for hard float configuration.
23056 * config/nds32/predicates.md: New predicates for hard float
23057 configuration.
23058
23059 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
23060
23061 * common/config/nds32/nds32-common.c
23062 (nds32_option_optimization_table): Enable -mreleax-hint by default.
23063
23064 2018-04-05 Jakub Jelinek <jakub@redhat.com>
23065
23066 PR middle-end/85195
23067 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
23068 CONSTRUCTOR_ELT (ctor, ...)->value.
23069
23070 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
23071
23072 PR target/85193
23073 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
23074
23075 2018-04-05 Tom de Vries <tom@codesourcery.com>
23076
23077 PR target/85204
23078 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
23079 cond jump.
23080
23081 2018-04-05 Shiva Chen <shiva0217@gmail.com>
23082 Kito Cheng <kito.cheng@gmail.com>
23083
23084 * config/nds32/constraints.md (U33): Fine-tune checking condition.
23085 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
23086 * config/nds32/nds32.h (nds32_16bit_address_type): Add
23087 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
23088
23089 2018-04-05 Shiva Chen <shiva0217@gmail.com>
23090 Kito Cheng <kito.cheng@gmail.com>
23091
23092 * config/nds32/constraints.md (Ufe): New memory constraint.
23093 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
23094 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
23095 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
23096 operands.
23097 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
23098 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
23099
23100 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23101
23102 * config/nds32/nds32.md: Use optimize_size in the condition for
23103 alu-shift instructions.
23104
23105 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23106
23107 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
23108
23109 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23110
23111 * config/nds32/nds32.md (negsi2): Refine pattern.
23112
23113 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
23114 Chung-Ju Wu <jasonwucj@gmail.com>
23115
23116 * config/nds32/iterators.md (shift_rotate): New code iterator.
23117 (shift): New code attribute.
23118 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
23119 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
23120 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
23121 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
23122 bit-wise operations.
23123 (andsi3, *andsi3): Ditto.
23124 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
23125 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
23126 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
23127 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
23128 nds32_ior_operand, nds32_xor_operand): New predicates.
23129
23130 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23131
23132 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
23133 (addsi3, subsi3): ... this.
23134
23135 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23136
23137 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
23138
23139 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23140
23141 * config/nds32/nds32.md: Adjust indention.
23142
23143 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
23144
23145 * config/nds32/nds32.md (feature): New attribute.
23146
23147 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23148
23149 * config/nds32/nds32.md (subtype): New attribute.
23150
23151 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
23152
23153 PR target/85203
23154 * config/arm/arm-builtins.c (arm_expand_builtin): Change
23155 expansion to perform a bitwise AND of the argument followed by a
23156 boolean negation of the result.
23157
23158 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
23159
23160 PR rtl-optimization/84878
23161 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
23162 the basic block. Assert the use reference is not artificial and that
23163 it has an associated insn.
23164
23165 2018-04-04 Michael Matz <matz@suse.de>
23166
23167 * builtins.c (compute_objsize): Pass correct operand
23168 to array_at_struct_end_p.
23169
23170 2018-04-04 Richard Biener <rguenther@suse.de>
23171
23172 PR lto/85176
23173 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
23174 from contexts for DINFO_LEVEL_TERSE and below.
23175
23176 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23177
23178 * config/nds32/nds32-doubleword.md (move_<mode>): Require
23179 resiter_operand condition.
23180 * config/nds32/nds32.md (*move<mode>): Ditto.
23181
23182 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23183 Monk Chiang <sh.chiang04@gmail.com>
23184
23185 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
23186
23187 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23188
23189 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
23190
23191 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23192 Kito Cheng <kito.cheng@gmail.com>
23193
23194 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
23195 nds32_cond_code_str, output_cond_branch,
23196 output_cond_branch_compare_zero, nds32_expand_cbranch,
23197 nds32_expand_cstore, nds32_expand_movcc,
23198 nds32_output_cbranchsi4_equality_zero,
23199 nds32_output_cbranchsi4_equality_reg,
23200 nds32_output_cbranchsi4_equality_reg_or_const_int,
23201 nds32_output_cbranchsi4_greater_less_zero: New functions.
23202 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
23203 nds32_expand_cstore, nds32_expand_movcc,
23204 nds32_output_cbranchsi4_equality_zero,
23205 nds32_output_cbranchsi4_equality_reg,
23206 nds32_output_cbranchsi4_equality_reg_or_const_int,
23207 nds32_output_cbranchsi4_greater_less_zero): Declare.
23208 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
23209 nds32_rimm11s_operand): New predicates.
23210 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
23211 * config/nds32/nds32.md: Rewrite all the branch and conditional move
23212 patterns.
23213
23214 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23215
23216 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
23217 * config/nds32/nds32.md: Ditto.
23218 * config/nds32/pipelines.md: Ditto.
23219
23220 2018-04-04 Richard Biener <rguenther@suse.de>
23221
23222 PR tree-optimization/85168
23223 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
23224 propagating abnormals.
23225
23226 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23227
23228 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
23229
23230 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23231 Kito Cheng <kito.cheng@gmail.com>
23232
23233 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
23234 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
23235 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
23236 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
23237 * config/nds32/nds32.md (sibcall_internal): New.
23238 (sibcall_register): Remove.
23239 (sibcall_immediate): Remove.
23240 (sibcall_value_internal): New.
23241 (sibcall_value_register): Remove.
23242 (sibcall_value_immediate): Remove.
23243 * config/nds32/predicates.md (nds32_general_register_operand): New.
23244 (nds32_call_address_operand): New.
23245
23246 2018-04-03 Jakub Jelinek <jakub@redhat.com>
23247
23248 PR rtl-optimization/85167
23249 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
23250 bb_defs if *split_p, instead preinitialize it to NULL.
23251
23252 PR tree-optimization/85156
23253 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
23254 evaluating the argument multiple times.
23255
23256 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
23257
23258 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
23259 than vector.
23260 (_mm_cvtpd_ps): Likewise.
23261 (_mm_cvttpd_epi32): Likewise.
23262 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
23263 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
23264 vector, pixel, and bool following altivec.h include.
23265
23266 2018-04-03 Martin Sebor <msebor@redhat.com>
23267
23268 * doc/extend.texi (Common Function Attributes): Clarify.
23269 (const attribute): Likewise.
23270 (pure attribute): Likewise.
23271
23272 2018-04-03 Jakub Jelinek <jakub@redhat.com>
23273
23274 PR target/85169
23275 * config/i386/i386.c (ix86_expand_vector_set): Use
23276 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
23277
23278 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
23279
23280 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
23281 instructions when changing rounding bits to preserve precision bits
23282 in the x87 control word.
23283
23284 2018-04-03 Martin Liska <mliska@suse.cz>
23285
23286 PR tree-optimization/82491
23287 * rtl.h (strip_offset_and_add): Replace += suboffset with
23288 poly_uint64 () + suboffset.
23289
23290 2018-03-29 Martin Liska <mliska@suse.cz>
23291 Martin Jambor <mjambor@suse.cz>
23292
23293 PR ipa/84947
23294 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
23295 param_type is not an integral or pointer type.
23296
23297 2018-04-03 Richard Biener <rguenther@suse.de>
23298
23299 * sese.h (recompute_all_dominators): Remove.
23300
23301 2018-04-02 Martin Sebor <msebor@redhat.com>
23302
23303 * doc/invoke.texi (-Wrestrict): Fix typos.
23304
23305 2018-04-02 Jim Wilson <jimw@sifive.com>
23306
23307 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
23308 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
23309 (<optab>di3, <optab>si3_extend): Likewise.
23310 (<optab>si3_mask, <optab>si3_mask_1): New.
23311 (<optab>di3_mask, <optab>di3_mask_1): New.
23312 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
23313 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
23314 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
23315
23316 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
23317
23318 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
23319 example.
23320
23321 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
23322
23323 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
23324 (nds32_canonicalize_comparison): New function.
23325
23326 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
23327 Kito Cheng <kito.cheng@gmail.com>
23328 Kuan-Lin Chen <kuanlinchentw@gmail.com>
23329
23330 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
23331 * config/nds32/constants.md (unspec_volatile_element): Add
23332 UNSPEC_VOLATILE_RELAX_GROUP.
23333 * config/nds32/nds32-relax-opt.c: New file.
23334 * config/nds32/nds32-predicates.c
23335 (nds32_symbol_load_store_p): New function.
23336 * config/nds32/nds32-protos.h
23337 (nds32_symbol_load_store_p): Declare function.
23338 (make_pass_nds32_relax_opt): Declare new rtl pass function.
23339 * config/nds32/nds32.c
23340 (nds32_register_pass): New function to register pass.
23341 (nds32_register_passes): New function to register passes.
23342 * config/nds32/nds32.md (relax_group): New pattern.
23343 * config/nds32/nds32.opt (mrelax-hint): New option.
23344 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
23345
23346 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
23347
23348 * config/nds32/t-nds32: Modify files dependency.
23349
23350 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
23351
23352 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
23353 (PROFILE_HOOK): Define its implementation.
23354
23355 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
23356
23357 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
23358 type and 32-bit size.
23359
23360 2018-04-01 Jakub Jelinek <jakub@redhat.com>
23361
23362 PR middle-end/85090
23363 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
23364 (V_128_256): New mode iterator.
23365 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
23366 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
23367 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
23368 of V.
23369 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
23370 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
23371
23372 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
23373
23374 PR target/83315
23375 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
23376 NaN inputs correctly.
23377
23378 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
23379
23380 PR target/80546
23381 * config/rs6000/vsx.md (??r): New mode attribute.
23382 (*vsx_mov<mode>_64bit): Use it.
23383 (*vsx_mov<mode>_32bit): Likewise.
23384
23385 2018-03-30 Martin Sebor <msebor@redhat.com>
23386
23387 PR tree-optimization/84818
23388 * builtins.c (check_access): Use warning_n.
23389
23390 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23391
23392 PR target/83822
23393 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
23394 condition.
23395 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
23396 condition.
23397
23398 2018-03-30 Julia Koval <julia.koval@intel.com>
23399
23400 PR target/84413
23401 * x86-tune.def (movx, partial_reg_dependency): Enable for
23402 m_SKYLAKE_AVX512.
23403
23404 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
23405
23406 PR inline-asm/84985
23407 * lra-constraints.c (process_alt_operands): Move setting
23408 this_alternative_matches below.
23409
23410 2018-03-29 Martin Liska <mliska@suse.cz>
23411
23412 PR lto/84995.
23413 * doc/invoke.texi: Document how LTO works with debug info.
23414 Describe auto-load support of binutils. Mention 'x86-64'
23415 as valid option value of -march option.
23416
23417 2018-03-29 Jakub Jelinek <jakub@redhat.com>
23418
23419 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
23420
23421 PR c/85094
23422 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
23423 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
23424 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
23425 checking.
23426
23427 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23428
23429 PR target/84912
23430 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
23431 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
23432 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
23433 for RS6000_BTM_POWERPC64.
23434 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
23435 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
23436 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
23437 definition.
23438 (DIVDE): Use it.
23439 (DIVDEU): Likewise.
23440
23441 2018-03-28 Carl Love <cel@us.ibm.com>
23442
23443 Revert
23444 2017-09-27 Carl Love <cel@us.ibm.com>
23445
23446 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
23447 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
23448 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
23449 fctiw instruction.
23450
23451 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23452
23453 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
23454 instead of __vector bool.
23455 (_mm_max_pu8): Likewise.
23456 (_mm_min_pi16): Likewise.
23457
23458 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23459
23460 PR target/84912
23461 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
23462 (DIVWEUO): Likewise.
23463 (DIVDEO): Likewise.
23464 (DIVDEUO): Likewise.
23465 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
23466 DIVWEUO and DIVDEUO.
23467 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
23468 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
23469 (div_extend): Likewise.
23470 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
23471 builtin function.
23472 (__builtin_divweuo): Likewise.
23473 (__builtin_divdeo): Likewise.
23474 (__builtin_divdeuo): Likewise.
23475
23476 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23477
23478 PR target/85095
23479 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
23480 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
23481
23482 PR tree-optimization/82004
23483 * gimple-match-head.c (optimize_pow_to_exp): New function.
23484 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
23485 Don't fold to exp if optimize_pow_to_exp is false.
23486
23487 2018-03-28 Martin Liska <mliska@suse.cz>
23488
23489 PR other/84819
23490 * calls.c (initialize_argument_information): Fix trailing space.
23491 * common.opt: Fix typo and provide better explanation for
23492 -fsanitize-coverage option.
23493 * config/i386/i386.opt: Fix typo.
23494
23495 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23496 Martin Liska <mliska@suse.cz>
23497
23498 PR sanitizer/85081
23499 * gimplify.c (asan_poison_variable): Don't do the check for
23500 gimplify_omp_ctxp here.
23501 (gimplify_decl_expr): Do it here.
23502 (gimplify_target_expr): Likewise.
23503
23504 2018-03-28 Martin Liska <mliska@suse.cz>
23505
23506 PR target/84988
23507 * config/i386/i386.c (ix86_function_arg_advance): Do not call
23508 chkp_type_bounds_count if MPX is not enabled.
23509
23510 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
23511
23512 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
23513
23514 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
23515
23516 PR target/84914
23517 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
23518 function to create the function decl for complex long double
23519 multiply and divide for -mabi=ieeelongdouble.
23520 (init_float128_ieee): Call it.
23521
23522 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
23523
23524 PR target/85044
23525 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
23526 -fcf-protection=branch -mibt.
23527 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
23528
23529 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23530
23531 PR target/81863
23532 * config/arm/arm.c (arm_valid_symbolic_address): Handle
23533 arm_word_relocations.
23534
23535 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
23536
23537 PR target/85056
23538 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
23539 extern array declarations.
23540
23541 2018-03-27 Richard Biener <rguenther@suse.de>
23542
23543 PR middle-end/84067
23544 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
23545 explicit single_use checks.
23546
23547 2018-03-27 Richard Biener <rguenther@suse.de>
23548
23549 PR tree-optimization/85082
23550 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
23551 Valueize the VUSE.
23552
23553 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23554
23555 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
23556 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
23557 Turn on fasynchronous-unwind-tables and funwind-tables.
23558
23559 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
23560
23561 PR target/85073
23562 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
23563 (*bmi_blsr_<mode>_ccz): Ditto.
23564
23565 2018-03-26 Tom de Vries <tom@codesourcery.com>
23566
23567 PR tree-optimization/85063
23568 * omp-general.c (offloading_function_p): New function. Factor out
23569 of ...
23570 * omp-offload.c (pass_omp_target_link::gate): ... here.
23571 * omp-general.h (offloading_function_p): Declare.
23572 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
23573 with attribute omp declare target for offloading functions.
23574
23575 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
23576
23577 PR tree-optimization/84005
23578 * tree-data-ref.h (get_base_for_alignment): Declare.
23579 * tree-data-ref.c (get_base_for_alignment_1): New function.
23580 (get_base_for_alignment): Likewise.
23581 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
23582 get_base_for_alignment to find a suitable base object, instead
23583 of always using drb->base_address.
23584
23585 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23586
23587 PR inline-asm/85022
23588 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
23589 known size by default.
23590
23591 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
23592
23593 PR inline-asm/85030
23594 * lra-constraints.c (process_alt_operands): Don't match BLKmode
23595 and non BLKmode operands.
23596
23597 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23598
23599 PR target/85026
23600 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
23601 Clean up attributes.
23602
23603 2018-03-23 Richard Biener <rguenther@suse.de>
23604
23605 PR debug/85020
23606 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
23607 we are going to emit early debug for LTO.
23608
23609 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23610
23611 PR inline-asm/85034
23612 * function.c (match_asm_constraints_1): Don't optimize if input
23613 doesn't satisfy general_operand predicate for output's mode.
23614
23615 PR inline-asm/85022
23616 * alias.c (write_dependence_p): Don't require for x_canonicalized
23617 non-VOIDmode if x has VOIDmode.
23618
23619 PR sanitizer/85029
23620 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
23621 just don't try to optimize it rather than assert it never happens.
23622
23623 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23624
23625 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
23626 macro expansions for definition of ST_INTERNAL_<mode> and
23627 LD_INTERNAL_<mode> builtins.
23628 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
23629 Remove prototype.
23630 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
23631 function.
23632 (altivec_expand_st_builtin): Likewise.
23633 (altivec_expand_builtin): Remove calls to deleted functions.
23634 (rs6000_address_for_altivec): Delete this function.
23635 * config/rs6000/vector.md: Remove expands for
23636 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
23637
23638 2018-03-22 Sudakshina Das <sudi.das@arm.com>
23639
23640 PR target/84826
23641 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
23642 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
23643 re-computing once computed.
23644 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
23645 (arm_init_machine_status): Initialize
23646 machine->static_chain_stack_bytes.
23647
23648 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23649
23650 PR target/84760
23651 * doc/extend.texi: Add four new prototypes for vec_ld.
23652 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
23653 definitions for more logical presentation.
23654 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
23655 entries for V1TI variants of __builtin_altivec_ld builtin.
23656 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
23657 handling of V1TI variant of LVX icode pattern.
23658 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
23659 (rs6000_gimple_fold_builtin): Likewise.
23660 (altivec_init_builtins): Add code to define
23661 __builtin_altivec_lvx_v1ti function.
23662
23663 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23664
23665 PR inline-asm/84941
23666 * function.c (match_asm_constraints_1): Don't do the optimization
23667 if input isn't a REG, SUBREG, MEM or constant.
23668
23669 2018-03-22 Tom de Vries <tom@codesourcery.com>
23670
23671 PR tree-optimization/84956
23672 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
23673 bb_has_abnormal_pred.
23674
23675 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23676
23677 PR sanitizer/85018
23678 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
23679 DECL_INITIAL (decl) to decl at the end.
23680 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
23681 adjust the comment.
23682
23683 2018-03-21 Joseph Myers <joseph@codesourcery.com>
23684
23685 * doc/extend.texi (__builtin_tgmath): Document when complex
23686 integer types are treated as _Complex _Float64.
23687
23688 2018-03-21 Tom de Vries <tom@codesourcery.com>
23689
23690 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
23691
23692 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23693
23694 PR tree-optimization/84960
23695 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23696 if it is ENTRY block, move them into single succ of ENTRY in that case.
23697
23698 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
23699
23700 PR tree-optimization/84811
23701 * poly-int.h (poly_span_traits): Remove the T3 parameter and
23702 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23703 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23704 (known_subrange_p): Update accordingly. Cast each value involved
23705 in the size comparison, rather than casting the result of the
23706 subtraction.
23707
23708 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23709
23710 PR tree-optimization/84982
23711 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23712 by flipping the least significant bit rather than all bits from
23713 bitpos to bitpos + bitsize - 1.
23714
23715 2018-03-21 Nathan Sidwell <nathan@acm.org>
23716
23717 * doc/extend.texi (Deprecated Features): Remove mention of
23718 long-deleted deprecations.
23719
23720 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23721
23722 PR jit/84288
23723 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23724 * configure: Regenerate.
23725
23726 2018-03-21 Tom de Vries <tom@codesourcery.com>
23727
23728 PR tree-optimization/83126
23729 * tree-parloops.c (num_phis): New function.
23730 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23731
23732 2018-03-21 Nathan Sidwell <nathan@acm.org>
23733
23734 * doc/extend.texi (Deprecated Features): Update deprecated flags,
23735 mention anon-struct/union members and trailing attributes.
23736
23737 2018-03-21 Bin Cheng <bin.cheng@arm.com>
23738
23739 PR tree-optimization/84969
23740 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23741 builtin memset partitions if they set different rhs values.
23742
23743 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23744
23745 PR rtl-optimization/84989
23746 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23747 VEC_DUPLICATE with scalar result mode.
23748
23749 2018-03-21 Martin Liska <mliska@suse.cz>
23750
23751 PR ipa/84963
23752 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23753 not intended return statement.
23754
23755 2018-03-21 Martin Liska <mliska@suse.cz>
23756
23757 PR target/84988
23758 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23759 (chkp_find_bound_slots_1): Limit number of iterations.
23760
23761 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
23762
23763 PR target/84838
23764 * Minor grammar fixes for x86 options.
23765
23766 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23767
23768 PR debug/84875
23769 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
23770 holding REG_CFA_RESTORE notes, instead turn them into a USE.
23771
23772 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
23773
23774 PR target/83789
23775 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
23776 (altivec_lvx_<mode>_1op): Likewise.
23777 (altivec_stvx_<mode>_2op): Likewise.
23778 (altivec_stvx_<mode>_1op): Likewise.
23779 (altivec_lvx_<VM2:mode>): New define_expand.
23780 (altivec_stvx_<VM2:mode>): Likewise.
23781 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
23782 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23783 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
23784 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23785 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
23786 (rs6000_gen_lvx): Likewise.
23787 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
23788 (altivec_expand_stv_builtin): Likewise.
23789 (altivec_expand_builtin): Likewise.
23790 * config/rs6000/vector.md: Likewise.
23791
23792 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23793
23794 PR target/82518
23795 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
23796 BYTES_BIG_ENDIAN.
23797
23798 2018-03-20 Richard Biener <rguenther@suse.de>
23799
23800 PR target/84986
23801 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
23802 sign-conversions as zero, fall back to standard scalar_stmt
23803 cost for the rest.
23804
23805 2018-03-20 Martin Liska <mliska@suse.cz>
23806
23807 PR ipa/84825
23808 * predict.c (rebuild_frequencies): Handle case when we have
23809 PROFILE_ABSENT, but flag_guess_branch_prob is false.
23810
23811 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23812
23813 PR target/84990
23814 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
23815 flag_section_anchors.
23816 * varasm.c (use_blocks_for_decl_p): Remove hack for
23817 dw2_force_const_mem.
23818
23819 PR target/84845
23820 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
23821 to ...
23822 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
23823 be created, use lowpart_subreg of operands[0] rather than operands[0]
23824 itself.
23825 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23826 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23827 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23828 and n constraint instead of aarch64_shift_imm_di and Usd.
23829 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23830 (*aarch64_<optab>_reg_minus<mode>3): ... this.
23831
23832 2018-03-20 Sudakshina Das <sudi.das@arm.com>
23833
23834 PR target/82989
23835 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23836 to favor GPR over NEON registers.
23837 (<shift>di3_neon): Likewise.
23838
23839 2018-03-20 Tom de Vries <tom@codesourcery.com>
23840
23841 PR target/84952
23842 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23843 (nvptx_process_pars): Emit bar.sync asap and alap.
23844
23845 2018-03-20 Tom de Vries <tom@codesourcery.com>
23846
23847 PR target/84954
23848 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23849 seen_label if seen_label is already set.
23850
23851 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23852
23853 PR target/84945
23854 * config/i386/i386.c (fold_builtin_cpu): For features above 31
23855 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23856 Use 1U instead of 1. Formatting fixes.
23857
23858 PR c/84953
23859 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23860 instead of TREE_TYPE (s1) for the return value.
23861
23862 2018-03-19 Jakub Jelinek <jakub@redhat.com>
23863
23864 PR tree-optimization/84946
23865 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23866 bitsize + bitsize in poly_uint64 rather than poly_int64.
23867
23868 PR sanitizer/78651
23869 * dwarf2asm.c: Include fold-const.c.
23870 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23871 of decl rather than decl itself.
23872
23873 PR rtl-optimization/84643
23874 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23875
23876 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
23877
23878 PR sanitizer/78651
23879 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23880 calling assemble_variable.
23881
23882 2018-03-19 Sudakshina Das <sudi.das@arm.com>
23883
23884 PR target/81647
23885 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23886 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23887
23888 2018-03-19 Jim Wilson <jimw@sifive.com>
23889
23890 PR bootstrap/84856
23891 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23892 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23893 (riscv_first_stack_step): Likewise.
23894 (riscv_option_override): Use STACK_BOUNDARY instead of
23895 MIN_STACK_BOUNDARY.
23896 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23897 MIN_STACK_BOUNDARY.
23898 (BIGGEST_ALIGNMENT): Set to 128.
23899 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23900 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23901 STACK_BOUNDARY.
23902
23903 2018-03-19 Richard Biener <rguenther@suse.de>
23904
23905 PR tree-optimization/84933
23906 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23907 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23908
23909 2018-03-19 Richard Biener <rguenther@suse.de>
23910
23911 PR tree-optimization/84859
23912 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23913 (cond_if_else_store_replacement): Perform sinking operation on
23914 single-store BBs regardless of MAX_STORES_TO_SINK setting.
23915 Generalize what a BB with a single eligible store is.
23916
23917 2018-03-19 Richard Biener <rguenther@suse.de>
23918
23919 PR tree-optimization/84929
23920 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23921 chrec_is_positive against non-chrec arg.
23922
23923 2018-03-19 Tamar Christina <tamar.christina@arm.com>
23924
23925 PR target/84711
23926 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23927
23928 2018-03-18 Martin Liska <mliska@suse.cz>
23929
23930 PR rtl-optimization/84635
23931 * regrename.c (build_def_use): Use matches_mode only when
23932 matches >= 0.
23933
23934 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
23935
23936 PR tree-optimization/84913
23937 * tree-vect-loop.c (vectorizable_reduction): Don't try to
23938 vectorize chains of COND_EXPRs.
23939
23940 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23941
23942 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23943
23944 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23945
23946 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23947
23948 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23949
23950 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23951
23952 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23953 Kito Cheng <kito.cheng@gmail.com>
23954
23955 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23956 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23957 (nds32_adjust_reg_alloc_order): New function.
23958 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23959
23960 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
23961
23962 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23963 nds32_print_operand, nds32_print_operand_address): Use
23964 HOST_WIDE_INT_PRINT_DEC instead.
23965
23966 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23967
23968 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23969
23970 2018-03-17 Jakub Jelinek <jakub@redhat.com>
23971
23972 PR target/84902
23973 * config/i386/i386.c (initial_ix86_tune_features,
23974 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23975 unsigned long long.
23976 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23977 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23978 rather than 1u << ix86_tune. Formatting fix.
23979 (ix86_option_override_internal): Change ix86_arch_mask from
23980 unsigned int to unsigned HOST_WIDE_INT, initialize to
23981 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23982 (ix86_function_specific_restore): Likewise.
23983
23984 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23985
23986 PR target/84899
23987 * postreload.c (reload_combine_recognize_pattern): Perform
23988 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23989 truncate_int_for_mode the result for the destination's mode.
23990
23991 PR c/84909
23992 * hsa-gen.c (mem_type_for_type): Fix comment typo.
23993 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23994 Likewise.
23995 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23996 Likewise.
23997
23998 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
23999
24000 PR target/84876
24001 * lra-assigns.c (lra_split_hard_reg_for): Don't use
24002 regno_allocno_class_array and sorted_pseudos.
24003 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
24004 insns where regno is used.
24005
24006 2018-03-16 Martin Liska <mliska@suse.cz>
24007
24008 PR ipa/84833
24009 * multiple_target.c (create_dispatcher_calls): Redirect
24010 reference in the symbol table.
24011
24012 2018-03-16 Martin Liska <mliska@suse.cz>
24013
24014 PR ipa/84722
24015 * multiple_target.c (create_dispatcher_calls): Redirect also
24016 an alias.
24017
24018 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24019
24020 PR c++/79937
24021 PR c++/82410
24022 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
24023 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
24024 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
24025
24026 2018-03-16 Julia Koval <julia.koval@intel.com>
24027
24028 * doc/invoke.texi (Skylake Server): Add CLWB.
24029 Cannonlake): Remove CLWB.
24030
24031 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24032
24033 PR tree-optimization/84841
24034 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
24035 1 << 3.
24036 (FLOAT_ONE_CONST_TYPE): Define.
24037 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
24038 (sort_by_operand_rank): Put entries with higher constant_type last
24039 rather than first to match comments.
24040
24041 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
24042
24043 * config/nios2/nios2.md (movsi_internal): Fix thinko in
24044 split predicate.
24045
24046 2018-03-15 Jakub Jelinek <jakub@redhat.com>
24047
24048 PR c++/79085
24049 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
24050 check and use address of target always.
24051
24052 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
24053
24054 PR target/84574
24055 * config/i386/i386.c (indirect_thunk_needed): Update comments.
24056 (indirect_thunk_bnd_needed): Likewise.
24057 (indirect_thunks_used): Likewise.
24058 (indirect_thunks_bnd_used): Likewise.
24059 (indirect_return_needed): New.
24060 (indirect_return_bnd_needed): Likewise.
24061 (output_indirect_thunk_function): Add a bool argument for
24062 function return.
24063 (output_indirect_thunk_function): Don't generate alias for
24064 function return thunk.
24065 (ix86_code_end): Call output_indirect_thunk_function to generate
24066 function return thunks.
24067 (ix86_output_function_return): Set indirect_return_bnd_needed
24068 and indirect_return_needed instead of indirect_thunk_bnd_needed
24069 and indirect_thunk_needed.
24070
24071 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
24072
24073 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
24074 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
24075 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
24076
24077 2018-03-15 David Malcolm <dmalcolm@redhat.com>
24078 Paul Hua <paul.hua.gm@gmail.com>
24079
24080 PR c/84852
24081 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
24082
24083 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
24084
24085 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
24086 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
24087 resp. SFmode cases.
24088
24089 2018-03-15 Tamar Christina <tamar.christina@arm.com>
24090
24091 PR target/84711
24092 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
24093 instead of GET_MODE_SIZE when comparing Units.
24094
24095 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
24096
24097 PR target/68256
24098 * varasm.c (hash_section): Return an unchangeble hash value
24099 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
24100 Return !aarch64_can_use_per_function_literal_pools_p ().
24101
24102 2018-03-15 Jakub Jelinek <jakub@redhat.com>
24103
24104 PR target/84860
24105 * optabs.c (emit_conditional_move): Pass address of cmode's copy
24106 rather than address of cmode as last argument to prepare_cmp_insn.
24107
24108 2018-03-15 Julia Koval <julia.koval@intel.com>
24109
24110 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
24111 F_AVX512VNNI, F_AVX512BITALG): New.
24112
24113 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
24114
24115 PR target/83451
24116 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
24117 insn for floating-point loads and stores.
24118
24119 2018-03-14 Carl Love <cel@us.ibm.com>
24120
24121 * config/rs6000/rs6000-c.c: Add macro definitions for
24122 ALTIVEC_BUILTIN_VEC_PERMXOR.
24123 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
24124 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
24125 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
24126 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
24127 UNSPEC_VPERMXOR.
24128 * config/doc/extend.texi: Add prototypes for vec_permxor.
24129
24130 2018-03-14 David Malcolm <dmalcolm@redhat.com>
24131
24132 PR c/84852
24133 * diagnostic-show-locus.c (class layout_point): Convert m_line
24134 from int to linenum_type.
24135 (line_span::comparator): Use linenum "compare" function when
24136 comparing line numbers.
24137 (test_line_span): New function.
24138 (layout_range::contains_point): Convert param "row" from int to
24139 linenum_type.
24140 (layout_range::intersects_line_p): Likewise.
24141 (layout::will_show_line_p): Likewise.
24142 (layout::print_source_line): Likewise.
24143 (layout::should_print_annotation_line_p): Likewise.
24144 (layout::print_annotation_line): Likewise.
24145 (layout::print_leading_fixits): Likewise.
24146 (layout::annotation_line_showed_range_p): Likewise.
24147 (struct line_corrections): Likewise for field m_row.
24148 (line_corrections::line_corrections): Likewise for param "row".
24149 (layout::print_trailing_fixits): Likewise.
24150 (layout::get_state_at_point): Likewise.
24151 (layout::get_x_bound_for_row): Likewise.
24152 (layout::print_line): Likewise.
24153 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
24154 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
24155 * input.c (selftest::test_linenum_comparisons): New function.
24156 (selftest::input_c_tests): Call it.
24157 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
24158 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
24159 * selftest.h (ASSERT_GT): New macro.
24160 (ASSERT_GT_AT): New macro.
24161 (ASSERT_LT): New macro.
24162 (ASSERT_LT_AT): New macro.
24163
24164 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
24165
24166 PR rtl-optimization/84780
24167 * combine.c (distribute_links): Don't make a link based on pc_rtx.
24168
24169 2018-03-14 Martin Liska <mliska@suse.cz>
24170
24171 * tree.c (record_node_allocation_statistics): Use
24172 get_stats_node_kind.
24173 (get_stats_node_kind): New function extracted from
24174 record_node_allocation_statistics.
24175 (free_node): Use get_stats_node_kind.
24176
24177 2018-03-14 Richard Biener <rguenther@suse.de>
24178
24179 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
24180 that the value-set of ANTIC_IN doesn't grow.
24181
24182 Revert
24183 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24184 member.
24185 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24186 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24187
24188 2018-03-14 Julia Koval <julia.koval@intel.com>
24189
24190 * config.gcc (icelake-client, icelake-server): New.
24191 (icelake): Remove.
24192 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
24193 (initial_ix86_arch_features): Ditto.
24194 (PTA_SKYLAKE): Add SGX.
24195 (PTA_ICELAKE): Remove.
24196 (PTA_ICELAKE_CLIENT): New.
24197 (PTA_ICELAKE_SERVER): New.
24198 (ix86_option_override_internal): Split up icelake on icelake client and
24199 icelake server.
24200 (get_builtin_code_for_version): Ditto.
24201 (fold_builtin_cpu): Ditto.
24202 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
24203 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
24204 * config/i386/i386.h (processor_type): Ditto.
24205 * doc/invoke.texi: Ditto.
24206
24207 2018-03-14 Jakub Jelinek <jakub@redhat.com>
24208
24209 PR sanitizer/83392
24210 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
24211 INTEGER_CST offset, add it together with bitpos / 8 and
24212 sign extend based on POINTER_SIZE.
24213
24214 PR target/84844
24215 Revert
24216 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
24217
24218 PR target/78090
24219 * config/i386/constraints.md (Yc): New register constraint.
24220 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
24221 Use Yc constraint for alternative 2 of operand 0. Remove
24222 preferred_for_speed attribute.
24223
24224 2018-03-14 Richard Biener <rguenther@suse.de>
24225
24226 PR tree-optimization/84830
24227 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
24228 with the old one to avoid oscillations.
24229
24230 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
24231
24232 PR target/83712
24233 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
24234 pseudos.
24235 (assign_by_spills): Return a flag of reload assignment failure.
24236 Do not process the reload assignment failures. Do not spill other
24237 reload pseudos if they has the same reg class. Update n if
24238 necessary.
24239 (lra_assign): Add a return arg. Set up from the result of
24240 assign_by_spills call.
24241 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24242 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24243 usage_insns if it is not NULL.
24244 (spill_hard_reg_in_range): New function.
24245 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24246 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24247 function prototypes.
24248 (lra_assign): Change prototype.
24249 * lra.c (lra): Add code to deal with fails by splitting hard reg
24250 live ranges.
24251
24252 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
24253
24254 * config/riscv/riscv.opt (mrelax): New option.
24255 * config/riscv/riscv.c (riscv_file_start): Emit ".option
24256 "norelax" when riscv_mrelax is disabled.
24257 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
24258
24259 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24260
24261 PR target/84743
24262 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
24263 reassociation for int modes.
24264
24265 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24266
24267 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
24268 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
24269 for big-endian.
24270 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
24271 * config/aarch64/aarch64-sve.md
24272 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
24273 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
24274 (*extend<mode><Vwide>2): Rename to...
24275 (aarch64_sve_extend<mode><Vwide>2): ...this.
24276 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
24277 renaming the old pattern to...
24278 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
24279 unsigned packs.
24280 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
24281 define_expand, renaming the old pattern to...
24282 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
24283 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
24284 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
24285 account when deciding which SVE instruction the optab should use.
24286 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
24287
24288 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24289
24290 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
24291 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
24292 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
24293 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
24294 (tlsdesc_small_<mode>): Turn a define_expand and use
24295 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
24296 (tlsdesc_small_advsimd_<mode>): ...this.
24297 (tlsdesc_small_sve_<mode>): New pattern.
24298
24299 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24300
24301 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
24302 (UNSPEC_UMUL_HIGHPART): New constants.
24303 (MUL_HIGHPART): New int iteraor.
24304 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
24305 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
24306 define_expand.
24307 (*<su>mul<mode>3_highpart): New define_insn.
24308
24309 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
24310
24311 PR lto/84805
24312 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
24313 incomplete types.
24314
24315 2018-03-13 Martin Liska <mliska@suse.cz>
24316
24317 PR ipa/84658.
24318 * (sem_item_optimizer::sem_item_optimizer): Initialize new
24319 vector.
24320 (sem_item_optimizer::~sem_item_optimizer): Release it.
24321 (sem_item_optimizer::merge_classes): Register variable aliases.
24322 (sem_item_optimizer::fixup_pt_set): New function.
24323 (sem_item_optimizer::fixup_points_to_sets): Likewise.
24324 * ipa-icf.h: Declare new variables and functions.
24325
24326 2018-03-13 Jakub Jelinek <jakub@redhat.com>
24327
24328 PR middle-end/84834
24329 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
24330 integer_pow2p@2 and test integer_pow2p in condition.
24331 (A < 0 ? C : 0): Similarly for @1.
24332
24333 PR middle-end/84831
24334 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
24335 characters starting at p contain '\0' character, don't look beyond
24336 that.
24337
24338 PR target/84827
24339 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
24340 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
24341
24342 PR target/84828
24343 * reg-stack.c (change_stack): Change update_end var from int to
24344 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
24345 also call set_block_for_insn on the newly added insns and rescan.
24346
24347 PR target/84786
24348 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
24349 on the last operand.
24350
24351 PR c++/84704
24352 * tree.c (stabilize_reference_1): Return save_expr (e) for
24353 STATEMENT_LIST even if it doesn't have side-effects.
24354
24355 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
24356
24357 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
24358
24359 2018-03-12 Renlin Li <renlin.li@arm.com>
24360
24361 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
24362 aarch64_output_scalar_simd_mov_immediate.
24363
24364 2018-03-12 Martin Sebor <msebor@redhat.com>
24365
24366 PR tree-optimization/83456
24367 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
24368 for perfectly overlapping calls to memcpy.
24369 (gimple_fold_builtin_memory_chk): Same.
24370 (gimple_fold_builtin_strcpy): Handle no-warning.
24371 (gimple_fold_builtin_stxcpy_chk): Same.
24372 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
24373
24374 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
24375
24376 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
24377 parameter. Use it for SFmode.
24378 (rs6000_function_arg_advance_1): Adjust.
24379 (rs6000_function_arg): Adjust.
24380 (rs6000_gimplify_va_arg): Pass false for that new parameter.
24381
24382 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
24383
24384 PR rtl-optimization/84169
24385 PR rtl-optimization/84780
24386 * combine.c (can_combine_p): Check for a 2-insn combination whether
24387 the destination register is used between the two insns, too.
24388
24389 2018-03-12 Richard Biener <rguenther@suse.de>
24390
24391 PR tree-optimization/84803
24392 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
24393 for refs DR analysis didn't process.
24394
24395 2018-03-12 Richard Biener <rguenther@suse.de>
24396
24397 PR tree-optimization/84777
24398 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
24399 force-vectorize loops ignore whether we are optimizing for size.
24400
24401 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
24402
24403 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
24404 (TARGET_MD_ASM_ADJUST): Define.
24405
24406 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
24407 Kito Cheng <kito.cheng@gmail.com>
24408 Chung-Ju Wu <jasonwucj@gmail.com>
24409
24410 * config/nds32/nds32.c (nds32_compute_stack_frame,
24411 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
24412 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
24413 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
24414 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
24415 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
24416 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
24417 * config/nds32/nds32.md (prologue, epilogue): Use macro
24418 NDS32_V3PUSH_AVAILABLE_P to do checking.
24419
24420 2018-03-11 Jakub Jelinek <jakub@redhat.com>
24421
24422 PR debug/58150
24423 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
24424 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
24425 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
24426 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
24427 addition of most attributes on !orig_type_die or the attribute not
24428 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
24429
24430 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24431 Chung-Ju Wu <jasonwucj@gmail.com>
24432
24433 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
24434 __NDS32_VH__ macro.
24435 * config/nds32/nds32.opt (mvh): New option.
24436
24437 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24438 Chung-Ju Wu <jasonwucj@gmail.com>
24439
24440 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
24441 function.
24442 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
24443 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
24444 definition.
24445
24446 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24447 Chung-Ju Wu <jasonwucj@gmail.com>
24448
24449 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
24450 function.
24451 * config/nds32/nds32-multiple.md (strlensi): New pattern.
24452 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
24453
24454 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
24455 Kito Cheng <kito.cheng@gmail.com>
24456 Chung-Ju Wu <jasonwucj@gmail.com>
24457
24458 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
24459 UNSPEC_FFMISM and UNSPEC_FLMISM.
24460 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
24461 for ffb, ffmism and flmism.
24462 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
24463 (unspec_ffmism): Ditto.
24464 (unspec_flmism): Ditto.
24465 (nds32_expand_builtin_impl): Check if string extension is available.
24466 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
24467 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
24468
24469 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
24470
24471 Reverting patch:
24472 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24473
24474 PR target/83712
24475 * lra-assigns.c (assign_by_spills): Return a flag of reload
24476 assignment failure. Do not process the reload assignment
24477 failures. Do not spill other reload pseudos if they has the same
24478 reg class.
24479 (lra_assign): Add a return arg. Set up from the result of
24480 assign_by_spills call.
24481 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24482 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24483 usage_insns if it is not NULL.
24484 (spill_hard_reg_in_range): New function.
24485 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24486 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24487 function prototypes.
24488 (lra_assign): Change prototype.
24489 * lra.c (lra): Add code to deal with fails by splitting hard reg
24490 live ranges.
24491
24492 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
24493
24494 PR target/84807
24495 * config/i386/i386.opt: Replace Enforcment with Enforcement.
24496
24497 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
24498
24499 PR debug/84620
24500 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
24501 (dw_val_node): Add val_symbolic_view.
24502 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
24503 (symview_upper_bound): New.
24504 (new_line_info_table): Initialize symviews_since_reset.
24505 (dwarf2out_source_line): Count symviews_since_reset and set
24506 symview_upper_bound.
24507 (dw_val_equal_p): Handle symview.
24508 (add_AT_symview): New.
24509 (print_dw_val): Handle symview.
24510 (attr_checksum, attr_checksum_ordered): Likewise.
24511 (same_dw_val_p, size_of_die): Likewise.
24512 (value_format, output_die): Likewise.
24513 (add_high_low_attributes): Use add_AT_symview for entry_view.
24514 (dwarf2out_finish): Reset symview_upper_bound, clear
24515 zero_view_p.
24516
24517 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
24518
24519 PR target/83969
24520 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
24521 Add strict argument and use it.
24522 (rs6000_split_multireg_move): Update for new strict argument.
24523 (mem_operand_gpr): Disallow all non-offsettable addresses.
24524 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
24525
24526 2018-03-09 Jakub Jelinek <jakub@redhat.com>
24527
24528 PR target/84772
24529 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
24530 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
24531 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
24532
24533 PR c++/84767
24534 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
24535 decl, use remap_type if we want to use the type.
24536
24537 2018-03-09 Martin Sebor <msebor@redhat.com>
24538
24539 PR tree-optimization/84526
24540 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24541 Remove dead code.
24542 (builtin_access::generic_overlap): Be prepared to handle non-array
24543 base objects.
24544
24545 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
24546
24547 PR rtl-optimization/84682
24548 * lra-constraints.c (process_address_1): Check is_address flag
24549 for address constraints.
24550 (process_alt_operands): Likewise.
24551 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
24552 preprocess_constraints.
24553 * recog.h (preprocess_constraints): Add oploc parameter.
24554 Adjust callers.
24555 * recog.c (preprocess_constraints): Test address_operand for
24556 CT_ADDRESS constraints.
24557
24558 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24559
24560 PR target/83712
24561 * lra-assigns.c (assign_by_spills): Return a flag of reload
24562 assignment failure. Do not process the reload assignment
24563 failures. Do not spill other reload pseudos if they has the same
24564 reg class.
24565 (lra_assign): Add a return arg. Set up from the result of
24566 assign_by_spills call.
24567 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24568 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24569 usage_insns if it is not NULL.
24570 (spill_hard_reg_in_range): New function.
24571 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24572 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24573 function prototypes.
24574 (lra_assign): Change prototype.
24575 * lra.c (lra): Add code to deal with fails by splitting hard reg
24576 live ranges.
24577
24578 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24579
24580 PR target/83193
24581 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
24582 Accept complain bool parameter. Only emit errors if it is true.
24583 (arm_parse_cpu_option_name): Likewise.
24584 (arm_target_thumb_only): Adjust callers of the above.
24585 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
24586 prototype to take a default true bool parameter.
24587 (arm_parse_arch_option_name): Likewise.
24588
24589 2018-03-09 David Malcolm <dmalcolm@redhat.com>
24590 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
24591
24592 PR jit/64089
24593 PR jit/84288
24594 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
24595 * configure: Regenerate.
24596 * configure.ac ("linker --version-script option"): New.
24597 ("linker soname option"): New.
24598
24599 2018-03-09 Richard Biener <rguenther@suse.de>
24600
24601 PR tree-optimization/84775
24602 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
24603 immediate uses of predicate stmts and mark them modified.
24604
24605 Revert
24606 PR tree-optimization/84178
24607 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24608 to caller.
24609 (version_loop_for_if_conversion): Delay update_ssa call.
24610 (tree_if_conversion): Delay update_ssa until after predicate
24611 insertion.
24612
24613 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
24614
24615 PR target/84763
24616 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
24617 when the function accesses prior frames.
24618
24619 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24620
24621 PR debug/84456
24622 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
24623 gen_llsym, otherwise call maybe_gen_llsym.
24624
24625 PR inline-asm/84742
24626 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
24627 has ',' character inside of it.
24628
24629 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24630
24631 PR target/84748
24632 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
24633 as clobbering CC_REGNUM.
24634
24635 2018-03-08 Richard Biener <rguenther@suse.de>
24636
24637 PR middle-end/84552
24638 * tree-scalar-evolution.c: Include tree-into-ssa.h.
24639 (follow_copies_to_constant): Do not follow SSA names registered
24640 for update.
24641
24642 2018-03-08 Richard Biener <rguenther@suse.de>
24643
24644 PR tree-optimization/84178
24645 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24646 to caller.
24647 (version_loop_for_if_conversion): Delay update_ssa call.
24648 (tree_if_conversion): Delay update_ssa until after predicate
24649 insertion.
24650
24651 2018-03-08 David Malcolm <dmalcolm@redhat.com>
24652
24653 PR tree-optimization/84178
24654 * tree-if-conv.c (release_bb_predicate): Remove the
24655 the assertion that the stmts have NULL use_ops.
24656 Discard the statements, asserting that they haven't
24657 yet been added to a BB.
24658
24659 2018-03-08 Richard Biener <rguenther@suse.de>
24660
24661 PR tree-optimization/84746
24662 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
24663 (phi_translate): Pass in destination ANTIC_OUT set.
24664 (phi_translate_1): Likewise. For a simplified result lookup
24665 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
24666 (phi_translate_set): Adjust.
24667 (do_pre_regular_insertion): Likewise.
24668 (do_pre_partial_partial_insertion): Likewise.
24669
24670 2018-03-08 Martin Liska <mliska@suse.cz>
24671
24672 PR gcov-profile/84735
24673 * doc/gcov.texi: Document usage of profile files.
24674 * gcov-io.h: Document changes in the format.
24675
24676 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
24677
24678 PR debug/84404
24679 PR debug/84408
24680 * dwarf2out.c (struct dw_line_info_table): Update comments for
24681 view == -1.
24682 (FORCE_RESET_NEXT_VIEW): New.
24683 (FORCE_RESETTING_VIEW_P): New.
24684 (RESETTING_VIEW_P): Check for -1 too.
24685 (ZERO_VIEW_P): Likewise.
24686 (new_line_info_table): Force-reset next view.
24687 (dwarf2out_begin_function): Likewise.
24688 (dwarf2out_source_line): Simplify zero_view_p initialization.
24689 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
24690 view directly. Omit view when omitting .loc at line 0.
24691
24692 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24693
24694 PR tree-optimization/84740
24695 * tree-switch-conversion.c (process_switch): Call build_constructors
24696 only if info.phi_count is non-zero.
24697
24698 PR tree-optimization/84739
24699 * tree-tailcall.c (find_tail_calls): Check call arguments against
24700 DECL_ARGUMENTS (current_function_decl) rather than
24701 DECL_ARGUMENTS (func) when checking for tail recursion.
24702
24703 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24704
24705 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24706 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24707 Volker Reichelt's entry and add entries for people that perform
24708 GCC fuzzy testing and report numerous bugs.
24709
24710 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
24711
24712 PR target/82411
24713 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24714 readonly data in sdata, if that is disabled.
24715 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24716 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24717 -mreadonly-in-sdata option.
24718
24719 2018-03-07 Martin Sebor <msebor@redhat.com>
24720
24721 PR tree-optimization/84468
24722 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24723 basic block when looking for nul assignment.
24724
24725 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
24726
24727 PR target/84277
24728 * except.h (output_function_exception_table): Adjust prototype.
24729 * except.c (output_function_exception_table): Remove FNNAME parameter
24730 and add SECTION parameter. Ouput one part of the table at a time.
24731 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24732 the first part of the exception table and emit unwind directives.
24733 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24734 (i386_pe_seh_cold_init): Likewise.
24735 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24736 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24737 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24738 (ix86_output_call_insn): Emit a nop in one more case for SEH.
24739 * config/i386/winnt.c: Include except.h.
24740 (struct seh_frame_state): Add reg_offset, after_prologue and
24741 in_cold_section fields.
24742 (i386_pe_seh_end_prologue): Set seh->after_prologue.
24743 (i386_pe_seh_cold_init): New function.
24744 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24745 to seh->in_cold_section.
24746 (seh_emit_push): Record the offset of the push.
24747 (seh_emit_save): Record the offet of the save.
24748 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24749 Test seh->after_prologue to disregard the epilogue.
24750 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24751 (i386_pe_end_cold_function): New function.
24752
24753 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24754
24755 PR fortran/84565
24756 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24757 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24758
24759 PR c++/84704
24760 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24761 on tmp_var.
24762 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
24763 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
24764
24765 PR middle-end/84723
24766 * multiple_target.c: Include tree-inline.h and intl.h.
24767 (expand_target_clones): Diagnose and fail if node->definition and
24768 !tree_versionable_function_p (node->decl).
24769
24770 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
24771
24772 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
24773 sprint_ul.
24774 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
24775 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
24776 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
24777
24778 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24779
24780 PR target/84710
24781 * combine.c (try_combine): Use reg_or_subregno instead of handling
24782 just paradoxical SUBREGs and REGs.
24783
24784 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
24785
24786 * config/arc/arc.c (arc_finalize_pic): Remove function.
24787 (arc_must_save_register): We use single base PIC register, remove
24788 checks to save/restore the PIC register.
24789 (arc_expand_prologue): Likewise.
24790 * config/arc/arc-protos.h (arc_set_default_type_attributes):
24791 Remove.
24792 (arc_verify_short): Likewise.
24793 (arc_attr_type): Likewise.
24794 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
24795 (walk_stores): Likewise.
24796 (arc_address_cost): Make it static.
24797 (arc_verify_short): Likewise.
24798 (branch_dest): Likewise.
24799 (arc_attr_type): Likewise.
24800 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
24801 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
24802 (arc_final_prescan_insn): Remove inserting the nops due to
24803 hardware hazards. It is done in reorg step.
24804 (insn_length_variant_t): Remove.
24805 (insn_length_parameters_t): Likewise.
24806 (arc_insn_length_parameters): Likewise.
24807 (arc_get_insn_variants): Likewise.
24808 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
24809
24810 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24811
24812 PR inline-asm/84683
24813 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
24814 assertion failure.
24815
24816 PR tree-optimization/84687
24817 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
24818 on new_node->decl.
24819 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
24820
24821 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24822
24823 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
24824 Rename to ppc_speculation_barrier.
24825 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24826 __builtin_ppc_speculation_barrier.
24827
24828 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24829
24830 PR target/84700
24831 * combine.c (combine_simplify_rtx): Don't try to simplify if
24832 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24833 are equal to x.
24834
24835 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
24836
24837 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24838 to 32 bytes when compiling for POWER9.
24839
24840 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24841
24842 PR target/84564
24843 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24844 regparm >= 3 with no arg reg available also for calls with
24845 flag_force_indirect_call. Pass decl to ix86_function_regparm.
24846
24847 PR target/84524
24848 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24849 orig,vex.
24850 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
24851
24852 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
24853
24854 PR target/84264
24855 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24856
24857 2018-03-05 Richard Biener <rguenther@suse.de>
24858
24859 PR tree-optimization/84486
24860 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24861 When inserting a __builtin_assume_aligned call set the LHS
24862 SSA name alignment info accordingly.
24863
24864 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
24865
24866 PR tree-optimization/84114
24867 * config/aarch64/aarch64.c (aarch64_reassociation_width)
24868 Avoid reassociation of FLOAT_MODE addition.
24869
24870 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
24871
24872 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24873 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24874 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24875 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24876 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24877 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24878 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24879 and -mwbnoinvd.
24880 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24881 __builtin_ia32_wbinvd): New builtins.
24882 (SPECIAL_ARGS2): New.
24883 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24884 (SPECIAL_ARGS2): New.
24885 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24886 (ix86_valid_target_attribute_inner_p): Ditto.
24887 (ix86_init_mmx_sse_builtins): Add special_args2.
24888 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24889 TARGET_WBNOINVD_P): New.
24890 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24891 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24892 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24893 * config/i386/immintrin.h (_wbinvd): New intrinsic.
24894 * config/i386/pconfigintrin.h: New file.
24895 * config/i386/wbnoinvdintrin.h: Ditto.
24896 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24897 wbnoinvdintrin.h.
24898 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24899
24900 2018-03-05 Richard Biener <rguenther@suse.de>
24901
24902 PR tree-optimization/84670
24903 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24904 member.
24905 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24906 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24907 (compute_antic_aux): Only assert the number of values in ANTIC_IN
24908 doesn't grow if all successors (recursively) were visited at least
24909 once.
24910
24911 2018-03-05 Richard Biener <rguenther@suse.de>
24912
24913 PR tree-optimization/84650
24914 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24915 if executed in the loop pipeline.
24916
24917 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
24918
24919 * doc/configfiles.texi (Configuration Files): Move info about
24920 conditionalizing $target-protos.h to...
24921 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
24922 differs from $target-protos.h.
24923
24924 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
24925 Chung-Ju Wu <jasonwucj@gmail.com>
24926
24927 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24928 * config/nds32/nds32-multiple.md (setmemsi): Define.
24929 * config/nds32/nds32-memory-manipulation.c
24930 (nds32_gen_dup_4_byte_to_word_value): New.
24931 (emit_setmem_word_loop): New.
24932 (emit_setmem_byte_loop): New.
24933 (nds32_expand_setmem_loop): New.
24934 (nds32_expand_setmem_loop_v3m): New.
24935 (nds32_expand_setmem_unroll): New.
24936 (nds32_expand_setmem): New.
24937
24938 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24939 Chung-Ju Wu <jasonwucj@gmail.com>
24940
24941 * config/nds32/nds32-memory-manipulation.c
24942 (nds32_emit_load_store): New.
24943 (nds32_emit_post_inc_load_store): New.
24944 (nds32_emit_mem_move): New.
24945 (nds32_emit_mem_move_block): New.
24946 (nds32_expand_movmemsi_loop_unknown_size): New.
24947 (nds32_expand_movmemsi_loop_known_size): New.
24948 (nds32_expand_movmemsi_loop): New.
24949 (nds32_expand_movmemsi_unroll): New.
24950 (nds32_expand_movmemqi): Rename ...
24951 (nds32_expand_movmemsi): ... to this.
24952 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24953 (movmemsi): ... to this.
24954 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24955 (nds32_expand_movmemsi): ... to this.
24956
24957 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24958 Monk Chiang <sh.chiang04@gmail.com>
24959 Chung-Ju Wu <jasonwucj@gmail.com>
24960
24961 * config/nds32/nds32-protos.h
24962 (nds32_expand_load_multiple): New arguments.
24963 (nds32_expand_store_multiple): Ditto.
24964 (nds32_valid_multiple_load_store): Rename ...
24965 (nds32_valid_multiple_load_store_p): ... to this.
24966 * config/nds32/nds32-memory-manipulation.c
24967 (nds32_expand_load_multiple): Refine implementation.
24968 (nds32_expand_store_multiple): Ditto.
24969 * config/nds32/nds32-multiple.md
24970 (load_multiple): Update nds32_expand_load_multiple interface.
24971 (store_multiple): Update nds32_expand_store_multiple interface.
24972 * config/nds32/nds32-predicates.c
24973 (nds32_valid_multiple_load_store): Rename ...
24974 (nds32_valid_multiple_load_store_p): ... to this and refine
24975 implementation.
24976 * config/nds32/predicates.md
24977 (nds32_load_multiple_and_update_address_operation): New predicate.
24978 (nds32_store_multiple_and_update_address_operation): New predicate.
24979
24980 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24981 Chung-Ju Wu <jasonwucj@gmail.com>
24982
24983 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24984 (combo): New attribute.
24985 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24986
24987 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
24988
24989 * config/nds32/nds32.opt: Change -mcmodel= default value.
24990
24991 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
24992 Monk Chiang <sh.chiang04@gmail.com>
24993 Chung-Ju Wu <jasonwucj@gmail.com>
24994
24995 * config/nds32/constants.md (unspec_element): New enum.
24996 * config/nds32/constraints.md (Umw): New constraint.
24997 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24998 * config/nds32/nds32-intrinsic.md: Likewise.
24999 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
25000 (nds32_valid_smw_lwm_base_p): New.
25001 (nds32_output_smw_single_word): New.
25002 (nds32_output_lmw_single_word): New.
25003 (nds32_expand_unaligned_load): New.
25004 (nds32_expand_unaligned_store): New.
25005 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
25006 (nds32_output_smw_single_word): Declare.
25007 (nds32_output_lmw_single_word): Declare.
25008 (nds32_expand_unaligned_load): Declare.
25009 (nds32_expand_unaligned_store): Declare.
25010 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
25011 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
25012 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
25013 NDS32_BUILTIN_UASTORE_DW.
25014 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
25015 predicate.
25016
25017 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
25018 Kito Cheng <kito.cheng@gmail.com>
25019 Chung-Ju Wu <jasonwucj@gmail.com>
25020
25021 * config/nds32/nds32-intrinsic.c
25022 (nds32_expand_builtin_null_ftype_reg): Delete.
25023 (nds32_expand_builtin_reg_ftype_imm): Ditto.
25024 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
25025 (nds32_read_argument): New.
25026 (nds32_legitimize_target): Ditto.
25027 (nds32_legitimize_argument): Ditto.
25028 (nds32_check_constant_argument): Ditto.
25029 (nds32_expand_unop_builtin): Ditto.
25030 (nds32_expand_unopimm_builtin): Ditto.
25031 (nds32_expand_binop_builtin): Ditto.
25032 (nds32_builtin_decl_impl): Ditto.
25033 (builtin_description): Ditto.
25034 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
25035 (nds32_init_builtins_impl): Ditto.
25036 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
25037 (nds32_builtin_decl): New.
25038 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
25039 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
25040
25041 2018-03-02 Jeff Law <law@redhat.com>
25042
25043 * reorg.c (stop_search_p): Handle DEBUG_INSN.
25044 (redundant_insn, fill_simple_delay_slots): Likewise.
25045 (fill_slots_from_thread): Likewise.
25046 * resource.c (mark_referenced_resources): Likewise.
25047 (mark_set_resources, find_dead_or_set_registers): Likewise.
25048
25049 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25050
25051 * substring-locations.h (format_warning_va): Formatting fix for
25052 ATTRIBUTE_GCC_DIAG.
25053 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
25054 argument.
25055 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
25056 * substring-locations.c: Include intl.h.
25057 (format_warning_va): Turned into small wrapper around
25058 format_warning_n_va, renamed to ...
25059 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
25060 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
25061 use ngettext.
25062 (format_warning_at_substring_n): New function.
25063 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
25064 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
25065 format_warning_at_substring with just a shorter name instead of
25066 const function pointer.
25067 (fmtwarn_n): New function.
25068 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
25069 appropriate, get rid of all the fmtstr temporaries, move conditionals
25070 with G_() wrapped string literals directly into fmtwarn arguments,
25071 cast dir.len to (int), formatting fixes.
25072
25073 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
25074
25075 * doc/invoke.texi: Remove "Cilk Plus" references.
25076
25077 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25078 Richard Biener <rguenther@suse.de>
25079
25080 PR ipa/84628
25081 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
25082 for error or warning attributes if CALL_FROM_THUNK_P is set.
25083 Formatting fixes.
25084
25085 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25086
25087 PR target/56540
25088 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
25089 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
25090
25091 PR target/56540
25092 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
25093 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
25094
25095 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
25096 instead of -1U in last predictors element's probability member.
25097
25098 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
25099
25100 PR ipa/83983
25101 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
25102 arguments if they are comparable.
25103
25104 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
25105
25106 PR tree-optimization/84634
25107 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
25108 masks and masked_loop_p with a single loop_masks, making sure it's
25109 null for bb vectorization.
25110
25111 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
25112
25113 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
25114 (vect_analyze_data_ref_access): Use loop->safe_len rather than
25115 loop->force_vectorize to check whether there is no alias.
25116
25117 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25118
25119 PR target/84614
25120 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
25121 prototypes.
25122 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
25123 comments.
25124 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
25125 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
25126 instead of a loop around prev_real_insn.
25127 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
25128 prev_real_insn.
25129
25130 PR inline-asm/84625
25131 * config/i386/i386.c (ix86_print_operand): Use conditional
25132 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
25133 zero vector.
25134
25135 2018-03-02 Richard Biener <rguenther@suse.de>
25136
25137 PR tree-optimization/84427
25138 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
25139 (bitmap_set_subtract_values): Rewrite to handle multiple
25140 exprs per value.
25141 (clean): Likewise.
25142 (prune_clobbered_mems): Likewise.
25143 (phi_translate): Take edge instead of pred/phiblock.
25144 (phi_translate_1): Likewise.
25145 (phi_translate_set): Likewise. Insert all translated
25146 exprs for a value into the set, keeping possibly multiple
25147 expressions per value.
25148 (compute_antic_aux): Adjust for phi_translate changes.
25149 When intersecting union the expressions and prune those
25150 not in the final value set, keeping possibly multiple
25151 expressions per value. Do not use value-insertion
25152 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
25153 all expressions. Add verification that the value-sets
25154 only shrink during iteration.
25155 (compute_partial_antic_aux): Adjust for the phi_translate changes.
25156 (do_pre_regular_insertion): Likewise.
25157 (do_pre_partial_partial_insertion): Likewise.
25158
25159 2018-03-02 Richard Biener <rguenther@suse.de>
25160
25161 PR target/82005
25162 * config/darwin.c (saved_debug_info_level): New static global.
25163 (darwin_asm_lto_start): Disable debug info generation for LTO out.
25164 (darwin_asm_lto_end): Restore debug info generation settings.
25165
25166 2018-03-01 Martin Liska <mliska@suse.cz>
25167
25168 PR sanitizer/82484
25169 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
25170 volatile arguments.
25171
25172 2018-03-01 Richard Biener <rguenther@suse.de>
25173
25174 PR debug/84645
25175 * dwarf2out.c (gen_variable_die): Properly handle late VLA
25176 type annotation with LTO when debug was disabled at compile-time.
25177
25178 2018-03-01 Matthew Fortune <mfortune@gmail.com>
25179
25180 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
25181 XINT with INTVAL.
25182 (mips_final_postscan_insn): Likewise.
25183
25184 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
25185
25186 PR rtl-optimization/84528
25187 * alias.c (init_alias_target): Add commentary.
25188 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
25189 a unique base value if the frame pointer is not eliminated
25190 to the stack pointer.
25191
25192 2018-03-01 Tom de Vries <tom@codesourcery.com>
25193
25194 PR rtl-optimization/83327
25195 * lra-int.h (hard_regs_spilled_into): Declare.
25196 * lra.c (hard_regs_spilled_into): Define.
25197 (init_reg_info): Init hard_regs_spilled_into.
25198 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
25199 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
25200 (process_bb_lives): Handle hard_regs_spilled_into.
25201 (lra_create_live_ranges_1): Before doing liveness propagation, clear
25202 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
25203
25204 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
25205
25206 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
25207 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
25208 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
25209 * config/rs6000/aix72.h: New file.
25210
25211 2018-02-28 Jakub Jelinek <jakub@redhat.com>
25212
25213 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
25214 instead of warning_at with conditional singular and plural messages
25215 where possible.
25216
25217 PR target/52991
25218 * stor-layout.c (update_alignment_for_field): For
25219 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
25220 && !DECL_PACKED (field), do the alignment update, just use
25221 only desired_align instead of MAX (type_align, desired_align)
25222 as the alignment.
25223 (place_field): Don't do known_align < desired_align handling
25224 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
25225 is non-NULL, instead do it after rli->prev_field handling and
25226 only if not within a bitfield word. For DECL_PACKED (field)
25227 use type_align of BITS_PER_UNIT.
25228
25229 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
25230
25231 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
25232 superfluous parentheses and trailing spaces.
25233
25234 2018-02-28 Richard Biener <rguenther@suse.de>
25235
25236 PR tree-optimization/84584
25237 * graphite-scop-detection.c (scop_detection::add_scop): Discard
25238 SCoPs with fake exit edge.
25239
25240 2018-02-28 Martin Liska <mliska@suse.cz>
25241
25242 PR testsuite/84597
25243 * timevar.c (timer::print): Fix format to properly print 100%
25244 values.
25245
25246 2018-02-28 Richard Biener <rguenther@suse.de>
25247
25248 PR middle-end/84607
25249 * genmatch.c (capture_info::walk_match): Do not mark
25250 captured expressions without operands as expr_p given
25251 they act more like predicates and should be subject to
25252 "lost tail" side-effect preserving.
25253
25254 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
25255
25256 PR rtl-optimization/81611
25257 * auto-inc-dec.c (attempt_change): Move dead note from
25258 mem_insn if it's the next use of regno
25259 (find_address): Take address use of reg holding
25260 non-incremented value. Add parm to limit search to the named
25261 reg only.
25262 (merge_in_block): Attempt to use a mem insn that is the next
25263 use of the original regno.
25264
25265 2018-02-27 Martin Sebor <msebor@redhat.com>
25266
25267 PR c++/83871
25268 * doc/invoke.texi (-Wmissing-attributes): New option.
25269 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
25270
25271 2018-02-27 Martin Sebor <msebor@redhat.com>
25272
25273 PR translation/84207
25274 * diagnostic-core.h (warning_n, error_n, inform_n): Change
25275 n argument to unsigned HOST_WIDE_INT.
25276 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
25277 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
25278 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
25279 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
25280
25281 2018-02-27 Richard Biener <rguenther@suse.de>
25282
25283 PR tree-optimization/84512
25284 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
25285 Do not use the estimate returned from record_stmt_cost for
25286 the scalar iteration cost but sum properly using add_stmt_cost.
25287
25288 2018-02-27 Richard Biener <rguenther@suse.de>
25289
25290 PR tree-optimization/84466
25291 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25292 Adjust last change to less strictly validate use operands.
25293
25294 2018-02-27 Martin Liska <mliska@suse.cz>
25295
25296 PR gcov-profile/84548
25297 * gcov.c (process_file): Allow partial overlap and consider it
25298 also as group functions.
25299 (output_lines): Properly calculate range of lines for a group.
25300
25301 2018-02-27 Martin Liska <mliska@suse.cz>
25302
25303 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
25304 'ggc' suffixes. Change first column width.
25305 (timer::print): Fix formatting of the column.
25306
25307 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
25308
25309 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
25310 preserve inline entry blocks for the sake of debug inline
25311 entry point markers alone.
25312 (remove_unused_locals): Suggest in comments a better place to
25313 force the preservation of inline entry blocks that are
25314 otherwise unused, but do not preserve them.
25315
25316 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
25317
25318 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
25319
25320 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
25321
25322 PR target/84039
25323 * config/i386/constraints.md (Bs): Replace
25324 ix86_indirect_branch_register with
25325 TARGET_INDIRECT_BRANCH_REGISTER.
25326 (Bw): Likewise.
25327 * config/i386/i386.md (indirect_jump): Likewise.
25328 (tablejump): Likewise.
25329 (*sibcall_memory): Likewise.
25330 (*sibcall_value_memory): Likewise.
25331 Peepholes of indirect call and jump via memory: Likewise.
25332 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
25333 (*sibcall_value_GOT_32): Likewise.
25334 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25335 (GOT_memory_operand): Likewise.
25336 (call_insn_operand): Likewise.
25337 (sibcall_insn_operand): Likewise.
25338 (GOT32_symbol_operand): Likewise.
25339 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
25340
25341 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
25342
25343 PR rtl-optimization/83496
25344 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
25345 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
25346 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
25347 redundant insn, if any.
25348 (relax_delay_slots): Likewise.
25349 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
25350
25351 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
25352
25353 PR tree-optimization/83965
25354 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
25355 that grouped statements are part of a reduction chain. Return
25356 true if the statement is not marked as a reduction itself but
25357 is part of a group.
25358 (vect_recog_dot_prod_pattern): Don't check whether the statement
25359 is part of a group here.
25360 (vect_recog_sad_pattern): Likewise.
25361 (vect_recog_widen_sum_pattern): Likewise.
25362
25363 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
25364
25365 PR debug/84545
25366 * final.c (rest_of_clean_state): Also look for calls inside sequences.
25367
25368 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
25369
25370 PR target/84530
25371 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
25372 the bool argument.
25373 (ix86_output_indirect_function_return): New prototype.
25374 (ix86_split_simple_return_pop_internal): Likewise.
25375 * config/i386/i386.c (indirect_return_via_cx): New.
25376 (indirect_return_via_cx_bnd): Likewise.
25377 (indirect_thunk_name): Handle return va CX_REG.
25378 (output_indirect_thunk_function): Create alias for
25379 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
25380 (ix86_output_indirect_jmp): Remove the bool argument.
25381 (ix86_output_indirect_function_return): New function.
25382 (ix86_split_simple_return_pop_internal): Likewise.
25383 * config/i386/i386.md (*indirect_jump): Don't pass false
25384 to ix86_output_indirect_jmp.
25385 (*tablejump_1): Likewise.
25386 (simple_return_pop_internal): Change it to define_insn_and_split.
25387 Call ix86_split_simple_return_pop_internal to split it for
25388 -mfunction-return=.
25389 (simple_return_indirect_internal): Call
25390 ix86_output_indirect_function_return instead of
25391 ix86_output_indirect_jmp.
25392
25393 2018-02-26 Jakub Jelinek <jakub@redhat.com>
25394
25395 PR bootstrap/84405
25396 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
25397 memset and value initialization afterwards.
25398
25399 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
25400
25401 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
25402
25403 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
25404
25405 PR target/84521
25406 * common/config/aarch64/aarch64-common.c
25407 (aarch_option_optimization_table[]): Switch
25408 off fomit-frame-pointer
25409
25410 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25411 Chung-Ju Wu <jasonwucj@gmail.com>
25412
25413 * config/nds32/nds32-multiple.md (load_multiple): Disallow
25414 volatile memory.
25415 (store_multiple): Ditto.
25416
25417 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25418
25419 * config.gcc: Add --with-cpu support for nds32 target.
25420 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
25421 * config/nds32/nds32.opt: Add -mcpu= option.
25422
25423 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
25424
25425 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
25426 isel=yes): Warn for these deprecated options.
25427
25428 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
25429
25430 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
25431 ISA_2_5_MASKS_EMBEDDED.
25432
25433 2018-02-23 Jakub Jelinek <jakub@redhat.com>
25434
25435 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
25436 p->max as pointers rather than using iterative_hash_expr.
25437
25438 2018-02-23 Carl Love <cel@us.ibm.com>
25439
25440 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
25441 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
25442 BU_P8V_OVERLOAD_2.
25443 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
25444 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
25445 P8V_BUILTIN_VEC_VUNSIGNED2.
25446
25447 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
25448
25449 PR target/81572
25450 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
25451 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
25452 LRA_UNKNOWN_ALT.
25453 * lra-constraints.c (curr_insn_transform): Set up
25454 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
25455 LRA_UNKNOWN_ALT.
25456 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
25457 * lra-eliminations.c (spill_pseudos): Ditto.
25458 (process_insn_for_elimination): Ditto.
25459 * lra-lives.c (reg_early_clobber_p): Use the new macros.
25460 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
25461 LRA_NON_CLOBBERED_ALT.
25462
25463 2018-02-22 Martin Sebor <msebor@redhat.com>
25464
25465 PR tree-optimization/84480
25466 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
25467 to maybe_diag_stxncpy_trunc. Call it.
25468 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
25469 from gimple_fold_builtin_strcpy. Print inlining stack.
25470 (handle_builtin_stxncpy): Print inlining stack.
25471 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
25472
25473 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
25474
25475 PR target/84176
25476 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
25477 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
25478 and -fcheck-pointer-bounds are used together.
25479 (indirect_thunk_prefix): New enum.
25480 (indirect_thunk_need_prefix): New function.
25481 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
25482 "_nt" instead of "_bnd" for NOTRACK prefix.
25483 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
25484 (output_indirect_thunk_function): Likewise.
25485 (): Likewise.
25486 (ix86_code_end): Update output_indirect_thunk_function calls.
25487 (ix86_output_indirect_branch_via_reg): Replace
25488 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
25489 (ix86_output_indirect_branch_via_push): Likewise.
25490 (ix86_output_function_return): Likewise.
25491 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
25492 incompatible with -fcf-protection=branch and
25493 -fcheck-pointer-bounds.
25494
25495 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25496
25497 PR target/83335
25498 * config/aarch64/aarch64.c (aarch64_print_address_internal):
25499 Change gcc_assert call to output_operand_lossage.
25500
25501 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25502
25503 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
25504
25505 2018-02-22 DJ Delorie <dj@redhat.com>
25506 Sebastian Perta <sebastian.perta@renesas.com>
25507 Oleg Endo <olegendo@gcc.gnu.org>
25508
25509 * config/rx/rx.c (rx_rtx_costs): New function.
25510 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
25511
25512 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
25513
25514 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
25515
25516 2018-02-22 Martin Liska <mliska@suse.cz>
25517
25518 PR driver/83193
25519 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
25520 Add "native" as a possible value.
25521
25522 2018-02-22 Martin Liska <mliska@suse.cz>
25523
25524 PR driver/83193
25525 * config/i386/i386.c (ix86_option_override_internal):
25526 Add "native" as a possible value for -march and -mtune.
25527
25528 2018-02-22 Jakub Jelinek <jakub@redhat.com>
25529
25530 PR target/84502
25531 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
25532 to all type variants.
25533
25534 PR tree-optimization/84503
25535 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
25536 width as info->bitpos + info->bitsize - start.
25537 (merged_store_group::merge_overlapping): Simplify width computation.
25538 (check_no_overlap): New function.
25539 (imm_store_chain_info::try_coalesce_bswap): Compute expected
25540 start + width and last_order of the group, fail if check_no_overlap
25541 fails.
25542 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
25543 to group if check_no_overlap fails.
25544
25545 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25546
25547 * config/rs6000/altivec.md: Delete contraint arguments to
25548 define_expand, define_split, and define_peephole2, and in
25549 define_insn_and_split if always unused.
25550 * config/rs6000/darwin.md: Ditto.
25551 * config/rs6000/dfp.md: Ditto.
25552 * config/rs6000/rs6000.md: Ditto.
25553 * config/rs6000/sync.md: Ditto.
25554 * config/rs6000/vector.md: Ditto.
25555 * config/rs6000/vsx.md: Ditto.
25556
25557 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25558
25559 * config/rs6000/altivec.md: Write output control strings as braced
25560 blocks instead of double-quoted strings.
25561 * config/rs6000/darwin.md: Ditto.
25562 * config/rs6000/rs6000.md: Ditto.
25563 * config/rs6000/vector.md: Ditto.
25564 * config/rs6000/vsx.md: Ditto.
25565
25566 2018-02-21 Jason Merrill <jason@redhat.com>
25567
25568 PR c++/84314 - ICE with templates and fastcall attribute.
25569 * attribs.c (build_type_attribute_qual_variant): Remove assert.
25570
25571 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25572
25573 * ipa-cp.c (determine_versionability): Fix comment typos.
25574
25575 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25576
25577 PR c/84229
25578 * ipa-cp.c (determine_versionability): Do not version functions caling
25579 va_arg_pack.
25580
25581 2018-02-21 Martin Liska <mliska@suse.cz>
25582
25583 PR driver/83193
25584 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
25585 Add "native" as a possible value.
25586 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
25587 the macro when native cpu detection is available.
25588
25589 2018-02-21 Martin Liska <mliska@suse.cz>
25590
25591 PR driver/83193
25592 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
25593 Add "native" as a possible value.
25594 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
25595 when native cpu detection is available.
25596
25597 2018-02-21 Jakub Jelinek <jakub@redhat.com>
25598 Martin Sebor <msebor@redhat.com>
25599
25600 PR tree-optimization/84478
25601 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
25602 false.
25603 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
25604 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
25605 support which is conservatively correct, for 2 only stay conservative
25606 for maxlen. Formatting and comment capitalization fixes. Add STRICT
25607 argument to the 2 argument get_range_strlen, adjust 6 arg
25608 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
25609 false.
25610 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
25611 (gimple_fold_builtin_strlen): Pass true as last argument to
25612 get_range_strlen.
25613
25614 2018-02-20 Martin Sebor <msebor@redhat.com>
25615
25616 PR middle-end/84095
25617 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
25618 (builtin_memref::set_base_and_offset): Same. Handle inner references.
25619 (builtin_memref::builtin_memref): Factor out parts into
25620 set_base_and_offset and call it.
25621
25622 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25623
25624 PR middle-end/84406
25625 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
25626 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
25627 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
25628 search at the associated MODE_INT.
25629
25630 2018-02-20 Jeff Law <law@redhat.com>
25631
25632 PR middle-end/82123
25633 PR tree-optimization/81592
25634 PR middle-end/79257
25635 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
25636 for range data rather than using global data.
25637 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
25638 range data rather than using global data.
25639 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
25640 pass it to children as needed.
25641 (struct directive::fmtresult): Similarly.
25642 (struct directive::set_width): Similarly.
25643 (struct directive::set_precision): Similarly.
25644 (format_integer, format_directive, parse_directive): Similarly.
25645 (format_none): Accept unnamed vr_values parameter.
25646 (format_percent, format_floating, format_character): Similarly.
25647 (format_string, format_plain): Similarly.
25648 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
25649 the EVRP range analyzer for range data rather than using global data.
25650 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
25651 gimple-ssa-evrp-analyze.h
25652 (class sprintf_dom_walker): Add after_dom_children member function.
25653 Add evrp_range_analyzer member.
25654 (sprintf_dom_walker::before_dom_children): Call into the EVRP
25655 range analyzer as needed.
25656 (sprintf_dom_walker::after_dom_children): New member function.
25657 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
25658 if not optimizing.
25659 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
25660 (evrp_range_analyzer::pop_to_marker): Likewise.
25661
25662 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25663
25664 PR tree-optimization/84419
25665 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
25666 with the required type if its current type is compatible but
25667 different.
25668
25669 2018-02-20 Jakub Jelinek <jakub@redhat.com>
25670
25671 PR middle-end/82004
25672 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
25673 after vectorization.
25674
25675 2018-02-20 Martin Liska <mliska@suse.cz>
25676
25677 PR driver/83193
25678 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
25679 possible values if we don't have a hint.
25680
25681 2018-02-20 Martin Liska <mliska@suse.cz>
25682
25683 PR c/84310
25684 PR target/79747
25685 * final.c (shorten_branches): Build align_tab array with one
25686 more element.
25687 * opts.c (finish_options): Add alignment option limit check.
25688 (MAX_CODE_ALIGN): Likewise.
25689 (MAX_CODE_ALIGN_VALUE): Likewise.
25690 * doc/invoke.texi: Document maximum allowed option value for
25691 all -falign-* options.
25692
25693 2018-02-19 Jakub Jelinek <jakub@redhat.com>
25694
25695 PR target/84146
25696 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25697 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25698 * var-tracking.c (emit_note_insn_var_location): Remove all references
25699 to NOTE_INSN_CALL_ARG_LOCATION.
25700 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25701 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25702 Use copy_rtx_if_shared.
25703 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25704 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25705 (dwarf2out_var_location): Remove handling of
25706 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25707 on call_insn.
25708 * final.c (final_scan_insn): Remove all references to
25709 NOTE_INSN_CALL_ARG_LOCATION.
25710 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
25711 before dumping final insns.
25712 * except.c (emit_note_eh_region_end): Remove all references to
25713 NOTE_INSN_CALL_ARG_LOCATION.
25714 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25715 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25716 * config/arc/arc.c (hwloop_optimize): Likewise.
25717 * config/arm/arm.c (create_fix_barrier): Likewise.
25718 * config/s390/s390.c (s390_chunkify_start): Likewise.
25719 * config/sh/sh.c (find_barrier): Likewise.
25720 * config/i386/i386.c (rest_of_insert_endbranch,
25721 ix86_seh_fixup_eh_fallthru): Likewise.
25722 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25723 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25724 * config/frv/frv.c (frv_function_prologue): Likewise.
25725 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
25726 reg note.
25727 (note_outside_basic_block_p): Remove all references to
25728 NOTE_INSN_CALL_ARG_LOCATION.
25729 * gengtype.c (adjust_field_rtx_def): Likewise.
25730 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25731 Likewise.
25732 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25733 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25734
25735 PR c++/84444
25736 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25737 is ADDR_EXPR.
25738
25739 PR tree-optimization/84452
25740 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25741 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25742 is NULL.
25743
25744 2018-02-19 Martin Liska <mliska@suse.cz>
25745
25746 PR sanitizer/82183
25747 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25748
25749 2018-02-19 Martin Liska <mliska@suse.cz>
25750 Richard Sandiford <richard.sandiford@linaro.org>
25751
25752 PR tree-optimization/82491
25753 * gimple-fold.c (get_base_constructor): Make earlier bail out
25754 to prevent ubsan.
25755
25756 2018-02-19 Carl Love <cel@us.ibm.com>
25757
25758 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25759 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25760 BU_P8V_OVERLOAD_1.
25761 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25762 P8V_BUILTIN_VEC_NEG.
25763
25764 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
25765
25766 * config/rl78/rl78.md (movdf): New define expand.
25767
25768 2018-02-19 Martin Liska <mliska@suse.cz>
25769
25770 PR other/80589
25771 * doc/invoke.texi: Fix typo.
25772 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
25773
25774 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
25775
25776 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
25777 handle rs6000_single_float and rs6000_double_float specially for
25778 e500 family CPUs.
25779
25780 2018-02-16 Jeff Law <law@redhat.com>
25781
25782 * config/rx/rx.c (add_pop_cfi_notes): New function.;
25783 (pop_regs): Use it.
25784
25785 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25786
25787 PR ipa/84425
25788 * ipa-inline.c (inline_small_functions): Fix a typo.
25789
25790 2018-02-16 Nathan Sidwell <nathan@acm.org>
25791
25792 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
25793
25794 2018-02-16 Carl Love <cel@us.ibm.com>
25795
25796 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
25797 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
25798 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
25799 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
25800 expansion to P8V_BUILTIN_VEC_FLOAT2.
25801
25802 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
25803
25804 PR rtl-optimization/70023
25805 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
25806 src_regno into account.
25807
25808 2018-02-16 Carl Love <cel@us.ibm.com>
25809
25810 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
25811 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
25812 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
25813 * config/rs6000/rs6000.c: Remove case statements for
25814 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
25815 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
25816 and P9V_BUILTIN_VEC_VINSERT4B.
25817 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
25818 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
25819 * config/rs6000/vsx.md:
25820 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
25821 vec_insert4b.
25822
25823 2018-02-16 Carl Love <cel@us.ibm.com>
25824
25825 * config/rs6000/altivec.h: Add builtin names vec_extract4b
25826 vec_insert4b.
25827 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25828 definitions.
25829 * config/rs6000/rs6000-c.c: Add the definitions for
25830 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25831 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25832 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25833 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
25834 definition for insert4b and define insn *insert3b_internal.
25835 * doc/extend.texi: Add documentation for vec_extract4b.
25836
25837 2018-02-16 Nathan Sidwell <nathan@acm.org>
25838
25839 * doc/extend.texi (Backwards Compatibility): Mention friend
25840 injection. Note for-scope is deprecated.
25841 * doc/invoke.texi (-ffriend-injection): Deprecate.
25842
25843 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
25844
25845 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25846 that moved to I2, also allow destinations that are a paradoxical
25847 subreg (instead of a normal reg).
25848
25849 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
25850
25851 PR target/83831
25852 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25853 to QImode.
25854
25855 2018-02-16 Richard Biener <rguenther@suse.de>
25856
25857 PR tree-optimization/84037
25858 PR tree-optimization/84016
25859 PR target/82862
25860 * config/i386/i386.c (ix86_builtin_vectorization_cost):
25861 Adjust vec_construct for the fact we need additional higher latency
25862 128bit inserts for AVX256 and AVX512 vector builds.
25863 (ix86_add_stmt_cost): Scale vector construction cost for
25864 elementwise loads.
25865
25866 2018-02-16 Richard Biener <rguenther@suse.de>
25867
25868 PR tree-optimization/84417
25869 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25870 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25871 (non_rewritable_lvalue_p): Likewise, use poly-ints.
25872
25873 2018-02-16 Martin Liska <mliska@suse.cz>
25874
25875 PR sanitizer/84307
25876 * internal-fn.def (ASAN_CHECK): Set proper flags.
25877 (ASAN_MARK): Likewise.
25878
25879 2018-02-16 Julia Koval <julia.koval@intel.com>
25880
25881 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25882 from PTA_CANNONLAKE.
25883
25884 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25885
25886 PR target/84272
25887 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25888 Use ++iter rather than iter++ for std::list iterators.
25889 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
25890 defer deleting them until all nodes in the forest are processed. Do
25891 free even leaf nodes. Change to_process into auto_vec.
25892
25893 PR bootstrap/84405
25894 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25895 * vec.h (vec_default_construct): Use memset instead of placement new
25896 if BROKEN_VALUE_INITIALIZATION is defined.
25897 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25898 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25899 is defined.
25900
25901 PR rtl-optimization/83723
25902 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25903 * lra.c (lra_substitute_pseudo): Likewise. If true, use
25904 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
25905 recursive calls.
25906 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25907 callers.
25908 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25909
25910 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
25911
25912 PR rtl-optimization/81443
25913 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25914 from inner REGs to paradoxical SUBREGs.
25915
25916 2018-02-16 Richard Biener <rguenther@suse.de>
25917
25918 PR tree-optimization/84399
25919 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25920 For operands we can analyze at their definition make sure we can
25921 analyze them at each use as well.
25922
25923 2018-02-16 Richard Biener <rguenther@suse.de>
25924
25925 PR tree-optimization/84190
25926 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25927 volatile accesses if the decl isn't volatile.
25928
25929 2018-02-15 Jason Merrill <jason@redhat.com>
25930
25931 PR c++/84314 - ICE with templates and fastcall attribute.
25932 * attribs.c (build_type_attribute_qual_variant): Don't clobber
25933 TYPE_CANONICAL on an existing type.
25934
25935 2018-02-15 Jakub Jelinek <jakub@redhat.com>
25936
25937 PR tree-optimization/84383
25938 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25939 dstoff nor call operand_equal_p if dstbase is NULL.
25940
25941 PR tree-optimization/84334
25942 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25943 also a CONSTANT_CLASS_P, punt.
25944
25945 2018-02-14 Jim Wilson <jimw@sifive.com>
25946
25947 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25948 first SMALL_OPERAND check. New local min_second_step. Move assert
25949 to where locals are set. Add TARGET_RVC support.
25950 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25951
25952 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
25953
25954 * doc/invoke.texi: Correct -Wformat-overflow code sample.
25955
25956 2018-02-14 Martin Sebor <msebor@redhat.com>
25957
25958 PR tree-optimization/83698
25959 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25960 arrays constrain the offset range to their bounds.
25961 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25962 (builtin_access::overlap): Avoid setting the size of overlap if it's
25963 already been set.
25964 (maybe_diag_overlap): Also consider arrays when deciding what values
25965 of offsets to include in diagnostics.
25966
25967 2018-02-14 Martin Sebor <msebor@redhat.com>
25968
25969 PR c/84108
25970 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25971 that correspond to the kind of a declaration.
25972
25973 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
25974
25975 PR target/83984
25976 * config/pa/pa.md: Load address of PIC label using the linkage table
25977 if the label is nonlocal.
25978
25979 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
25980
25981 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25982 warning message if user requests -maltivec=be.
25983 * doc/invoke.texi: Document deprecation of -maltivec=be.
25984
25985 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
25986
25987 PR target/84220
25988 * config/rs6000/rs6000-c.c: Update definitions for
25989 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25990 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25991
25992 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25993
25994 PR target/84239
25995 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25996 add _get_ssp intrinsics. Remove argument from
25997 __builtin_ia32_rdssp[d|q].
25998 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25999 * config/i386/i386-builtin.def: Remove argument from
26000 __builtin_ia32_rdssp[d|q].
26001 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
26002 ix86_expand_special_args_builtin for _rdssp[d|q].
26003 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
26004 Clear register before usage.
26005 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
26006 Add documentation for new _get_ssp and _inc_ssp intrinsics.
26007
26008 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
26009
26010 PR tree-optimization/84357
26011 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
26012 operand 1 of an ARRAY_REF too.
26013
26014 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
26015
26016 PR target/83831
26017 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
26018 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26019 declarations.
26020 (set_of_reg): New struct.
26021 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
26022 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
26023 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26024 functions.
26025 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
26026 Split into bitclr, bitset, bitinvert patterns if appropriate.
26027 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
26028 use rx_fuse_in_memory_bitop.
26029 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
26030 to named insn, correct maximum insn length.
26031
26032 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
26033
26034 PR target/79242
26035 * machmode.def: Define a complex mode for PARTIAL_INT.
26036 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
26037 MODE_PARTIAL_INT.
26038 * doc/rtl.texi: Document CSPImode.
26039 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
26040 handling.
26041 (msp430_hard_regno_nregs_with_padding): Likewise.
26042
26043 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
26044
26045 PR target/84279
26046 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
26047
26048 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
26049
26050 PR rtl-optimization/84169
26051 * combine.c (try_combine): New variable split_i2i3. Set it to true if
26052 we generated a parallel as new i3 and we split that to new i2 and i3
26053 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
26054 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
26055 those to i2, not i1. Partially rewrite this scan code.
26056
26057 2018-02-13 Jakub Jelinek <jakub@redhat.com>
26058
26059 PR c/82210
26060 * stor-layout.c (place_field): For variable length fields, adjust
26061 offset_align afterwards not just based on the field's alignment,
26062 but also on the size.
26063
26064 PR middle-end/84309
26065 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
26066 of exps and logs in the use_exp2 case.
26067
26068 2018-02-13 Jeff Law <law@redhat.com>
26069
26070 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
26071 entry for "vector".
26072
26073 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
26074 ARGS as unused.
26075
26076 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
26077
26078 PR debug/84342
26079 PR debug/84319
26080 * common.opt (gas-loc-support, gas-locview-support): New.
26081 (ginline-points, ginternal-reset-location-views): New.
26082 * doc/invoke.texi: Document them. Use @itemx where intended.
26083 (gvariable-location-views): Adjust.
26084 * target.def (reset_location_view): New.
26085 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
26086 (TARGET_RESET_LOCATION_VIEW): New.
26087 * doc/tm.texi: Rebuilt.
26088 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
26089 (dwarf2out_default_as_locview_support): New.
26090 (output_asm_line_debug_info): Use option variables.
26091 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
26092 (output_loc_list): Likewise.
26093 (add_high_low_attributes): Check option variables.
26094 Don't output entry view attribute in strict mode.
26095 (gen_inlined_subroutine_die): Check option variables.
26096 (dwarf2out_inline_entry): Likewise.
26097 (init_sections_and_labels): Likewise.
26098 (dwarf2out_early_finish): Likewise.
26099 (maybe_reset_location_view): New, from...
26100 (dwarf2out_var_location): ... here. Call it.
26101 * debug.h (dwarf2out_default_as_loc_support): Declare.
26102 (dwarf2out_default_as_locview_support): Declare.
26103 * hooks.c (hook_int_rtx_insn_0): New.
26104 * hooks.h (hook_int_rtx_insn_0): Declare.
26105 * toplev.c (process_options): Take -gas-loc-support and
26106 -gas-locview-support from dwarf2out. Enable
26107 -gvariable-location-views by default only with locview
26108 assembler support. Enable -ginternal-reset-location-views by
26109 default only if the target defines the corresponding hook.
26110 Enable -ginline-points by default if location views are
26111 enabled; force it disabled if statement frontiers are
26112 disabled.
26113 * tree-inline.c (expand_call_inline): Check option variables.
26114 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
26115
26116 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
26117
26118 PR tree-optimization/84321
26119 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
26120 handling. Also check whether the anti-range contains any values
26121 that satisfy the mask; switch to a VR_RANGE if not.
26122
26123 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
26124
26125 PR sanitizer/84340
26126 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
26127
26128 2018-02-13 Martin Jambor <mjambor@suse.cz>
26129
26130 PR c++/83990
26131 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
26132 of call statements, also set location of a load to a temporary.
26133
26134 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
26135
26136 * config/rl78/rl78.c (add_vector_labels): New function.
26137 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
26138 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
26139 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
26140 which checks that no arguments are passed.
26141 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
26142 * doc/extend.texi: Documentation for the new attribute.
26143
26144 2018-02-13 Andreas Schwab <schwab@suse.de>
26145
26146 * config/riscv/linux.h (CPP_SPEC): Define.
26147
26148 2018-02-13 Jakub Jelinek <jakub@redhat.com>
26149
26150 PR target/84335
26151 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
26152 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
26153 OPTION_MASK_ISA_AES as first argument to def_builtin_const
26154 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
26155 instead of OPTION_MASK_ISA_PCLMUL as first argument to
26156 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
26157 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
26158 temporarily for AES and PCLMUL builtins.
26159
26160 PR tree-optimization/84339
26161 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
26162 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
26163 Formatting fixes.
26164
26165 PR middle-end/84309
26166 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
26167 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
26168 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
26169 inline function.
26170 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
26171 inline function.
26172 * omp-simd-clone.h: New file.
26173 * omp-simd-clone.c: Include omp-simd-clone.h.
26174 (expand_simd_clones): No longer static.
26175 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
26176 cgraph.h and omp-simd-clone.h.
26177 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
26178 (vect_recog_widen_shift_pattern): Formatting fix.
26179 (vect_pattern_recog_1): Don't check optab for calls.
26180
26181 PR target/84336
26182 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
26183 operands[2] into a REG before using gen_lowpart on it.
26184
26185 2018-02-12 Jeff Law <law@redhat.com>
26186
26187 PR target/83760
26188 * config/sh/sh.c (find_barrier): Consider a sibling call
26189 a barrier as well.
26190
26191 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
26192 successfully back substituting a reg.
26193
26194 2018-02-12 Richard Biener <rguenther@suse.de>
26195
26196 PR tree-optimization/84037
26197 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
26198 parameter, move visited init to caller.
26199 (vect_slp_analyze_operations): Separate cost from validity
26200 check, initialize visited once for all instances.
26201 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
26202 for all instances.
26203 * tree-vect-stmts.c (vect_model_simple_cost): Make early
26204 out an assert.
26205 (vect_model_promotion_demotion_cost): Likewise.
26206 (vectorizable_bswap): Guard cost modeling with !slp_node
26207 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
26208 SLP stmts.
26209 (vectorizable_call): Likewise.
26210 (vectorizable_conversion): Likewise.
26211 (vectorizable_assignment): Likewise.
26212 (vectorizable_shift): Likewise.
26213 (vectorizable_operation): Likewise.
26214 (vectorizable_store): Likewise.
26215 (vectorizable_load): Likewise.
26216 (vectorizable_condition): Likewise.
26217 (vectorizable_comparison): Likewise.
26218
26219 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
26220
26221 PR sanitizer/84307
26222 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
26223 (ASAN_MARK): Fix fnspec to account for return value, change pointer
26224 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
26225
26226 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26227
26228 PR middle-end/83665
26229 * params.def (inline-min-speedup): Increase from 8 to 15.
26230 (max-inline-insns-auto): Decrease from 40 to 30.
26231 * ipa-split.c (consider_split): Add some buffer for function to
26232 be considered inlining candidate.
26233 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
26234 default values.
26235
26236 2018-02-12 Richard Biener <rguenther@suse.de>
26237
26238 PR tree-optimization/84037
26239 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
26240 matched stmts if we cannot swap the non-matched ones.
26241
26242 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
26243
26244 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
26245 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
26246 _mm_maskz_scalef_round_ss): New intrinsics.
26247 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
26248 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
26249 __builtin_ia32_scalefss_round): Remove.
26250 (__builtin_ia32_scalefsd_mask_round,
26251 __builtin_ia32_scalefss_mask_round): New intrinsics.
26252 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
26253 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
26254 ((match_operand:VF_128 2 "<round_nimm_predicate>"
26255 "<round_constraint>")): Changed to ...
26256 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
26257 "<round_scalar_constraint>")): ... this.
26258 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
26259 %0, %1, %2<round_op3>}"): Changed to ...
26260 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
26261 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
26262 %2<round_scalar_mask_op3>}"): ... this.
26263 * config/i386/subst.md (round_scalar_nimm_predicate): New.
26264
26265 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
26266
26267 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
26268 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
26269 (_mm_maskz_sqrt_round_ss): New intrinsics.
26270 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
26271 (__builtin_ia32_sqrtsd_mask_round)
26272 (__builtin_ia32_sqrtss_mask_round): New builtins.
26273 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
26274 (__builtin_ia32_sqrtss_round): Remove.
26275 (__builtin_ia32_sqrtsd_mask_round)
26276 (__builtin_ia32_sqrtss_mask_round): New builtins.
26277 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
26278 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
26279 ((match_operand:VF_128 1 "vector_operand"
26280 "xBm,<round_constraint>")): Changed to ...
26281 ((match_operand:VF_128 1 "vector_operand"
26282 "xBm,<round_scalar_constraint>")): ... this.
26283 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
26284 %0, %2, %<iptr>1<round_op3>}): Changed to ...
26285 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
26286 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
26287 %<iptr>1<round_scalar_mask_op3>}): ... this.
26288 ((set_attr "prefix" "<round_prefix>")): Changed to ...
26289 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
26290
26291 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
26292
26293 PR target/84266
26294 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
26295 Cast vec_cmpeq result to correct type.
26296 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
26297 Cast vec_cmpgt result to correct type.
26298
26299 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
26300
26301 * final.c (final_scan_insn_1): Renamed from...
26302 (final_scan_insn): ... this. New wrapper, to recover
26303 seen from the outermost call in recursive ones.
26304 * config/sparc/sparc.c (output_return): Drop seen from call.
26305 (output_sibcall): Likewise.
26306 * config/visium/visium.c (output_branch): Likewise.
26307
26308 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
26309
26310 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
26311 function label.
26312
26313 2018-02-10 Alan Modra <amodra@gmail.com>
26314
26315 PR target/84300
26316 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
26317 Specify LR as an input.
26318
26319 2018-02-10 Jakub Jelinek <jakub@redhat.com>
26320
26321 PR sanitizer/83987
26322 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
26323 remove_member_access_dummy_vars): New functions.
26324 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
26325 lower_omp_1, execute_lower_omp): Use them.
26326
26327 PR rtl-optimization/84308
26328 * shrink-wrap.c (spread_components): Release todo vector.
26329
26330 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
26331
26332 PR rtl-optimization/57193
26333 * ira-color.c (struct allocno_color_data): Add member
26334 conflict_allocno_hard_prefs.
26335 (update_conflict_allocno_hard_prefs): New.
26336 (bucket_allocno_compare_func): Add a preference based on
26337 conflict_allocno_hard_prefs.
26338 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
26339 (color_allocnos): Remove a dead code. Initiate
26340 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
26341
26342 2018-02-09 Jakub Jelinek <jakub@redhat.com>
26343
26344 PR target/84226
26345 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
26346 constraint from =wa to wa. Avoid a subreg on the output operand,
26347 instead use a pseudo and subreg it in a move.
26348 (p9_xxbrd_<mode>): Changed to ...
26349 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
26350 (p9_xxbrd_v2df): New expander.
26351 (p9_xxbrw_<mode>): Changed to ...
26352 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
26353 (p9_xxbrw_v4sf): New expander.
26354
26355 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
26356
26357 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
26358
26359 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
26360
26361 PR target/83926
26362 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
26363 multiply in 32-bit mode.
26364 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
26365 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
26366 mode.
26367
26368 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
26369
26370 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
26371 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
26372 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
26373 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
26374
26375 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
26376
26377 PR lto/84213
26378 * dwarf2out.c (is_trivial_indirect_ref): New function.
26379 (dwarf2out_late_global_decl): Do not generate a location
26380 attribute for variables that have a non-trivial DECL_VALUE_EXPR
26381 and that are not defined in the current unit.
26382
26383 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
26384
26385 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
26386 instead of a libcall for UNORDERED.
26387
26388 2018-02-09 Tamar Christina <tamar.christina@arm.com>
26389
26390 PR target/82641
26391 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
26392 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
26393
26394 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26395
26396 PR target/PR84295
26397 * config/s390/s390.c (s390_set_current_function): Invoke
26398 s390_indirect_branch_settings also if fndecl didn't change.
26399
26400 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
26401
26402 * config/rs6000/rs6000.md (blockage): Set length to zero.
26403
26404 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
26405
26406 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
26407
26408 2018-02-09 Jakub Jelinek <jakub@redhat.com>
26409
26410 PR sanitizer/84285
26411 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
26412 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
26413 -static-lib*san.
26414
26415 PR debug/84252
26416 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
26417 PARALLEL incoming that failed vt_get_decl_and_offset check.
26418
26419 PR middle-end/84237
26420 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
26421 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
26422 TREE_READONLY bit.
26423 (get_variable_section): For decls in named .bss* sections pass true as
26424 second argument to bss_initializer_p.
26425
26426 2018-02-09 Marek Polacek <polacek@redhat.com>
26427 Jakub Jelinek <jakub@redhat.com>
26428
26429 PR c++/83659
26430 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
26431 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
26432 Sync some changes from cxx_fold_indirect_ref.
26433
26434 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
26435
26436 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
26437 markers.
26438 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
26439 (BLOCK_INLINE_ENTRY_LABEL): New.
26440 (dwarf2out_var_location): Disregard inline entry markers.
26441 (inline_entry_data): New struct.
26442 (inline_entry_data_hasher): New hashtable type.
26443 (inline_entry_data_hasher::hash): New.
26444 (inline_entry_data_hasher::equal): New.
26445 (inline_entry_data_table): New variable.
26446 (add_high_low_attributes): Add DW_AT_entry_pc and
26447 DW_AT_GNU_entry_view attributes if a pending entry is found
26448 in inline_entry_data_table. Add old entry_pc attribute only
26449 if debug nonbinding markers are disabled.
26450 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
26451 markers are enabled.
26452 (block_within_block_p, dwarf2out_inline_entry): New.
26453 (dwarf2out_finish): Check that no entries remained in
26454 inline_entry_data_table.
26455 * final.c (reemit_insn_block_notes): Handle inline entry notes.
26456 (final_scan_insn, notice_source_line): Likewise.
26457 (rest_of_clean_state): Skip inline entry markers.
26458 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
26459 markers.
26460 * gimple.c (gimple_build_debug_inline_entry): New.
26461 * gimple.h (enum gimple_debug_subcode): Add
26462 GIMPLE_DEBUG_INLINE_ENTRY.
26463 (gimple_build_debug_inline_entry): Declare.
26464 (gimple_debug_inline_entry_p): New.
26465 (gimple_debug_nonbind_marker_p): Adjust.
26466 * insn-notes.def (INLINE_ENTRY): New.
26467 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
26468 inline entry marker notes.
26469 (print_insn): Likewise.
26470 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
26471 (INSN_DEBUG_MARKER_KIND): Likewise.
26472 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
26473 * tree-inline.c (expand_call_inline): Build and insert
26474 debug_inline_entry stmt.
26475 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
26476 inline entry blocks early, if nonbind markers are enabled.
26477 (dump_scope_block): Dump fragment info.
26478 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
26479 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
26480 (gimple_build_debug_inline_entry): New.
26481 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
26482 Enable/disable inline entry points too.
26483 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
26484 (DEBUG_INSN): Describe inline entry markers.
26485
26486 * common.opt (gvariable-location-views): New.
26487 (gvariable-location-views=incompat5): New.
26488 * config.in: Rebuilt.
26489 * configure: Rebuilt.
26490 * configure.ac: Test assembler for view support.
26491 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
26492 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
26493 * dwarf2out.c (var_loc_view): New typedef.
26494 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
26495 (dwarf2out_locviews_in_attribute): New.
26496 (dwarf2out_locviews_in_loclist): New.
26497 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
26498 (enum dw_line_info_opcode): Add LI_adv_address.
26499 (struct dw_line_info_table): Add view.
26500 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
26501 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
26502 (zero_view_p): New variable.
26503 (ZERO_VIEW_P): New macro.
26504 (output_asm_line_debug_info): New.
26505 (struct var_loc_node): Add view.
26506 (add_AT_view_list, AT_loc_list): New.
26507 (add_var_loc_to_decl): Add view param. Test it against last.
26508 (new_loc_list): Add view params. Record them.
26509 (AT_loc_list_ptr): Handle loc and view lists.
26510 (view_list_to_loc_list_val_node): New.
26511 (print_dw_val): Handle dw_val_class_view_list.
26512 (size_of_die): Likewise.
26513 (value_format): Likewise.
26514 (loc_list_has_views): New.
26515 (gen_llsym): Set vl_symbol too.
26516 (maybe_gen_llsym, skip_loc_list_entry): New.
26517 (dwarf2out_maybe_output_loclist_view_pair): New.
26518 (output_loc_list): Output view list or entries too.
26519 (output_view_list_offset): New.
26520 (output_die): Handle dw_val_class_view_list.
26521 (output_dwarf_version): New.
26522 (output_compilation_unit_header): Use it.
26523 (output_skeleton_debug_sections): Likewise.
26524 (output_rnglists, output_line_info): Likewise.
26525 (output_pubnames, output_aranges): Update version comments.
26526 (output_one_line_info_table): Output view numbers in asm comments.
26527 (dw_loc_list): Determine current endview, pass it to new_loc_list.
26528 Call maybe_gen_llsym.
26529 (loc_list_from_tree_1): Adjust.
26530 (add_AT_location_description): Create view list attribute if
26531 needed, check it's absent otherwise.
26532 (convert_cfa_to_fb_loc_list): Adjust.
26533 (maybe_emit_file): Call output_asm_line_debug_info for test.
26534 (dwarf2out_var_location): Reset views as needed. Precompute
26535 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
26536 attribute. Set view.
26537 (new_line_info_table): Reset next view.
26538 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
26539 (dwarf2out_source_line): Likewise. Output view resets and labels to
26540 the assembler, or select appropriate line info opcodes.
26541 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
26542 (optimize_string_length): Catch it. Adjust.
26543 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
26544 dw_val_class_view_list, and remove it if no longer needed.
26545 (hash_loc_list): Hash view numbers.
26546 (loc_list_hasher::equal): Compare them.
26547 (optimize_location_lists): Check whether a view list symbol is
26548 needed, and whether the locview attribute is present, and
26549 whether they match. Remove the locview attribute if no longer
26550 needed.
26551 (index_location_lists): Call skip_loc_list_entry for test.
26552 (dwarf2out_finish): Call output_asm_line_debug_info for test.
26553 Use output_dwarf_version.
26554 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
26555 (struct dw_val_node): Add val_view_list.
26556 * final.c (SEEN_NEXT_VIEW): New.
26557 (set_next_view_needed): New.
26558 (clear_next_view_needed): New.
26559 (maybe_output_next_view): New.
26560 (final_start_function): Rename to...
26561 (final_start_function_1): ... this. Take pointer to FIRST,
26562 add SEEN parameter. Emit param bindings in the initial view.
26563 (final_start_function): Reintroduce SEEN-less interface.
26564 (final): Rename to...
26565 (final_1): ... this. Take SEEN parameter. Output final pending
26566 next view at the end.
26567 (final): Reintroduce seen-less interface.
26568 (final_scan_insn): Output pending next view before switching
26569 sections or ending a block. Mark the next view as needed when
26570 outputting variable locations. Notify debug backend of section
26571 changes, and of location view changes.
26572 (rest_of_handle_final): Adjust.
26573 * toplev.c (process_options): Autodetect value for debug variable
26574 location views option. Warn on incompat5 without -gdwarf-5.
26575 * doc/invoke.texi (gvariable-location-views): New.
26576 (gvariable-location-views=incompat5): New.
26577 (gno-variable-location-views): New.
26578
26579 2018-02-08 David Malcolm <dmalcolm@redhat.com>
26580
26581 PR tree-optimization/84136
26582 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
26583 that the result of find_edge is non-NULL.
26584
26585 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26586
26587 PR target/83008
26588 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
26589 storing integer register in SImode. Fix cost of 256 and 512
26590 byte aligned SSE register store.
26591
26592 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26593
26594 * config/i386/i386.c (ix86_multiplication_cost): Fix
26595 multiplication cost for TARGET_AVX512DQ.
26596
26597 2018-02-08 Marek Polacek <polacek@redhat.com>
26598
26599 PR tree-optimization/84238
26600 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
26601 get_range_strlen.
26602
26603 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26604
26605 PR tree-optimization/84265
26606 * tree-vect-stmts.c (vectorizable_store): Don't treat
26607 VMAT_CONTIGUOUS accesses as grouped.
26608 (vectorizable_load): Likewise.
26609
26610 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26611
26612 PR tree-optimization/81635
26613 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
26614 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
26615 (test_round_for_mask): New functions.
26616 (wide_int_cc_tests): Call test_round_for_mask.
26617 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
26618 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
26619 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
26620 range returned by get_range_info.
26621
26622 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26623
26624 PR ipa/81360
26625 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
26626 * symtab.c: Include builtins.h
26627 (symtab_node::output_to_lto_symbol_table_p): Move here
26628 from lto-streamer-out.c:output_symbol_p.
26629 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
26630 (output_symbol_p): Move all logic to symtab.c
26631 (produce_symtab): Update.
26632
26633 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26634
26635 * config/s390/s390-opts.h (enum indirect_branch): Define.
26636 * config/s390/s390-protos.h (s390_return_addr_from_memory)
26637 (s390_indirect_branch_via_thunk)
26638 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
26639 (enum s390_indirect_branch_type): Define.
26640 * config/s390/s390.c (struct s390_frame_layout, struct
26641 machine_function): Remove.
26642 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
26643 (indirect_branch_table_label_no, indirect_branch_table_name):
26644 Define variables.
26645 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
26646 (enum s390_indirect_branch_option): Define.
26647 (s390_return_addr_from_memory): New function.
26648 (s390_handle_string_attribute): New function.
26649 (s390_attribute_table): Add new attribute handler.
26650 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
26651 (s390_indirect_branch_via_thunk): New function.
26652 (s390_indirect_branch_via_inline_thunk): New function.
26653 (s390_function_ok_for_sibcall): When jumping via thunk disallow
26654 sibling call optimization for non z10 compiles.
26655 (s390_emit_call): Force indirect branch target to be a single
26656 register. Add r1 clobber for non-z10 compiles.
26657 (s390_emit_epilogue): Emit return jump via return_use expander.
26658 (s390_reorg): Handle JUMP_INSNs as execute targets.
26659 (s390_option_override_internal): Perform validity checks for the
26660 new command line options.
26661 (s390_indirect_branch_attrvalue): New function.
26662 (s390_indirect_branch_settings): New function.
26663 (s390_set_current_function): Invoke s390_indirect_branch_settings.
26664 (s390_output_indirect_thunk_function): New function.
26665 (s390_code_end): Implement target hook.
26666 (s390_case_values_threshold): Implement target hook.
26667 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
26668 macros.
26669 * config/s390/s390.h (struct s390_frame_layout)
26670 (struct machine_function): Move here from s390.c.
26671 (TARGET_INDIRECT_BRANCH_NOBP_RET)
26672 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
26673 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
26674 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
26675 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
26676 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
26677 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
26678 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
26679 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
26680 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
26681 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
26682 (mnemonic attribute): Add values which aren't recognized
26683 automatically.
26684 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
26685 pattern for branch conversion. Fix mnemonic attribute.
26686 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
26687 indirect branch via thunk if requested.
26688 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
26689 ("*indirect_jump"): Disable for branch conversion using out of
26690 line thunks.
26691 ("indirect_jump_via_thunk<mode>_z10")
26692 ("indirect_jump_via_thunk<mode>")
26693 ("indirect_jump_via_inlinethunk<mode>_z10")
26694 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26695 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26696 ("casesi_jump_via_inlinethunk<mode>_z10")
26697 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26698 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26699 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26700 ("*indirect2_jump"): Disable for branch conversion.
26701 ("casesi_jump"): Turn into expander and expand patterns for branch
26702 conversion.
26703 ("return_use"): New expander.
26704 ("*return"): Emit return via thunk and rename it to ...
26705 ("*return<mode>"): ... this one.
26706 * config/s390/s390.opt: Add new options and and enum for the
26707 option values.
26708
26709 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26710
26711 * lra-constraints.c (match_reload): Unconditionally use
26712 gen_lowpart_SUBREG, rather than selecting between that
26713 and equivalent gen_rtx_SUBREG code.
26714
26715 2018-02-08 Richard Biener <rguenther@suse.de>
26716
26717 PR tree-optimization/84233
26718 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26719 changed flag instead of boguously re-using phi_inserted.
26720
26721 2018-02-08 Martin Jambor <mjambor@suse.cz>
26722
26723 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26724 static local variables.
26725
26726 2018-02-08 Richard Biener <rguenther@suse.de>
26727
26728 PR tree-optimization/84278
26729 * tree-vect-stmts.c (vectorizable_store): When looking for
26730 smaller vector types to perform grouped strided loads/stores
26731 make sure the mode is supported by the target.
26732 (vectorizable_load): Likewise.
26733
26734 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26735
26736 * config/aarch64/aarch64.c (aarch64_components_for_bb):
26737 Increase LDP/STP opportunities by adding adjacent callee-saves.
26738
26739 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26740
26741 PR rtl-optimization/84068
26742 PR rtl-optimization/83459
26743 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26744
26745 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
26746
26747 PR tree-optimization/84224
26748 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26749 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26750 non-zero arguments.
26751
26752 2018-02-07 Iain Sandoe <iain@codesourcery.com>
26753
26754 PR target/84113
26755 * config/rs6000/altivec.md (*restore_world): Remove LR use.
26756 * config/rs6000/predicates.md (restore_world_operation): Adjust op
26757 count, remove one USE.
26758
26759 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
26760
26761 * doc/install.texi (Configuration): Document the
26762 --with-long-double-format={ibm,ieee} PowerPC configuration
26763 options.
26764
26765 PR target/84154
26766 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
26767 Convert from define_expand to be define_insn_and_split. Rework
26768 float/double/_Float128 conversions to QI/HI/SImode to work with
26769 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
26770 conversions to QI/HImode types did a store and then a load to
26771 truncate the value. For conversions to VSX registers, don't split
26772 the insn, instead emit the code directly. Use the code iterator
26773 any_fix to combine signed and unsigned conversions.
26774 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
26775 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
26776 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26777 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
26778 (fix_<mode>di2_hw): Likewise.
26779 (fixuns_<mode>di2_hw): Likewise.
26780 (fix_<mode>si2_hw): Likewise.
26781 (fixuns_<mode>si2_hw): Likewise.
26782 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
26783 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26784 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
26785 fix<uns>_trunc<SFDF:mode>si2_p8.
26786 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
26787 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
26788 (fix<uns>_<mode>_mem): Likewise.
26789 (fctiw<u>z_<mode>_mem): Likewise.
26790 (fix<uns>_<mode>_mem): Likewise.
26791 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
26792 the register allocator from doing a direct move to the GPRs to do
26793 a store, and instead use the ISA 3.0 store byte/half-word from
26794 vector register instruction. For IEEE 128-bit floating point,
26795 also optimize stores of 32-bit ints.
26796 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
26797
26798 2018-02-07 Alan Hayward <alan.hayward@arm.com>
26799
26800 * genextract.c (push_pathstr_operand): New function to support
26801 [a-zA-Z].
26802 (walk_rtx): Call push_pathstr_operand.
26803 (print_path): Support [a-zA-Z].
26804
26805 2018-02-07 Richard Biener <rguenther@suse.de>
26806
26807 PR tree-optimization/84037
26808 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
26809 (cse_and_gimplify_to_preheader): Declare.
26810 (vect_get_place_in_interleaving_chain): Likewise.
26811 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26812 ivexpr_map.
26813 (_loop_vec_info::~_loop_vec_info): Delete it.
26814 (cse_and_gimplify_to_preheader): New function.
26815 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
26816 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
26817 (vectorizable_load): Likewise. For grouped stores always base
26818 the IV on the first element.
26819 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
26820 condition before gimplifying.
26821
26822 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26823
26824 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26825 *DIV_EXPR and *MOD_EXPR.
26826
26827 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
26828
26829 PR target/84248
26830 * config/i386/i386.c (ix86_option_override_internal): Mask out
26831 the CF_SET bit when checking -fcf-protection.
26832
26833 2018-02-07 Tom de Vries <tom@codesourcery.com>
26834
26835 PR libgomp/84217
26836 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26837 enough.
26838
26839 2018-02-07 Richard Biener <rguenther@suse.de>
26840
26841 PR tree-optimization/84204
26842 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26843 this place.
26844
26845 PR tree-optimization/84205
26846 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26847 special-case isl_ast_op_zdiv_r.
26848
26849 PR tree-optimization/84223
26850 * graphite-scop-detection.c (gather_bbs::before_dom_children):
26851 Only add conditions from within the region.
26852 (gather_bbs::after_dom_children): Adjust.
26853
26854 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
26855
26856 PR target/84209
26857 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26858 * config/avr/avr.md: Only post-reload split REG-REG moves if
26859 either register is GENERAL_REG_P.
26860
26861 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26862
26863 PR tree-optimization/84235
26864 * tree-ssa-scopedtables.c
26865 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26866 if the subtraction is performed in floating point type where NaNs are
26867 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26868 build 1. Formatting fix.
26869
26870 2018-02-06 Jakub Jelinek <jakub@redhat.com>
26871
26872 PR target/84146
26873 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26874 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26875 and skip it regardless of bb boundaries. Use CALL_P macro,
26876 don't test INSN_P (insn) together with CALL_P or JUMP_P check
26877 unnecessarily, formatting fix.
26878
26879 2018-02-06 Michael Collison <michael.collison@arm.com>
26880
26881 * config/arm/thumb2.md:
26882 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26883 (*thumb_mov_notscc): Ditto.
26884
26885 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
26886
26887 PR target/84154
26888 * config/rs6000/rs6000.md (su code attribute): Use "u" for
26889 unsigned_fix, not "s".
26890
26891 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26892
26893 * configure.ac (gcc_fn_eh_frame_ro): New function.
26894 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26895 correct .eh_frame permissions.
26896 * configure: Regenerate.
26897
26898 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
26899
26900 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26901 irrelevant options.
26902
26903 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26904
26905 * config/rs6000/rs6000.c (rs6000_option_override_internal):
26906 Display warning message for -mno-speculate-indirect-jumps.
26907
26908 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
26909
26910 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26911 Undocumented.
26912 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26913
26914 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
26915
26916 PR tree-optimization/84225
26917 * tree-eh.c (find_trapping_overflow): Only call
26918 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26919
26920 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26921
26922 PR target/84145
26923 * config/i386/i386.c: Reimplement the check of possible options
26924 -mibt/-mshstk conbination. Change error messages.
26925 * doc/invoke.texi: Fix a typo: remove extra '='.
26926
26927 2018-02-06 Marek Polacek <polacek@redhat.com>
26928
26929 PR tree-optimization/84228
26930 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26931
26932 2018-02-06 Tamar Christina <tamar.christina@arm.com>
26933
26934 PR target/82641
26935 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26936 emitted arch directives.
26937 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26938 __ARM_FEATURE_COPROC before changing architectures.
26939
26940 2018-02-06 Richard Biener <rguenther@suse.de>
26941
26942 * config/i386/i386.c (print_reg): Fix typo.
26943 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26944
26945 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
26946
26947 * configure: Regenerate.
26948
26949 2018-02-05 Martin Sebor <msebor@redhat.com>
26950
26951 PR tree-optimization/83369
26952 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26953 inlining context.
26954
26955 2018-02-05 Martin Liska <mliska@suse.cz>
26956
26957 * doc/invoke.texi: Cherry-pick upstream r323995.
26958
26959 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
26960
26961 * ira.c (ira_init_register_move_cost): Adjust comment.
26962
26963 2018-02-05 Martin Liska <mliska@suse.cz>
26964
26965 PR gcov-profile/84137
26966 * doc/gcov.texi: Fix typo in documentation.
26967
26968 2018-02-05 Martin Liska <mliska@suse.cz>
26969
26970 PR gcov-profile/83879
26971 * doc/gcov.texi: Document necessity of --dynamic-list-data when
26972 using dlopen functionality.
26973
26974 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
26975
26976 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26977 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26978 _mm_maskz_range_ss, _mm_mask_range_round_ss,
26979 _mm_maskz_range_round_ss): New intrinsics.
26980 (__builtin_ia32_rangesd128_round)
26981 (__builtin_ia32_rangess128_round): Remove.
26982 (__builtin_ia32_rangesd128_mask_round,
26983 __builtin_ia32_rangess128_mask_round): New builtins.
26984 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26985 __builtin_ia32_rangess128_round): Remove.
26986 (__builtin_ia32_rangesd128_mask_round,
26987 __builtin_ia32_rangess128_mask_round): New builtins.
26988 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26989 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26990 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26991 "<round_saeonly_constraint>")): Changed to ...
26992 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26993 "<round_saeonly_scalar_constraint>")): ... this.
26994 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26995 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26996 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26997 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26998 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26999
27000 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
27001
27002 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
27003 options.
27004 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
27005 Remove all values except native, 8540 and 8548.
27006
27007 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
27008
27009 * config/i386/i386.c (ix86_output_function_return): Pass
27010 INVALID_REGNUM, instead of -1, as invalid register number to
27011 indirect_thunk_name and output_indirect_thunk.
27012
27013 2018-02-02 Julia Koval <julia.koval@intel.com>
27014
27015 * config.gcc: Add -march=icelake.
27016 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
27017 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
27018 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
27019 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
27020 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
27021 (processor_target_table): Add icelake.
27022 (ix86_option_override_internal): Handle new PTAs.
27023 (get_builtin_code_for_version): Handle icelake.
27024 (M_INTEL_COREI7_ICELAKE): New.
27025 (fold_builtin_cpu): Handle icelake.
27026 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
27027 * doc/invoke.texi: Add -march=icelake.
27028
27029 2018-02-02 Julia Koval <julia.koval@intel.com>
27030
27031 * config/i386/i386.c (ix86_option_override_internal): Change flags type
27032 to wide_int_bitmask.
27033 * wide-int-bitmask.h: New.
27034
27035 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27036
27037 PR target/84066
27038 * config/i386/i386.md: Replace Pmode with word_mode in
27039 builtin_setjmp_setup and builtin_longjmp to support x32.
27040
27041 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
27042
27043 PR target/56010
27044 PR target/83743
27045 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
27046 #include "opts.h".
27047 (rs6000_supported_cpu_names): New static variable.
27048 (linux_cpu_translation_table): Likewise.
27049 (elf_platform) <cpu>: Define new static variable and use it.
27050 Translate kernel AT_PLATFORM name to canonical name if needed.
27051 Error if platform name is unknown.
27052
27053 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
27054
27055 PR target/84089
27056 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
27057
27058 2018-02-01 Jeff Law <law@redhat.com>
27059
27060 PR target/84128
27061 * config/i386/i386.c (release_scratch_register_on_entry): Add new
27062 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
27063 the scratch if RELEASE_VIA_POP is false.
27064 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
27065 If we have to save a temporary register, decrement SIZE appropriately.
27066 Pass new arguments to release_scratch_register_on_entry.
27067 (ix86_adjust_stack_and_probe): Likewise.
27068 (ix86_emit_probe_stack_range): Pass new arguments to
27069 release_scratch_register_on_entry.
27070
27071 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
27072
27073 PR rtl-optimization/84157
27074 * combine.c (change_zero_ext): Use REG_P predicate in
27075 front of HARD_REGISTER_P predicate.
27076
27077 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
27078
27079 * config/avr/avr.c (avr_option_override): Move disabling of
27080 -fdelete-null-pointer-checks to...
27081 * common/config/avr/avr-common.c (avr_option_optimization_table):
27082 ...here.
27083
27084 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27085
27086 PR tree-optimization/81635
27087 * tree-data-ref.c (split_constant_offset_1): For types that
27088 wrap on overflow, try to use range info to prove that wrapping
27089 cannot occur.
27090
27091 2018-02-01 Renlin Li <renlin.li@arm.com>
27092
27093 PR target/83370
27094 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
27095 TAILCALL_ADDR_REGS.
27096 (aarch64_register_move_cost): Likewise.
27097 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
27098 TAILCALL_ADDR_REGS.
27099 (REG_CLASS_NAMES): Likewise.
27100 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
27101 TAILCALL_ADDR_REGS. Remove IP registers.
27102 * config/aarch64/aarch64.md (Ucs): Update register constraint.
27103
27104 2018-02-01 Richard Biener <rguenther@suse.de>
27105
27106 * domwalk.h (dom_walker::dom_walker): Add additional constructor
27107 for specifying RPO order and allow NULL for that.
27108 * domwalk.c (dom_walker::dom_walker): Likewise.
27109 (dom_walker::walk): Handle NULL RPO order.
27110 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
27111 in RPO order.
27112 (rewrite_update_dom_walker): Likewise.
27113 (mark_def_dom_walker): Likewise.
27114
27115 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27116
27117 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
27118 (aarch64_maybe_expand_sve_subreg_move): Declare.
27119 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
27120 * config/aarch64/predicates.md (aarch64_any_register_operand): New
27121 predicate.
27122 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
27123 that are semantically a reverse operation.
27124 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
27125 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
27126 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
27127 functions.
27128 (aarch64_can_change_mode_class): For big-endian, forbid changes
27129 between two SVE modes if they have different element sizes.
27130
27131 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27132
27133 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
27134 the TImode handling for big-endian targets.
27135
27136 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27137
27138 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
27139 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
27140 not just bytes.
27141 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
27142 Remove BSWAP handing for big-endian targets and use the form of
27143 LD1RQ appropariate for the mode.
27144
27145 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27146
27147 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
27148 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
27149 duplicated element.
27150
27151 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27152
27153 PR tearget/83845
27154 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
27155 check for operands that need to go through aarch64_sve_reload_be.
27156
27157 2018-02-01 Jakub Jelinek <jakub@redhat.com>
27158
27159 PR tree-optimization/81661
27160 PR tree-optimization/84117
27161 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
27162 * tree-eh.c: Include gimplify.h.
27163 (find_trapping_overflow, replace_trapping_overflow,
27164 rewrite_to_non_trapping_overflow): New functions.
27165 * tree-vect-loop.c: Include tree-eh.h.
27166 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
27167 * tree-data-ref.c: Include tree-eh.h.
27168 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
27169
27170 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
27171
27172 PR rtl-optimization/84123
27173 * combine.c (change_zero_ext): Check if hard register satisfies
27174 can_change_dest_mode before calling gen_lowpart_SUBREG.
27175
27176 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
27177
27178 PR target/82444
27179 * ira.c (ira_init_register_move_cost): Remove assert.
27180
27181 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27182
27183 PR rtl-optimization/84071
27184 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
27185 * doc/tm.texi: Regenerate.
27186
27187 2018-01-31 Richard Biener <rguenther@suse.de>
27188
27189 PR tree-optimization/84132
27190 * tree-data-ref.c (analyze_miv_subscript): Properly
27191 check whether evolution_function_is_affine_multivariate_p
27192 before calling gcd_of_steps_may_divide_p.
27193
27194 2018-01-31 Julia Koval <julia.koval@intel.com>
27195
27196 PR target/83618
27197 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
27198 * config/i386/i386.md (rdpid_rex64) New.
27199 (rdpid): Make 32bit only.
27200
27201 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
27202
27203 PR lto/84105
27204 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
27205 an IDENTIFIER_NODE for FUNCTION_TYPE's.
27206
27207 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27208
27209 Revert
27210 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27211
27212 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27213
27214 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27215
27216 PR rtl-optimization/84071
27217 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
27218 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
27219
27220 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
27221
27222 * config/arc/arc.c (arc_handle_aux_attribute): New function.
27223 (arc_attribute_table): Add 'aux' attribute.
27224 (arc_in_small_data_p): Consider aux like variables.
27225 (arc_is_aux_reg_p): New function.
27226 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
27227 (arc_get_aux_arg): New function.
27228 (prepare_move_operands): Handle aux-register access.
27229 (arc_handle_aux_attribute): New function.
27230 * doc/extend.texi (ARC Variable attributes): Add subsection.
27231
27232 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
27233
27234 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
27235 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
27236 (arc_attribute_table): Add 'uncached' attribute.
27237 (arc_print_operand): Print '.di' flag for uncached memory
27238 accesses.
27239 (arc_in_small_data_p): Do not consider for small data the uncached
27240 types.
27241 (arc_is_uncached_mem_p): New function.
27242 * config/arc/predicates.md (compact_store_memory_operand): Check
27243 for uncached memory accesses.
27244 (nonvol_nonimm_operand): Likewise.
27245 * doc/extend.texi (ARC Type Attribute): New subsection.
27246
27247 2018-01-31 Jakub Jelinek <jakub@redhat.com>
27248
27249 PR c/84100
27250 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
27251 falign-loops=): Add Optimization flag.
27252
27253 2018-01-30 Jeff Law <law@redhat.com>
27254
27255 PR target/84064
27256 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
27257 INT_REGISTERS_SAVED. Check it prior to calling
27258 get_scratch_register_on_entry.
27259 (ix86_adjust_stack_and_probe): Similarly.
27260 (ix86_emit_probe_stack_range): Similarly.
27261 (ix86_expand_prologue): Corresponding changes.
27262
27263 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27264
27265 PR target/40411
27266 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
27267 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
27268
27269 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
27270
27271 PR target/84112
27272 * lra-constraints.c (curr_insn_transform): Process AND in the
27273 address.
27274
27275 2018-01-30 Jakub Jelinek <jakub@redhat.com>
27276
27277 PR rtl-optimization/83986
27278 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
27279 dependence against last_pending_memory_flush in addition to
27280 pending_jump_insns.
27281
27282 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
27283
27284 PR tree-optimization/81611
27285 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
27286 copies.
27287
27288 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27289
27290 PR target/83758
27291 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
27292 a reg rtx.
27293
27294 2018-01-30 Richard Biener <rguenther@suse.de>
27295 Jakub Jelinek <jakub@redhat.com>
27296
27297 PR tree-optimization/84111
27298 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
27299 inner loops added during recursion, as they don't have up-to-date
27300 SSA form.
27301
27302 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
27303
27304 PR ipa/81360
27305 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
27306 (can_inline_edge_by_limits_p): ... here.
27307 (can_early_inline_edge_p, check_callers,
27308 update_caller_keys, update_callee_keys, recursive_inlining,
27309 add_new_edges_to_heap, speculation_useful_p,
27310 inline_small_functions,
27311 inline_small_functions, flatten_function,
27312 inline_to_all_callers_1): Update.
27313
27314 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
27315
27316 * profile-count.c (profile_count::combine_with_ipa_count): Handle
27317 zeros correctly.
27318
27319 2018-01-30 Richard Biener <rguenther@suse.de>
27320
27321 PR tree-optimization/83008
27322 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
27323 invariant and constant vector uses in stmts when they need
27324 more than one stmt.
27325
27326 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27327
27328 PR bootstrap/84017
27329 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
27330 * configure: Regenerate.
27331
27332 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
27333
27334 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
27335 pattern.
27336 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
27337 Use gen_rtx_REG rather than gen_lowpart.
27338
27339 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
27340
27341 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
27342 rather than 0 when creating partial subregs.
27343
27344 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
27345
27346 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
27347 of usage.
27348
27349 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
27350
27351 PR target/81550
27352 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
27353 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
27354 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
27355 flags. This restores the settings used before the 2017-07-24.
27356 Turning off pre increment/decrement/modify allows IVOPTS to
27357 optimize DF/SF loops where the index is an int.
27358
27359 2018-01-29 Richard Biener <rguenther@suse.de>
27360 Kelvin Nilsen <kelvin@gcc.gnu.org>
27361
27362 PR bootstrap/80867
27363 * tree-vect-stmts.c (vectorizable_call): Don't call
27364 targetm.vectorize_builtin_md_vectorized_function if callee is
27365 NULL.
27366
27367 2018-01-22 Carl Love <cel@us.ibm.com>
27368
27369 * doc/extend.tex: Fix typo in second arg in
27370 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
27371
27372 2018-01-29 Richard Biener <rguenther@suse.de>
27373
27374 PR tree-optimization/84086
27375 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
27376 (flush_ssaname_freelist): When SSA names were released reset
27377 the SCEV hash table.
27378
27379 2018-01-29 Richard Biener <rguenther@suse.de>
27380
27381 PR tree-optimization/84057
27382 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
27383 removed paths when removing edges.
27384
27385 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
27386
27387 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
27388 -mfunction-return=@var{choice}.
27389
27390 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
27391
27392 PR diagnostic/84034
27393 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
27394 Handle CR like TAB.
27395 (layout::print_source_line): Likewise.
27396 (test_get_line_width_without_trailing_whitespace): Add test cases.
27397
27398 2018-01-27 Jakub Jelinek <jakub@redhat.com>
27399
27400 PR middle-end/84040
27401 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
27402 debug insns.
27403
27404 2018-01-26 Jim Wilson <jimw@sifive.com>
27405
27406 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
27407
27408 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
27409 specified.
27410
27411 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27412
27413 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
27414 and CMP + SUB-immediate -> SUBS.
27415
27416 2018-01-26 Martin Sebor <msebor@redhat.com>
27417
27418 PR tree-optimization/83896
27419 * tree-ssa-strlen.c (get_string_len): Rename...
27420 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
27421 Avoid assuming length is constant.
27422 (handle_char_store): Use HOST_WIDE_INT for string length.
27423
27424 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
27425
27426 PR target/81763
27427 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
27428 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
27429
27430 2018-01-26 Richard Biener <rguenther@suse.de>
27431
27432 PR rtl-optimization/84003
27433 * dse.c (record_store): Only record redundant stores when
27434 the earlier store aliases at least all accesses the later one does.
27435
27436 2018-01-26 Jakub Jelinek <jakub@redhat.com>
27437
27438 PR rtl-optimization/83985
27439 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
27440 REG_CFA_RESTORE insns.
27441 (delete_unmarked_insns): Don't ignore separate shrink wrapping
27442 REG_CFA_RESTORE insns here.
27443
27444 PR c/83989
27445 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
27446 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
27447
27448 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27449
27450 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
27451 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
27452 (arc_init): Likewise.
27453 (arc_override_options): Likewise.
27454 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
27455 value.
27456 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
27457 support.
27458 * config/arc/arc.h (TARGET_DBNZ): Define.
27459 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
27460 properly set the tune attribute.
27461 (dbnz): Use TARGET_DBNZ guard.
27462 * config/arc/arc.opt (mtune): Add core3 option.
27463
27464 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27465
27466 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
27467 recognize new pic like addresses.
27468 (arc_delegitimize_address): Clean up.
27469
27470 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27471
27472 * config/arc/arc-arches.def: Option mrf16 valid for all
27473 architectures.
27474 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
27475 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
27476 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
27477 * config/arc/arc-tables.opt: Regenerate.
27478 * config/arc/arc.c (arc_conditional_register_usage): Handle
27479 reduced register file case.
27480 (arc_file_start): Set must have build attributes.
27481 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
27482 mrf16 option value.
27483 * config/arc/arc.opt (mrf16): Add new option.
27484 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
27485 * config/arc/genmultilib.awk: Handle new mrf16 option.
27486 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
27487 * config/arc/t-multilib: Regenerate.
27488 * doc/invoke.texi (ARC Options): Document mrf16 option.
27489
27490 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27491
27492 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
27493 * config/arc/arc.c (arc_handle_secure_attribute): New function.
27494 (arc_attribute_table): Add 'secure_call' attribute.
27495 (arc_print_operand): Print secure call operand.
27496 (arc_function_ok_for_sibcall): Don't optimize tail calls when
27497 secure.
27498 (arc_is_secure_call_p): New function. * config/arc/arc.md
27499 (call_i): Add support for sjli instruction.
27500 (call_value_i): Likewise.
27501 * config/arc/constraints.md (Csc): New constraint.
27502
27503 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27504 John Eric Martin <John.Martin@emmicro-us.com>
27505
27506 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
27507 * config/arc/arc.c (_arc_jli_section): New struct.
27508 (arc_jli_section): New type.
27509 (rc_jli_sections): New static variable.
27510 (arc_handle_jli_attribute): New function.
27511 (arc_attribute_table): Add jli_always and jli_fixed attribute.
27512 (arc_file_end): New function.
27513 (TARGET_ASM_FILE_END): Define.
27514 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
27515 (arc_add_jli_section): New function.
27516 (jli_call_scan): Likewise.
27517 (arc_reorg): Call jli_call_scan.
27518 (arc_output_addsi): Remove 'S' from printing asm operand.
27519 (arc_is_jli_call_p): New function.
27520 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
27521 operand.
27522 (movhi_insn): Likewise.
27523 (movsi_insn): Likewise.
27524 (movsi_set_cc_insn): Likewise.
27525 (loadqi_update): Likewise.
27526 (load_zeroextendqisi_update): Likewise.
27527 (load_signextendqisi_update): Likewise.
27528 (loadhi_update): Likewise.
27529 (load_zeroextendhisi_update): Likewise.
27530 (load_signextendhisi_update): Likewise.
27531 (loadsi_update): Likewise.
27532 (loadsf_update): Likewise.
27533 (movsicc_insn): Likewise.
27534 (bset_insn): Likewise.
27535 (bxor_insn): Likewise.
27536 (bclr_insn): Likewise.
27537 (bmsk_insn): Likewise.
27538 (bicsi3_insn): Likewise.
27539 (cmpsi_cc_c_insn): Likewise.
27540 (movsi_ne): Likewise.
27541 (movsi_cond_exec): Likewise.
27542 (clrsbsi2): Likewise.
27543 (norm_f): Likewise.
27544 (normw): Likewise.
27545 (swap): Likewise.
27546 (divaw): Likewise.
27547 (flag): Likewise.
27548 (sr): Likewise.
27549 (kflag): Likewise.
27550 (ffs): Likewise.
27551 (ffs_f): Likewise.
27552 (fls): Likewise.
27553 (call_i): Remove 'S' asm letter, add jli instruction.
27554 (call_value_i): Likewise.
27555 * config/arc/arc.op (mjli-always): New option.
27556 * config/arc/constraints.md (Cji): New constraint.
27557 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
27558 operand.
27559 (subsf3_fpx): Likewise.
27560 (mulsf3_fpx): Likewise.
27561 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
27562 asm operand.
27563 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
27564 function attrbutes.
27565 * doc/invoke.texi (ARC): Document mjli-always option.
27566
27567 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
27568
27569 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
27570 avoid addition with 0 and use incw and decw where possible.
27571
27572 2018-01-26 Richard Biener <rguenther@suse.de>
27573
27574 PR tree-optimization/81082
27575 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
27576 association if it requires casting to unsigned.
27577 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
27578 from fold_plusminus_mult_expr to catch important cases late when
27579 range info is available.
27580
27581 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27582
27583 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
27584 * configure.ac (hidden_linkonce): New test.
27585 * configure: Regenerate.
27586 * config.in: Regenerate.
27587
27588 2018-01-26 Julia Koval <julia.koval@intel.com>
27589
27590 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
27591 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
27592 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
27593 _mm_mask_bitshuffle_epi64_mask): Fix type.
27594 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
27595 USI_FTYPE_V4DI_V4DI_USI): Remove.
27596 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
27597 __builtin_ia32_vpshufbitqmb256_mask,
27598 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
27599 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
27600 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
27601
27602 2018-01-26 Alan Modra <amodra@gmail.com>
27603
27604 PR target/84033
27605 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
27606 UNSPEC_VBPERMQ. Sort other unspecs.
27607
27608 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
27609
27610 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
27611
27612 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
27613
27614 PR middle-end/83055
27615 * predict.c (drop_profile): Do not push/pop cfun; update also
27616 node->count.
27617 (handle_missing_profiles): Fix logic looking for zero profiles.
27618
27619 2018-01-25 Jakub Jelinek <jakub@redhat.com>
27620
27621 PR middle-end/83977
27622 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
27623 on functions with #pragma omp declare simd or functions with simd
27624 attribute.
27625 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
27626 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
27627 Remove trailing \n from warning_at calls.
27628
27629 2018-01-25 Tom de Vries <tom@codesourcery.com>
27630
27631 PR target/84028
27632 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27633 for neutered workers.
27634
27635 2018-01-24 Joseph Myers <joseph@codesourcery.com>
27636
27637 PR target/68467
27638 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
27639 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
27640
27641 2018-01-24 Jeff Law <law@redhat.com>
27642
27643 PR target/83994
27644 * i386.c (get_probe_interval): Move to earlier point.
27645 (ix86_compute_frame_layout): If -fstack-clash-protection and
27646 the frame is larger than the probe interval, then use pushes
27647 to save registers rather than reg->mem moves.
27648 (ix86_expand_prologue): Remove conditional for int_registers_saved
27649 assertion.
27650
27651 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
27652
27653 PR target/84014
27654 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
27655 min/max for never referenced object.
27656
27657 2018-01-24 Jakub Jelinek <jakub@redhat.com>
27658
27659 PR middle-end/83977
27660 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
27661 here.
27662 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
27663 attributes from DECL_ATTRIBUTES (decl) without affecting
27664 DECL_ATTRIBUTES (current_function_decl).
27665 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
27666 functions with non-NULL DECL_ABSTRACT_ORIGIN.
27667
27668 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
27669
27670 PR tree-optimization/83979
27671 * fold-const.c (fold_comparison): Use constant_boolean_node
27672 instead of boolean_{true,false}_node.
27673
27674 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
27675
27676 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
27677 with zero counts.
27678
27679 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27680
27681 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27682 Simplify the clause that sets the length attribute.
27683 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27684 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
27685 clause that sets the length attribute.
27686 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27687
27688 2018-01-24 Tom de Vries <tom@codesourcery.com>
27689
27690 PR target/83589
27691 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
27692 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27693 Add strict parameter.
27694 (prevent_branch_around_nothing): Insert dummy insn between branch to
27695 label and label with no ptx insn inbetween.
27696 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27697
27698 2018-01-24 Tom de Vries <tom@codesourcery.com>
27699
27700 PR target/81352
27701 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27702 for neutered threads in warp.
27703 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27704
27705 2018-01-24 Richard Biener <rguenther@suse.de>
27706
27707 PR tree-optimization/83176
27708 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27709 operands.
27710
27711 2018-01-24 Richard Biener <rguenther@suse.de>
27712
27713 PR tree-optimization/82819
27714 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27715 code generating pluses that are no-ops in the target precision.
27716
27717 2018-01-24 Richard Biener <rguenther@suse.de>
27718
27719 PR middle-end/84000
27720 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27721
27722 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27723
27724 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27725 to merge probabilities.
27726 * predict.c (probably_never_executed): Also mark as cold functions
27727 with global 0 profile and guessed local profile.
27728 * profile-count.c (profile_probability::combine_with_count): New
27729 member function.
27730 * profile-count.h (profile_probability::operator*,
27731 profile_probability::operator*=, profile_probability::operator/,
27732 profile_probability::operator/=): Reduce precision to adjusted
27733 and set value to guessed on contradictory divisions.
27734 (profile_probability::combine_with_freq): Remove.
27735 (profile_probability::combine_wiht_count): Declare.
27736 (profile_count::force_nonzero):: Set to adjusted.
27737 (profile_count::probability_in):: Set quality to adjusted.
27738 * tree-ssa-tail-merge.c (replace_block_by): Use
27739 combine_with_count.
27740
27741 2018-01-23 Andrew Waterman <andrew@sifive.com>
27742 Jim Wilson <jimw@sifive.com>
27743
27744 * config/riscv/riscv.c (riscv_stack_boundary): New.
27745 (riscv_option_override): Set riscv_stack_boundary. Handle
27746 riscv_preferred_stack_boundary_arg.
27747 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27748 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27749 (STACK_BOUNDARY): Set to riscv_stack_boundary.
27750 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27751 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27752 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27753
27754 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
27755
27756 PR target/83905
27757 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27758 of struct ix86_frame.
27759 (ix86_expand_epilogue): Likewise. Add a local variable for
27760 the reg_save_offset field in struct ix86_frame.
27761
27762 2018-01-23 Bin Cheng <bin.cheng@arm.com>
27763
27764 PR tree-optimization/82604
27765 * tree-loop-distribution.c (enum partition_kind): New enum item
27766 PKIND_PARTIAL_MEMSET.
27767 (partition_builtin_p): Support above new enum item.
27768 (generate_code_for_partition): Ditto.
27769 (compute_access_range): Differentiate cases that equality can be
27770 proven at all loops, the innermost loops or no loops.
27771 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
27772 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
27773 (finalize_partitions, distribute_loop): Don't fuse partition of
27774 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
27775 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
27776 parloop is enabled.
27777
27778 2018-01-23 Martin Liska <mliska@suse.cz>
27779
27780 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
27781 order to ignore the predictor.
27782 (PRED_POLYMORPHIC_CALL): Likewise.
27783 (PRED_RECURSIVE_CALL): Likewise.
27784
27785 2018-01-23 Martin Liska <mliska@suse.cz>
27786
27787 * tree-profile.c (tree_profiling): Print function header to
27788 aware reader which function we are working on.
27789 * value-prof.c (gimple_find_values_to_profile): Do not print
27790 not interesting value histograms.
27791
27792 2018-01-23 Martin Liska <mliska@suse.cz>
27793
27794 * profile-count.h (enum profile_quality): Add
27795 profile_uninitialized as the first value. Do not number values
27796 as they are zero based.
27797 (profile_count::verify): Update sanity check.
27798 (profile_probability::verify): Likewise.
27799
27800 2018-01-23 Nathan Sidwell <nathan@acm.org>
27801
27802 * doc/invoke.texi (ffor-scope): Deprecate.
27803
27804 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27805
27806 PR tree-optimization/83510
27807 * domwalk.c (set_all_edges_as_executable): New function.
27808 (dom_walker::dom_walker): Convert bool param
27809 "skip_unreachable_blocks" to enum reachability. Move setup of
27810 edge flags to set_all_edges_as_executable and only do it when
27811 reachability is REACHABLE_BLOCKS.
27812 * domwalk.h (enum dom_walker::reachability): New enum.
27813 (dom_walker::dom_walker): Convert bool param
27814 "skip_unreachable_blocks" to enum reachability.
27815 (set_all_edges_as_executable): New decl.
27816 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
27817 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
27818 "reachability".
27819 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
27820 but converting true to REACHABLE_BLOCKS.
27821 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
27822 * tree-vrp.c
27823 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
27824 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27825 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27826 REACHABLE_BLOCKS.
27827 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27828 if check_all_array_refs will be called.
27829
27830 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27831
27832 * tree.c (selftest::test_location_wrappers): Add more test
27833 coverage.
27834
27835 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27836
27837 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27838 (selftest::test_bit_in_range): Likewise.
27839
27840 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27841
27842 PR testsuite/83888
27843 * doc/sourcebuild.texi (vect_float): Say that the selector
27844 only describes the situation when -funsafe-math-optimizations is on.
27845 (vect_float_strict): Document.
27846
27847 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27848
27849 PR tree-optimization/83965
27850 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27851 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27852 instead of checking only for a reduction.
27853 (vect_recog_widen_sum_pattern): Likewise.
27854
27855 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27856
27857 * predict.c (probably_never_executed): Only use precise profile info.
27858 (compute_function_frequency): Skip after inlining hack since we now
27859 have quality checking.
27860
27861 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27862
27863 * profile-count.h (profile_probability::very_unlikely,
27864 profile_probability::unlikely, profile_probability::even): Set
27865 precision to guessed.
27866
27867 2018-01-23 Richard Biener <rguenther@suse.de>
27868
27869 PR tree-optimization/83963
27870 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27871 Properly terminate dominator walk when crossing the exit edge not
27872 when visiting its source block.
27873
27874 2018-01-23 Jakub Jelinek <jakub@redhat.com>
27875
27876 PR c++/83918
27877 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27878 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27879
27880 2018-01-22 Jakub Jelinek <jakub@redhat.com>
27881
27882 PR tree-optimization/83957
27883 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
27884 semicolon after for body surrounded by braces.
27885
27886 PR tree-optimization/83081
27887 * profile-count.h (profile_probability::split): New method.
27888 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27889 Use profile_probability::split.
27890 (do_compare_rtx_and_jump): Fix adjustment of probabilities
27891 when splitting a single conditional jump into 2.
27892
27893 2018-01-22 David Malcolm <dmalcolm@redhat.com>
27894
27895 PR tree-optimization/69452
27896 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27897 decl.
27898
27899 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27900
27901 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27902 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27903 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27904
27905 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27906
27907 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27908 declaration.
27909 * config/rl78/rl78.md (movdi): New define_expand.
27910 * config/rl78/rl78.c (rl78_split_movdi): New function.
27911
27912 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
27913
27914 PR target/83862
27915 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27916 no longer used.
27917 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27918 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27919 128-bit to produce an UNSPEC move to get the double word with the
27920 signbit and then a shift directly to do signbit.
27921 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27922 implementation with a new version that just does either a direct
27923 move or a regular move. Move memory interface to separate insns.
27924 Move insns so they are next to the expander.
27925 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27926 with signbit move. Split big and little endian case.
27927 (signbit<mode>2_dm_mem_le): Likewise.
27928 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27929 (signbit<mode>2_dm2): Likewise.
27930
27931 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27932
27933 * config/rl78/rl78.md (anddi3): New define_expand.
27934
27935 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27936
27937 * config/rl78/rl78.md (umindi3): New define_expand.
27938
27939 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27940
27941 * config/rl78/rl78.md (smindi3): New define_expand.
27942
27943 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27944
27945 * config/rl78/rl78.md (smaxdi3): New define_expand.
27946
27947 2018-01-22 Carl Love <cel@us.ibm.com>
27948
27949 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27950 LVX_V1TI): Add macro expansion.
27951 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27952 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27953 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27954 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27955 Change check to determine if the instruction is a byte reversing
27956 entry. Fix typo in comment.
27957 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27958 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27959 Add def_builtin calls for new builtins.
27960 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27961 Add define_insn expansion.
27962
27963 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27964
27965 * config/rl78/rl78.md (umaxdi3): New define_expand.
27966
27967 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27968
27969 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27970 for non-QImode registers.
27971
27972 2018-01-22 Richard Biener <rguenther@suse.de>
27973
27974 PR tree-optimization/83963
27975 * graphite-scop-detection.c (scop_detection::get_sese): Delay
27976 including the loop exit block.
27977 (scop_detection::merge_sese): Likewise.
27978 (scop_detection::add_scop): Do it here instead.
27979
27980 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27981
27982 * doc/sourcebuild.texi (arm_softfloat): Document.
27983
27984 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
27985
27986 PR gcc/77734
27987 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27988 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27989 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27990
27991 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27992 David Edelsohn <dje.gcc@gmail.com>
27993
27994 PR target/83946
27995 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27996 Change "crset eq" to "crset 2".
27997 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27998 (*call_indirect_aix<mode>_nospec): Likewise.
27999 (*call_value_indirect_aix<mode>_nospec): Likewise.
28000 (*call_indirect_elfv2<mode>_nospec): Likewise.
28001 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
28002 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
28003 change assembly output from . to $.
28004 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28005 (indirect_jump<mode>_nospec): Change assembly output from . to $.
28006 (*tablejump<mode>_internal1_nospec): Likewise.
28007
28008 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
28009
28010 PR target/80870
28011 * config/sh/sh_optimize_sett_clrt.cc:
28012 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
28013
28014 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
28015
28016 PR tree-optimization/83940
28017 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
28018 offset_dt to vect_constant_def rather than vect_unknown_def_type.
28019 (vect_check_load_store_mask): Add a mask_dt_out parameter and
28020 use it to pass back the definition type.
28021 (vect_check_store_rhs): Likewise rhs_dt_out.
28022 (vect_build_gather_load_calls): Add a mask_dt argument and use
28023 it instead of a call to vect_is_simple_use.
28024 (vectorizable_store): Update calls to vect_check_load_store_mask
28025 and vect_check_store_rhs. Use the dt returned by the latter instead
28026 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
28027 instead of calls to vect_is_simple_use. Pass the scalar rather
28028 than the vector operand to vect_is_simple_use when handling
28029 second and subsequent copies of an rhs value.
28030 (vectorizable_load): Update calls to vect_check_load_store_mask
28031 and vect_build_gather_load_calls. Use the cached mask_dt and
28032 gs_info.offset_dt instead of calls to vect_is_simple_use.
28033
28034 2018-01-20 Jakub Jelinek <jakub@redhat.com>
28035
28036 PR middle-end/83945
28037 * tree-emutls.c: Include gimplify.h.
28038 (lower_emutls_2): New function.
28039 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
28040 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
28041 it before further processing.
28042
28043 PR target/83930
28044 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
28045 UINTVAL (trueop1) instead of INTVAL (op1).
28046
28047 2018-01-19 Jakub Jelinek <jakub@redhat.com>
28048
28049 PR debug/81570
28050 PR debug/83728
28051 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
28052 INCOMING_FRAME_SP_OFFSET if not defined.
28053 (scan_trace): Add ENTRY argument. If true and
28054 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
28055 emit a note to adjust the CFA offset.
28056 (create_cfi_notes): Adjust scan_trace callers.
28057 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
28058 INCOMING_FRAME_SP_OFFSET in the CIE.
28059 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
28060 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
28061 Likewise.
28062 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
28063 * doc/tm.texi: Regenerated.
28064
28065 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28066
28067 PR rtl-optimization/83147
28068 * lra-constraints.c (remove_inheritance_pseudos): Use
28069 lra_substitute_pseudo_within_insn.
28070
28071 2018-01-19 Tom de Vries <tom@codesourcery.com>
28072 Cesar Philippidis <cesar@codesourcery.com>
28073
28074 PR target/83920
28075 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
28076
28077 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
28078
28079 PR target/83790
28080 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
28081 spaces for function labels.
28082
28083 2018-01-19 Martin Liska <mliska@suse.cz>
28084
28085 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
28086 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
28087 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
28088 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
28089 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
28090 (PRED_CONST_RETURN): Change from 69 to 65.
28091 (PRED_NULL_RETURN): Change from 91 to 71.
28092 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
28093 (PRED_LOOP_GUARD): Change from 66 to 73.
28094
28095 2018-01-19 Martin Liska <mliska@suse.cz>
28096
28097 * predict.c (predict_insn_def): Add new assert.
28098 (struct branch_predictor): Change type to signed integer.
28099 (test_prediction_value_range): Amend test to cover
28100 PROB_UNINITIALIZED.
28101 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
28102 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
28103 (PRED_LOOP_ITERATIONS_MAX): Likewise.
28104 (PRED_LOOP_IV_COMPARE): Likewise.
28105 * predict.h (PROB_UNINITIALIZED): Define new constant.
28106
28107 2018-01-19 Martin Liska <mliska@suse.cz>
28108
28109 * predict.c (dump_prediction): Add new format for
28110 analyze_brprob.py script which is enabled with -details
28111 suboption.
28112 * profile-count.h (precise_p): New function.
28113
28114 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
28115
28116 PR tree-optimization/83922
28117 * tree-vect-loop.c (vect_verify_full_masking): Return false if
28118 there are no statements that need masking.
28119 (vect_active_double_reduction_p): New function.
28120 (vect_analyze_loop_operations): Use it when handling phis that
28121 are not in the loop header.
28122
28123 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
28124
28125 PR tree-optimization/83914
28126 * tree-vect-loop.c (vectorizable_induction): Don't convert
28127 init_expr or apply the peeling adjustment for inductions
28128 that are nested within the vectorized loop.
28129
28130 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28131
28132 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
28133 instead of NEG.
28134
28135 2018-01-18 Jakub Jelinek <jakub@redhat.com>
28136
28137 PR sanitizer/81715
28138 PR testsuite/83882
28139 * function.h (gimplify_parameters): Add gimple_seq * argument.
28140 * function.c: Include gimple.h and options.h.
28141 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
28142 for the added local temporaries if needed.
28143 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
28144 if there are any parameter cleanups, wrap whole body into a
28145 try/finally with the cleanups.
28146
28147 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
28148
28149 PR target/82964
28150 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
28151 Use GET_MODE_CLASS for scalar floating point.
28152
28153 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
28154
28155 PR ipa/82256
28156 patch by PaX Team
28157 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
28158 Fix call of call_cgraph_insertion_hooks.
28159
28160 2018-01-18 Martin Sebor <msebor@redhat.com>
28161
28162 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
28163
28164 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
28165
28166 PR ipa/83619
28167 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
28168 frequencies.
28169
28170 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
28171
28172 PR other/70268
28173 * common.opt: (-ffile-prefix-map): New option.
28174 * opts.c (common_handle_option): Defer it.
28175 * opts-global.c (handle_common_deferred_options): Handle it.
28176 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
28177 * file-prefix-map.h: New file.
28178 (remap_debug_filename, add_debug_prefix_map): ...here.
28179 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
28180 * final.c (debug_prefix_map, add_debug_prefix_map
28181 remap_debug_filename): Move to...
28182 * file-prefix-map.c: New file.
28183 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
28184 generalize, get rid of alloca(), use strrchr() instead of strchr().
28185 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
28186 Implement in terms of add_prefix_map().
28187 (remap_macro_filename, remap_debug_filename): Implement in term of
28188 remap_filename().
28189 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
28190 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
28191 * dbxout.c: Include file-prefix-map.h.
28192 * varasm.c: Likewise.
28193 * vmsdbgout.c: Likewise.
28194 * xcoffout.c: Likewise.
28195 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
28196 * doc/cppopts.texi (-fmacro-prefix-map): Document.
28197 * doc/invoke.texi (-ffile-prefix-map): Document.
28198 (-fdebug-prefix-map): Update description.
28199
28200 2018-01-18 Martin Liska <mliska@suse.cz>
28201
28202 * config/i386/i386.c (indirect_thunk_name): Document that also
28203 lfence is emitted.
28204 (output_indirect_thunk): Document why both instructions
28205 (pause and lfence) are generated.
28206
28207 2018-01-18 Richard Biener <rguenther@suse.de>
28208
28209 PR tree-optimization/83887
28210 * graphite-scop-detection.c
28211 (scop_detection::get_nearest_dom_with_single_entry): Remove.
28212 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
28213 (scop_detection::merge_sese): Re-implement with a flood-fill
28214 algorithm that properly finds a SESE region if it exists.
28215
28216 2018-01-18 Jakub Jelinek <jakub@redhat.com>
28217
28218 PR c/61240
28219 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
28220 pointer_diff optimizations use view_convert instead of convert.
28221
28222 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28223
28224 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28225 Generate different code for -mno-speculate-indirect-jumps.
28226 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28227 (*call_indirect_aix<mode>): Disable for
28228 -mno-speculate-indirect-jumps.
28229 (*call_indirect_aix<mode>_nospec): New define_insn.
28230 (*call_value_indirect_aix<mode>): Disable for
28231 -mno-speculate-indirect-jumps.
28232 (*call_value_indirect_aix<mode>_nospec): New define_insn.
28233 (*sibcall_nonlocal_sysv<mode>): Generate different code for
28234 -mno-speculate-indirect-jumps.
28235 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28236
28237 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
28238
28239 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
28240 long double type, set the flags for noting the default long double
28241 type, even if we don't pass or return a long double type.
28242
28243 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
28244
28245 PR ipa/83051
28246 * ipa-inline.c (flatten_function): Do not overwrite final inlining
28247 failure.
28248
28249 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
28250
28251 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
28252 support for merge[hl].
28253 (fold_mergehl_helper): New helper function.
28254 (tree-vector-builder.h): New #include for tree_vector_builder usage.
28255 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
28256 (altivec_vmrglw_direct): Add xxmrglw insn.
28257
28258 2018-01-17 Andrew Waterman <andrew@sifive.com>
28259
28260 * config/riscv/riscv.c (riscv_conditional_register_usage): If
28261 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
28262
28263 2018-01-17 David Malcolm <dmalcolm@redhat.com>
28264
28265 PR lto/83121
28266 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
28267 call the lto_location_cache before reading the
28268 DECL_SOURCE_LOCATION of the types.
28269
28270 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
28271 Richard Sandiford <richard.sandiford@linaro.org>
28272
28273 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
28274 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
28275 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
28276 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
28277 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
28278 Add declaration.
28279 * config/aarch64/constraints.md (aarch64_movti_operand):
28280 Limit immediates.
28281 * config/aarch64/predicates.md (Uti): Add new constraint.
28282
28283 2018-01-17 Carl Love <cel@us.ibm.com>
28284
28285 * config/rs6000/vsx.md (define_expand xl_len_r,
28286 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
28287 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
28288 lxvll.
28289 (define_expand, define_insn): Move the shift left from the
28290 define_insn to the define_expand for lxvl and stxvl instructions.
28291 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
28292 and XL_LEN_R definitions to PURE.
28293
28294 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
28295
28296 * config/i386/i386.c (indirect_thunk_name): Declare regno
28297 as unsigned int. Compare regno with INVALID_REGNUM.
28298 (output_indirect_thunk): Ditto.
28299 (output_indirect_thunk_function): Ditto.
28300 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
28301 in the call to output_indirect_thunk_function.
28302
28303 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
28304
28305 PR middle-end/83884
28306 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
28307 rather than the size of inner_type to determine the stack slot size
28308 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
28309
28310 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
28311
28312 PR target/83546
28313 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
28314 to PTA_SILVERMONT.
28315
28316 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
28317
28318 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
28319 endian Linux systems to optionally enable multilibs for selecting
28320 the long double type if the user configured an explicit type.
28321 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
28322 have no long double multilibs if not defined.
28323 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
28324 warn if the user used -mabi={ieee,ibm}longdouble and we built
28325 multilibs for long double.
28326 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
28327 appropriate multilib option.
28328 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
28329 multilib options.
28330 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
28331 for building long double multilibs.
28332 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
28333
28334 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
28335
28336 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
28337 copies.
28338
28339 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
28340 64 bits.
28341 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
28342 128 bits.
28343
28344 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
28345 variables.
28346
28347 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
28348 return value.
28349
28350 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
28351
28352 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
28353 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
28354
28355 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
28356
28357 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
28358 different rtl trees depending on TARGET_64BIT.
28359 (rs6000_gen_lvx): Likewise.
28360
28361 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
28362
28363 * config/visium/visium.md (nop): Tweak comment.
28364 (hazard_nop): Likewise.
28365
28366 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28367
28368 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
28369 -mspeculate-indirect-jumps.
28370 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
28371 for -mno-speculate-indirect-jumps.
28372 (*call_indirect_elfv2<mode>_nospec): New define_insn.
28373 (*call_value_indirect_elfv2<mode>): Disable for
28374 -mno-speculate-indirect-jumps.
28375 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
28376 (indirect_jump): Emit different RTL for
28377 -mno-speculate-indirect-jumps.
28378 (*indirect_jump<mode>): Disable for
28379 -mno-speculate-indirect-jumps.
28380 (*indirect_jump<mode>_nospec): New define_insn.
28381 (tablejump): Emit different RTL for
28382 -mno-speculate-indirect-jumps.
28383 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
28384 (tablejumpsi_nospec): New define_expand.
28385 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
28386 (tablejumpdi_nospec): New define_expand.
28387 (*tablejump<mode>_internal1): Disable for
28388 -mno-speculate-indirect-jumps.
28389 (*tablejump<mode>_internal1_nospec): New define_insn.
28390 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
28391 option.
28392
28393 2018-01-16 Artyom Skrobov tyomitch@gmail.com
28394
28395 * caller-save.c (insert_save): Drop unnecessary parameter. All
28396 callers updated.
28397
28398 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28399 Richard Biener <rguenth@suse.de>
28400
28401 PR libgomp/83590
28402 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
28403 return early, inline manually is_gimple_sizepos. Make sure if we
28404 call gimplify_expr we don't end up with a gimple constant.
28405 * tree.c (variably_modified_type_p): Don't return true for
28406 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
28407 * gimplify.h (is_gimple_sizepos): Remove.
28408
28409 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28410
28411 PR tree-optimization/83857
28412 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
28413 vectorizable_live_operation for pure SLP statements.
28414 (vectorizable_live_operation): Handle PHIs.
28415
28416 2018-01-16 Richard Biener <rguenther@suse.de>
28417
28418 PR tree-optimization/83867
28419 * tree-vect-stmts.c (vect_transform_stmt): Precompute
28420 nested_in_vect_loop_p since the scalar stmt may get invalidated.
28421
28422 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28423
28424 PR c/83844
28425 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
28426 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
28427 If off is not INTEGER_CST, issue a may not be aligned warning
28428 rather than isn't aligned. Use isn%'t rather than isn't.
28429 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
28430 into MULT_EXPR.
28431 <case MULT_EXPR>: Improve the case when bottom and one of the
28432 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
28433 operand, in that case check if the other operand is multiple of
28434 bottom divided by the INTEGER_CST operand.
28435
28436 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28437
28438 PR target/83858
28439 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
28440 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
28441 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
28442 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
28443 * config/pa/pa.c (pa_function_arg_advance): Likewise.
28444 (pa_function_arg, pa_arg_partial_bytes): Likewise.
28445 (pa_function_arg_size): New function.
28446
28447 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28448
28449 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
28450 in a separate statement.
28451
28452 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28453
28454 PR tree-optimization/83847
28455 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
28456 group gathers and scatters.
28457
28458 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28459
28460 PR rtl-optimization/86620
28461 * params.def (max-sched-ready-insns): Bump minimum value to 1.
28462
28463 PR rtl-optimization/83213
28464 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
28465 to last if both are JUMP_INSNs.
28466
28467 PR tree-optimization/83843
28468 * gimple-ssa-store-merging.c
28469 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
28470 store_immediate_info for bswap/nop orig_stores.
28471
28472 2018-01-15 Andrew Waterman <andrew@sifive.com>
28473
28474 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
28475 !TARGET_MUL.
28476 <UDIV>: Increase cost if !TARGET_DIV.
28477
28478 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
28479
28480 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
28481 (define_attr "cr_logical_3op"): New.
28482 (cceq_ior_compare): Adjust.
28483 (cceq_ior_compare_complement): Adjust.
28484 (*cceq_rev_compare): Adjust.
28485 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
28486 (is_cracked_insn): Adjust.
28487 (insn_must_be_first_in_group): Adjust.
28488 * config/rs6000/40x.md: Adjust.
28489 * config/rs6000/440.md: Adjust.
28490 * config/rs6000/476.md: Adjust.
28491 * config/rs6000/601.md: Adjust.
28492 * config/rs6000/603.md: Adjust.
28493 * config/rs6000/6xx.md: Adjust.
28494 * config/rs6000/7450.md: Adjust.
28495 * config/rs6000/7xx.md: Adjust.
28496 * config/rs6000/8540.md: Adjust.
28497 * config/rs6000/cell.md: Adjust.
28498 * config/rs6000/e300c2c3.md: Adjust.
28499 * config/rs6000/e500mc.md: Adjust.
28500 * config/rs6000/e500mc64.md: Adjust.
28501 * config/rs6000/e5500.md: Adjust.
28502 * config/rs6000/e6500.md: Adjust.
28503 * config/rs6000/mpc.md: Adjust.
28504 * config/rs6000/power4.md: Adjust.
28505 * config/rs6000/power5.md: Adjust.
28506 * config/rs6000/power6.md: Adjust.
28507 * config/rs6000/power7.md: Adjust.
28508 * config/rs6000/power8.md: Adjust.
28509 * config/rs6000/power9.md: Adjust.
28510 * config/rs6000/rs64.md: Adjust.
28511 * config/rs6000/titan.md: Adjust.
28512
28513 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28514
28515 * config/i386/predicates.md (indirect_branch_operand): Rewrite
28516 ix86_indirect_branch_register logic.
28517
28518 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28519
28520 * config/i386/constraints.md (Bs): Update
28521 ix86_indirect_branch_register check. Don't check
28522 ix86_indirect_branch_register with GOT_memory_operand.
28523 (Bw): Likewise.
28524 * config/i386/predicates.md (GOT_memory_operand): Don't check
28525 ix86_indirect_branch_register here.
28526 (GOT32_symbol_operand): Likewise.
28527
28528 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28529
28530 * config/i386/predicates.md (constant_call_address_operand):
28531 Rewrite ix86_indirect_branch_register logic.
28532 (sibcall_insn_operand): Likewise.
28533
28534 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28535
28536 * config/i386/constraints.md (Bs): Replace
28537 ix86_indirect_branch_thunk_register with
28538 ix86_indirect_branch_register.
28539 (Bw): Likewise.
28540 * config/i386/i386.md (indirect_jump): Likewise.
28541 (tablejump): Likewise.
28542 (*sibcall_memory): Likewise.
28543 (*sibcall_value_memory): Likewise.
28544 Peepholes of indirect call and jump via memory: Likewise.
28545 * config/i386/i386.opt: Likewise.
28546 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28547 (GOT_memory_operand): Likewise.
28548 (call_insn_operand): Likewise.
28549 (sibcall_insn_operand): Likewise.
28550 (GOT32_symbol_operand): Likewise.
28551
28552 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28553
28554 PR middle-end/83837
28555 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
28556 type rather than type addr's type points to.
28557 (expand_omp_atomic_mutex): Likewise.
28558 (expand_omp_atomic): Likewise.
28559
28560 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28561
28562 PR target/83839
28563 * config/i386/i386.c (output_indirect_thunk_function): Use
28564 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
28565 for __x86_return_thunk.
28566
28567 2018-01-15 Richard Biener <rguenther@suse.de>
28568
28569 PR middle-end/83850
28570 * expmed.c (extract_bit_field_1): Fix typo.
28571
28572 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28573
28574 PR target/83687
28575 * config/arm/iterators.md (VF): New mode iterator.
28576 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
28577 Remove integer-related logic from pattern.
28578 (neon_vabd<mode>_3): Likewise.
28579
28580 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28581
28582 PR middle-end/82694
28583 * common.opt (fstrict-overflow): No longer an alias.
28584 (fwrapv-pointer): New option.
28585 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
28586 also for pointer types based on flag_wrapv_pointer.
28587 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
28588 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
28589 opts->x_flag_wrapv got set.
28590 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
28591 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
28592 POINTER_TYPE_OVERFLOW_UNDEFINED.
28593 * match.pd: Likewise in address comparison pattern.
28594 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
28595
28596 2018-01-15 Richard Biener <rguenther@suse.de>
28597
28598 PR lto/83804
28599 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
28600 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
28601 Reset type names to their identifier if their TYPE_DECL doesn't
28602 have linkage (and thus is used for ODR and devirt).
28603 (save_debug_info_for_decl): Remove.
28604 (save_debug_info_for_type): Likewise.
28605 (add_tree_to_fld_list): Adjust.
28606 * tree-pretty-print.c (dump_generic_node): Make dumping of
28607 type names more robust.
28608
28609 2018-01-15 Richard Biener <rguenther@suse.de>
28610
28611 * BASE-VER: Bump to 8.0.1.
28612
28613 2018-01-14 Martin Sebor <msebor@redhat.com>
28614
28615 PR other/83508
28616 * builtins.c (check_access): Avoid warning when the no-warning bit
28617 is set.
28618
28619 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
28620
28621 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
28622 * ira-color (allocno_hard_regs_compare): Likewise.
28623
28624 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
28625
28626 PR target/83013
28627 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
28628 Use .pushsection/.popsection.
28629
28630 2018-01-14 Martin Sebor <msebor@redhat.com>
28631
28632 PR c++/81327
28633 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
28634
28635 2018-01-14 Jakub Jelinek <jakub@redhat.com>
28636
28637 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
28638 entry from extra_headers.
28639 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
28640 extra_headers, make the list bitwise identical to the i?86-*-* one.
28641
28642 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28643
28644 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
28645 -mcmodel=large with -mindirect-branch=thunk,
28646 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
28647 -mfunction-return=thunk-extern.
28648 * doc/invoke.texi: Document -mcmodel=large is incompatible with
28649 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
28650 -mfunction-return=thunk and -mfunction-return=thunk-extern.
28651
28652 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28653
28654 * config/i386/i386.c (print_reg): Print the name of the full
28655 integer register without '%'.
28656 (ix86_print_operand): Handle 'V'.
28657 * doc/extend.texi: Document 'V' modifier.
28658
28659 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28660
28661 * config/i386/constraints.md (Bs): Disallow memory operand for
28662 -mindirect-branch-register.
28663 (Bw): Likewise.
28664 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28665 (GOT_memory_operand): Likewise.
28666 (call_insn_operand): Likewise.
28667 (sibcall_insn_operand): Likewise.
28668 (GOT32_symbol_operand): Likewise.
28669 * config/i386/i386.md (indirect_jump): Call convert_memory_address
28670 for -mindirect-branch-register.
28671 (tablejump): Likewise.
28672 (*sibcall_memory): Likewise.
28673 (*sibcall_value_memory): Likewise.
28674 Disallow peepholes of indirect call and jump via memory for
28675 -mindirect-branch-register.
28676 (*call_pop): Replace m with Bw.
28677 (*call_value_pop): Likewise.
28678 (*sibcall_pop_memory): Replace m with Bs.
28679 * config/i386/i386.opt (mindirect-branch-register): New option.
28680 * doc/invoke.texi: Document -mindirect-branch-register option.
28681
28682 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28683
28684 * config/i386/i386-protos.h (ix86_output_function_return): New.
28685 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
28686 set function_return_type.
28687 (indirect_thunk_name): Add ret_p to indicate thunk for function
28688 return.
28689 (output_indirect_thunk_function): Pass false to
28690 indirect_thunk_name.
28691 (ix86_output_indirect_branch_via_reg): Likewise.
28692 (ix86_output_indirect_branch_via_push): Likewise.
28693 (output_indirect_thunk_function): Create alias for function
28694 return thunk if regno < 0.
28695 (ix86_output_function_return): New function.
28696 (ix86_handle_fndecl_attribute): Handle function_return.
28697 (ix86_attribute_table): Add function_return.
28698 * config/i386/i386.h (machine_function): Add
28699 function_return_type.
28700 * config/i386/i386.md (simple_return_internal): Use
28701 ix86_output_function_return.
28702 (simple_return_internal_long): Likewise.
28703 * config/i386/i386.opt (mfunction-return=): New option.
28704 (indirect_branch): Mention -mfunction-return=.
28705 * doc/extend.texi: Document function_return function attribute.
28706 * doc/invoke.texi: Document -mfunction-return= option.
28707
28708 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28709
28710 * config/i386/i386-opts.h (indirect_branch): New.
28711 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28712 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28713 with local indirect jump when converting indirect call and jump.
28714 (ix86_set_indirect_branch_type): New.
28715 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28716 (indirectlabelno): New.
28717 (indirect_thunk_needed): Likewise.
28718 (indirect_thunk_bnd_needed): Likewise.
28719 (indirect_thunks_used): Likewise.
28720 (indirect_thunks_bnd_used): Likewise.
28721 (INDIRECT_LABEL): Likewise.
28722 (indirect_thunk_name): Likewise.
28723 (output_indirect_thunk): Likewise.
28724 (output_indirect_thunk_function): Likewise.
28725 (ix86_output_indirect_branch_via_reg): Likewise.
28726 (ix86_output_indirect_branch_via_push): Likewise.
28727 (ix86_output_indirect_branch): Likewise.
28728 (ix86_output_indirect_jmp): Likewise.
28729 (ix86_code_end): Call output_indirect_thunk_function if needed.
28730 (ix86_output_call_insn): Call ix86_output_indirect_branch if
28731 needed.
28732 (ix86_handle_fndecl_attribute): Handle indirect_branch.
28733 (ix86_attribute_table): Add indirect_branch.
28734 * config/i386/i386.h (machine_function): Add indirect_branch_type
28735 and has_local_indirect_jump.
28736 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28737 to true.
28738 (tablejump): Likewise.
28739 (*indirect_jump): Use ix86_output_indirect_jmp.
28740 (*tablejump_1): Likewise.
28741 (simple_return_indirect_internal): Likewise.
28742 * config/i386/i386.opt (mindirect-branch=): New option.
28743 (indirect_branch): New.
28744 (keep): Likewise.
28745 (thunk): Likewise.
28746 (thunk-inline): Likewise.
28747 (thunk-extern): Likewise.
28748 * doc/extend.texi: Document indirect_branch function attribute.
28749 * doc/invoke.texi: Document -mindirect-branch= option.
28750
28751 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
28752
28753 PR ipa/83051
28754 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28755
28756 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
28757
28758 * ipa-inline.c (want_inline_small_function_p): Return false if
28759 inlining has already failed with CIF_FINAL_ERROR.
28760 (update_caller_keys): Call want_inline_small_function_p before
28761 can_inline_edge_p.
28762 (update_callee_keys): Likewise.
28763
28764 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
28765
28766 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
28767 New function.
28768 (rs6000_quadword_masked_address_p): Likewise.
28769 (quad_aligned_load_p): Likewise.
28770 (quad_aligned_store_p): Likewise.
28771 (const_load_sequence_p): Add comment to describe the outer-most loop.
28772 (mimic_memory_attributes_and_flags): New function.
28773 (rs6000_gen_stvx): Likewise.
28774 (replace_swapped_aligned_store): Likewise.
28775 (rs6000_gen_lvx): Likewise.
28776 (replace_swapped_aligned_load): Likewise.
28777 (replace_swapped_load_constant): Capitalize argument name in
28778 comment describing this function.
28779 (rs6000_analyze_swaps): Add a third pass to search for vector loads
28780 and stores that access quad-word aligned addresses and replace
28781 with stvx or lvx instructions when appropriate.
28782 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
28783 New function prototype.
28784 (rs6000_quadword_masked_address_p): Likewise.
28785 (rs6000_gen_lvx): Likewise.
28786 (rs6000_gen_stvx): Likewise.
28787 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
28788 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
28789 when memory address is aligned.
28790 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
28791 this split to select lvx instruction when memory address is aligned.
28792 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
28793 instruction when memory address is aligned.
28794 (*vsx_le_perm_load_v16qi): Likewise.
28795 (four unnamed splitters): Modify to select the stvx instruction
28796 when memory is aligned.
28797
28798 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
28799
28800 * predict.c (determine_unlikely_bbs): Handle correctly BBs
28801 which appears in the queue multiple times.
28802
28803 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28804 Alan Hayward <alan.hayward@arm.com>
28805 David Sherwood <david.sherwood@arm.com>
28806
28807 * tree-vectorizer.h (vec_lower_bound): New structure.
28808 (_loop_vec_info): Add check_nonzero and lower_bounds.
28809 (LOOP_VINFO_CHECK_NONZERO): New macro.
28810 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
28811 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
28812 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
28813 fields. Make seg_len the distance travelled, not including the
28814 access size.
28815 (dr_direction_indicator): Declare.
28816 (dr_zero_step_indicator): Likewise.
28817 (dr_known_forward_stride_p): Likewise.
28818 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
28819 tree-ssanames.h.
28820 (runtime_alias_check_p): Allow runtime alias checks with
28821 variable strides.
28822 (operator ==): Compare access_size and align.
28823 (prune_runtime_alias_test_list): Rework for new distinction between
28824 the access_size and seg_len.
28825 (create_intersect_range_checks_index): Likewise. Cope with polynomial
28826 segment lengths.
28827 (get_segment_min_max): New function.
28828 (create_intersect_range_checks): Use it.
28829 (dr_step_indicator): New function.
28830 (dr_direction_indicator): Likewise.
28831 (dr_zero_step_indicator): Likewise.
28832 (dr_known_forward_stride_p): Likewise.
28833 * tree-loop-distribution.c (data_ref_segment_size): Return
28834 DR_STEP * (niters - 1).
28835 (compute_alias_check_pairs): Update call to the dr_with_seg_len
28836 constructor.
28837 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28838 (vect_preserves_scalar_order_p): New function, split out from...
28839 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
28840 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28841 (vect_vfa_access_size): New function.
28842 (vect_vfa_align): Likewise.
28843 (vect_compile_time_alias): Take access_size_a and access_b arguments.
28844 (dump_lower_bound): New function.
28845 (vect_check_lower_bound): Likewise.
28846 (vect_small_gap_p): Likewise.
28847 (vectorizable_with_step_bound_p): Likewise.
28848 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28849 depencies if the vectorization factor is 1. Convert the checks
28850 for nonzero steps into checks on the bounds of DR_STEP. Try using
28851 a bunds check for variable steps if the minimum required step is
28852 relatively small. Update calls to the dr_with_seg_len
28853 constructor and to vect_compile_time_alias.
28854 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28855 function.
28856 (vect_loop_versioning): Call it.
28857 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28858 when retrying.
28859 (vect_estimate_min_profitable_iters): Account for any bounds checks.
28860
28861 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28862 Alan Hayward <alan.hayward@arm.com>
28863 David Sherwood <david.sherwood@arm.com>
28864
28865 * doc/sourcebuild.texi (vect_scatter_store): Document.
28866 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28867 optabs.
28868 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28869 Document.
28870 * genopinit.c (main): Add supports_vec_scatter_store and
28871 supports_vec_scatter_store_cached to target_optabs.
28872 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28873 IFN_MASK_SCATTER_STORE.
28874 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28875 functions.
28876 * internal-fn.h (internal_store_fn_p): Declare.
28877 (internal_fn_stored_value_index): Likewise.
28878 * internal-fn.c (scatter_store_direct): New macro.
28879 (expand_scatter_store_optab_fn): New function.
28880 (direct_scatter_store_optab_supported_p): New macro.
28881 (internal_store_fn_p): New function.
28882 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28883 IFN_MASK_SCATTER_STORE.
28884 (internal_fn_mask_index): Likewise.
28885 (internal_fn_stored_value_index): New function.
28886 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28887 for scatter stores.
28888 * optabs-query.h (supports_vec_scatter_store_p): Declare.
28889 * optabs-query.c (supports_vec_scatter_store_p): New function.
28890 * tree-vectorizer.h (vect_get_store_rhs): Declare.
28891 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28892 true for scatter stores.
28893 (vect_gather_scatter_fn_p): Handle scatter stores too.
28894 (vect_check_gather_scatter): Consider using scatter stores if
28895 supports_vec_scatter_store_p.
28896 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28897 scatter stores too.
28898 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28899 internal_fn_stored_value_index.
28900 (check_load_store_masking): Handle scatter stores too.
28901 (vect_get_store_rhs): Make public.
28902 (vectorizable_call): Use internal_store_fn_p.
28903 (vectorizable_store): Handle scatter store internal functions.
28904 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28905 when deciding whether the end of the group has been reached.
28906 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28907 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28908 (mask_scatter_store<mode>): New insns.
28909
28910 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28911 Alan Hayward <alan.hayward@arm.com>
28912 David Sherwood <david.sherwood@arm.com>
28913
28914 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28915 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28916 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28917 function.
28918 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28919 Use vect_truncate_gather_scatter_offset if we can't treat the
28920 operation as a normal gather load or scatter store.
28921 (get_group_load_store_type): Take the gather_scatter_info
28922 as argument. Try using a gather load or scatter store for
28923 single-element groups.
28924 (get_load_store_type): Update calls to get_group_load_store_type
28925 and vect_use_strided_gather_scatters_p.
28926
28927 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28928 Alan Hayward <alan.hayward@arm.com>
28929 David Sherwood <david.sherwood@arm.com>
28930
28931 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28932 optional tree argument.
28933 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28934 null target hooks.
28935 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28936 but continue to use the current value as a fallback.
28937 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28938 to compare the updates.
28939 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28940 (get_load_store_type): Use it when handling a strided access.
28941 (vect_get_strided_load_store_ops): New function.
28942 (vect_get_data_ptr_increment): Likewise.
28943 (vectorizable_load): Handle strided gather loads. Always pass
28944 a step to vect_create_data_ref_ptr and bump_vector_ptr.
28945
28946 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28947 Alan Hayward <alan.hayward@arm.com>
28948 David Sherwood <david.sherwood@arm.com>
28949
28950 * doc/md.texi (gather_load@var{m}): Document.
28951 (mask_gather_load@var{m}): Likewise.
28952 * genopinit.c (main): Add supports_vec_gather_load and
28953 supports_vec_gather_load_cached to target_optabs.
28954 * optabs-tree.c (init_tree_optimization_optabs): Use
28955 ggc_cleared_alloc to allocate target_optabs.
28956 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28957 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28958 functions.
28959 * internal-fn.h (internal_load_fn_p): Declare.
28960 (internal_gather_scatter_fn_p): Likewise.
28961 (internal_fn_mask_index): Likewise.
28962 (internal_gather_scatter_fn_supported_p): Likewise.
28963 * internal-fn.c (gather_load_direct): New macro.
28964 (expand_gather_load_optab_fn): New function.
28965 (direct_gather_load_optab_supported_p): New macro.
28966 (direct_internal_fn_optab): New function.
28967 (internal_load_fn_p): Likewise.
28968 (internal_gather_scatter_fn_p): Likewise.
28969 (internal_fn_mask_index): Likewise.
28970 (internal_gather_scatter_fn_supported_p): Likewise.
28971 * optabs-query.c (supports_at_least_one_mode_p): New function.
28972 (supports_vec_gather_load_p): Likewise.
28973 * optabs-query.h (supports_vec_gather_load_p): Declare.
28974 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28975 and memory_type field.
28976 (NUM_PATTERNS): Bump to 15.
28977 * tree-vect-data-refs.c: Include internal-fn.h.
28978 (vect_gather_scatter_fn_p): New function.
28979 (vect_describe_gather_scatter_call): Likewise.
28980 (vect_check_gather_scatter): Try using internal functions for
28981 gather loads. Recognize existing calls to a gather load function.
28982 (vect_analyze_data_refs): Consider using gather loads if
28983 supports_vec_gather_load_p.
28984 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28985 (vect_get_gather_scatter_offset_type): Likewise.
28986 (vect_convert_mask_for_vectype): Likewise.
28987 (vect_add_conversion_to_patterm): Likewise.
28988 (vect_try_gather_scatter_pattern): Likewise.
28989 (vect_recog_gather_scatter_pattern): New pattern recognizer.
28990 (vect_vect_recog_func_ptrs): Add it.
28991 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28992 internal_fn_mask_index and internal_gather_scatter_fn_p.
28993 (check_load_store_masking): Take the gather_scatter_info as an
28994 argument and handle gather loads.
28995 (vect_get_gather_scatter_ops): New function.
28996 (vectorizable_call): Check internal_load_fn_p.
28997 (vectorizable_load): Likewise. Handle gather load internal
28998 functions.
28999 (vectorizable_store): Update call to check_load_store_masking.
29000 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
29001 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
29002 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
29003 (aarch64_gather_scale_operand_d): New predicates.
29004 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
29005 (mask_gather_load<mode>): New insns.
29006
29007 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29008 Alan Hayward <alan.hayward@arm.com>
29009 David Sherwood <david.sherwood@arm.com>
29010
29011 * optabs.def (fold_left_plus_optab): New optab.
29012 * doc/md.texi (fold_left_plus_@var{m}): Document.
29013 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
29014 * internal-fn.c (fold_left_direct): Define.
29015 (expand_fold_left_optab_fn): Likewise.
29016 (direct_fold_left_optab_supported_p): Likewise.
29017 * fold-const-call.c (fold_const_fold_left): New function.
29018 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
29019 * tree-parloops.c (valid_reduction_p): New function.
29020 (gather_scalar_reductions): Use it.
29021 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
29022 (vect_finish_replace_stmt): Declare.
29023 * tree-vect-loop.c (fold_left_reduction_fn): New function.
29024 (needs_fold_left_reduction_p): New function, split out from...
29025 (vect_is_simple_reduction): ...here. Accept reductions that
29026 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
29027 (vect_force_simple_reduction): Also store the reduction type in
29028 the assignment's STMT_VINFO_REDUC_TYPE.
29029 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
29030 (merge_with_identity): New function.
29031 (vect_expand_fold_left): Likewise.
29032 (vectorize_fold_left_reduction): Likewise.
29033 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
29034 scalar phi in place for it. Check for target support and reject
29035 cases that would reassociate the operation. Defer the transform
29036 phase to vectorize_fold_left_reduction.
29037 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
29038 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
29039 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
29040
29041 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29042
29043 * tree-if-conv.c (predicate_mem_writes): Remove redundant
29044 call to ifc_temp_var.
29045
29046 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29047 Alan Hayward <alan.hayward@arm.com>
29048 David Sherwood <david.sherwood@arm.com>
29049
29050 * target.def (legitimize_address_displacement): Take the original
29051 offset as a poly_int.
29052 * targhooks.h (default_legitimize_address_displacement): Update
29053 accordingly.
29054 * targhooks.c (default_legitimize_address_displacement): Likewise.
29055 * doc/tm.texi: Regenerate.
29056 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
29057 as an argument, moving assert of ad->disp == ad->disp_term to...
29058 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
29059 Try calling targetm.legitimize_address_displacement before expanding
29060 the address rather than afterwards, and adjust for the new interface.
29061 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
29062 Match the new hook interface. Handle SVE addresses.
29063 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
29064 new hook interface.
29065
29066 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29067
29068 * Makefile.in (OBJS): Add early-remat.o.
29069 * target.def (select_early_remat_modes): New hook.
29070 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
29071 * doc/tm.texi: Regenerate.
29072 * targhooks.h (default_select_early_remat_modes): Declare.
29073 * targhooks.c (default_select_early_remat_modes): New function.
29074 * timevar.def (TV_EARLY_REMAT): New timevar.
29075 * passes.def (pass_early_remat): New pass.
29076 * tree-pass.h (make_pass_early_remat): Declare.
29077 * early-remat.c: New file.
29078 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
29079 function.
29080 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
29081
29082 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29083 Alan Hayward <alan.hayward@arm.com>
29084 David Sherwood <david.sherwood@arm.com>
29085
29086 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
29087 vfm1 with a bound_epilog parameter.
29088 (vect_do_peeling): Update calls accordingly, and move the prologue
29089 call earlier in the function. Treat the base bound_epilog as 0 for
29090 fully-masked loops and retain vf - 1 for other loops. Add 1 to
29091 this base when peeling for gaps.
29092 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
29093 with fully-masked loops.
29094 (vect_estimate_min_profitable_iters): Handle the single peeled
29095 iteration in that case.
29096
29097 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29098 Alan Hayward <alan.hayward@arm.com>
29099 David Sherwood <david.sherwood@arm.com>
29100
29101 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
29102 single-element interleaving even if the size is not a power of 2.
29103 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
29104 accesses for single-element interleaving if the group size is
29105 not a power of 2.
29106
29107 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29108 Alan Hayward <alan.hayward@arm.com>
29109 David Sherwood <david.sherwood@arm.com>
29110
29111 * doc/md.texi (fold_extract_last_@var{m}): Document.
29112 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
29113 * optabs.def (fold_extract_last_optab): New optab.
29114 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
29115 * internal-fn.c (fold_extract_direct): New macro.
29116 (expand_fold_extract_optab_fn): Likewise.
29117 (direct_fold_extract_optab_supported_p): Likewise.
29118 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
29119 * tree-vect-loop.c (vect_model_reduction_cost): Handle
29120 EXTRACT_LAST_REDUCTION.
29121 (get_initial_def_for_reduction): Do not create an initial vector
29122 for EXTRACT_LAST_REDUCTION reductions.
29123 (vectorizable_reduction): Leave the scalar phi in place for
29124 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
29125 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
29126 epilogue code for EXTRACT_LAST_REDUCTION and defer the
29127 transform phase to vectorizable_condition.
29128 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
29129 split out from...
29130 (vect_finish_stmt_generation): ...here.
29131 (vect_finish_replace_stmt): New function.
29132 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
29133 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
29134 pattern.
29135 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
29136
29137 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29138 Alan Hayward <alan.hayward@arm.com>
29139 David Sherwood <david.sherwood@arm.com>
29140
29141 * doc/md.texi (extract_last_@var{m}): Document.
29142 * optabs.def (extract_last_optab): New optab.
29143 * internal-fn.def (EXTRACT_LAST): New internal function.
29144 * internal-fn.c (cond_unary_direct): New macro.
29145 (expand_cond_unary_optab_fn): Likewise.
29146 (direct_cond_unary_optab_supported_p): Likewise.
29147 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
29148 loops using EXTRACT_LAST.
29149 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
29150 (extract_last_<mode>): ...this optab.
29151 (vec_extract<mode><Vel>): Update accordingly.
29152
29153 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29154 Alan Hayward <alan.hayward@arm.com>
29155 David Sherwood <david.sherwood@arm.com>
29156
29157 * target.def (empty_mask_is_expensive): New hook.
29158 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
29159 * doc/tm.texi: Regenerate.
29160 * targhooks.h (default_empty_mask_is_expensive): Declare.
29161 * targhooks.c (default_empty_mask_is_expensive): New function.
29162 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
29163 if the target says that empty masks are expensive.
29164 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
29165 New function.
29166 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
29167
29168 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29169 Alan Hayward <alan.hayward@arm.com>
29170 David Sherwood <david.sherwood@arm.com>
29171
29172 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
29173 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
29174 (vect_use_loop_mask_for_alignment_p): New function.
29175 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
29176 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
29177 niters_skip argument. Make sure that the first niters_skip elements
29178 of the first iteration are inactive.
29179 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
29180 Update call to vect_set_loop_masks_directly.
29181 (get_misalign_in_elems): New function, split out from...
29182 (vect_gen_prolog_loop_niters): ...here.
29183 (vect_update_init_of_dr): Take a code argument that specifies whether
29184 the adjustment should be added or subtracted.
29185 (vect_update_init_of_drs): Likewise.
29186 (vect_prepare_for_masked_peels): New function.
29187 (vect_do_peeling): Skip prologue peeling if we're using a mask
29188 instead. Update call to vect_update_inits_of_drs.
29189 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29190 mask_skip_niters.
29191 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
29192 alignment. Do not include the number of peeled iterations in
29193 the minimum threshold in that case.
29194 (vectorizable_induction): Adjust the start value down by
29195 LOOP_VINFO_MASK_SKIP_NITERS iterations.
29196 (vect_transform_loop): Call vect_prepare_for_masked_peels.
29197 Take the number of skipped iterations into account when calculating
29198 the loop bounds.
29199 * tree-vect-stmts.c (vect_gen_while_not): New function.
29200
29201 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29202 Alan Hayward <alan.hayward@arm.com>
29203 David Sherwood <david.sherwood@arm.com>
29204
29205 * doc/sourcebuild.texi (vect_fully_masked): Document.
29206 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
29207 default value to 0.
29208 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
29209 split out from...
29210 (vect_analyze_loop_2): ...here. Don't check the vectorization
29211 factor against the number of loop iterations if the loop is
29212 fully-masked.
29213
29214 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29215 Alan Hayward <alan.hayward@arm.com>
29216 David Sherwood <david.sherwood@arm.com>
29217
29218 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
29219 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
29220 (dump_groups): Update accordingly.
29221 (iv_use::mem_type): New member variable.
29222 (address_p): New function.
29223 (record_use): Add a mem_type argument and initialize the new
29224 mem_type field.
29225 (record_group_use): Add a mem_type argument. Use address_p.
29226 Remove obsolete null checks of base_object. Update call to record_use.
29227 (find_interesting_uses_op): Update call to record_group_use.
29228 (find_interesting_uses_cond): Likewise.
29229 (find_interesting_uses_address): Likewise.
29230 (get_mem_type_for_internal_fn): New function.
29231 (find_address_like_use): Likewise.
29232 (find_interesting_uses_stmt): Try find_address_like_use before
29233 calling find_interesting_uses_op.
29234 (addr_offset_valid_p): Use the iv mem_type field as the type
29235 of the addressed memory.
29236 (add_autoinc_candidates): Likewise.
29237 (get_address_cost): Likewise.
29238 (split_small_address_groups_p): Use address_p.
29239 (split_address_groups): Likewise.
29240 (add_iv_candidate_for_use): Likewise.
29241 (autoinc_possible_for_pair): Likewise.
29242 (rewrite_groups): Likewise.
29243 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
29244 (determine_group_iv_cost): Update after split of USE_ADDRESS.
29245 (get_alias_ptr_type_for_ptr_address): New function.
29246 (rewrite_use_address): Rewrite address uses in calls that were
29247 identified by find_address_like_use.
29248
29249 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29250 Alan Hayward <alan.hayward@arm.com>
29251 David Sherwood <david.sherwood@arm.com>
29252
29253 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
29254 TARGET_MEM_REFs.
29255 * gimple-expr.h (is_gimple_addressable: Likewise.
29256 * gimple-expr.c (is_gimple_address): Likewise.
29257 * internal-fn.c (expand_call_mem_ref): New function.
29258 (expand_mask_load_optab_fn): Use it.
29259 (expand_mask_store_optab_fn): Likewise.
29260
29261 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29262 Alan Hayward <alan.hayward@arm.com>
29263 David Sherwood <david.sherwood@arm.com>
29264
29265 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
29266 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
29267 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
29268 (cond_umax@var{mode}): Document.
29269 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
29270 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
29271 (cond_umin_optab, cond_umax_optab): New optabs.
29272 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
29273 (COND_IOR, COND_XOR): New internal functions.
29274 * internal-fn.h (get_conditional_internal_fn): Declare.
29275 * internal-fn.c (cond_binary_direct): New macro.
29276 (expand_cond_binary_optab_fn): Likewise.
29277 (direct_cond_binary_optab_supported_p): Likewise.
29278 (get_conditional_internal_fn): New function.
29279 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
29280 Cope with reduction statements that are vectorized as calls rather
29281 than assignments.
29282 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
29283 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
29284 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
29285 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
29286 (UNSPEC_COND_EOR): New unspecs.
29287 (optab): Add mappings for them.
29288 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
29289 (sve_int_op, sve_fp_op): New int attributes.
29290
29291 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29292 Alan Hayward <alan.hayward@arm.com>
29293 David Sherwood <david.sherwood@arm.com>
29294
29295 * optabs.def (while_ult_optab): New optab.
29296 * doc/md.texi (while_ult@var{m}@var{n}): Document.
29297 * internal-fn.def (WHILE_ULT): New internal function.
29298 * internal-fn.h (direct_internal_fn_supported_p): New override
29299 that takes two types as argument.
29300 * internal-fn.c (while_direct): New macro.
29301 (expand_while_optab_fn): New function.
29302 (convert_optab_supported_p): Likewise.
29303 (direct_while_optab_supported_p): New macro.
29304 * wide-int.h (wi::udiv_ceil): New function.
29305 * tree-vectorizer.h (rgroup_masks): New structure.
29306 (vec_loop_masks): New typedef.
29307 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
29308 and fully_masked_p.
29309 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
29310 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
29311 (vect_max_vf): New function.
29312 (slpeel_make_loop_iterate_ntimes): Delete.
29313 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
29314 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
29315 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
29316 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
29317 internal-fn.h, stor-layout.h and optabs-query.h.
29318 (vect_set_loop_mask): New function.
29319 (add_preheader_seq): Likewise.
29320 (add_header_seq): Likewise.
29321 (interleave_supported_p): Likewise.
29322 (vect_maybe_permute_loop_masks): Likewise.
29323 (vect_set_loop_masks_directly): Likewise.
29324 (vect_set_loop_condition_masked): Likewise.
29325 (vect_set_loop_condition_unmasked): New function, split out from
29326 slpeel_make_loop_iterate_ntimes.
29327 (slpeel_make_loop_iterate_ntimes): Rename to..
29328 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
29329 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
29330 (vect_do_peeling): Update call accordingly.
29331 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
29332 loops.
29333 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29334 mask_compare_type, can_fully_mask_p and fully_masked_p.
29335 (release_vec_loop_masks): New function.
29336 (_loop_vec_info): Use it to free the loop masks.
29337 (can_produce_all_loop_masks_p): New function.
29338 (vect_get_max_nscalars_per_iter): Likewise.
29339 (vect_verify_full_masking): Likewise.
29340 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
29341 retries, and free the mask rgroups before retrying. Check loop-wide
29342 reasons for disallowing fully-masked loops. Make the final decision
29343 about whether use a fully-masked loop or not.
29344 (vect_estimate_min_profitable_iters): Do not assume that peeling
29345 for the number of iterations will be needed for fully-masked loops.
29346 (vectorizable_reduction): Disable fully-masked loops.
29347 (vectorizable_live_operation): Likewise.
29348 (vect_halve_mask_nunits): New function.
29349 (vect_double_mask_nunits): Likewise.
29350 (vect_record_loop_mask): Likewise.
29351 (vect_get_loop_mask): Likewise.
29352 (vect_transform_loop): Handle the case in which the final loop
29353 iteration might handle a partial vector. Call vect_set_loop_condition
29354 instead of slpeel_make_loop_iterate_ntimes.
29355 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
29356 (check_load_store_masking): New function.
29357 (prepare_load_store_mask): Likewise.
29358 (vectorizable_store): Handle fully-masked loops.
29359 (vectorizable_load): Likewise.
29360 (supportable_widening_operation): Use vect_halve_mask_nunits for
29361 booleans.
29362 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
29363 (vect_gen_while): New function.
29364 * config/aarch64/aarch64.md (umax<mode>3): New expander.
29365 (aarch64_uqdec<mode>): New insn.
29366
29367 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29368 Alan Hayward <alan.hayward@arm.com>
29369 David Sherwood <david.sherwood@arm.com>
29370
29371 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
29372 (reduc_xor_scal_optab): New optabs.
29373 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
29374 (reduc_xor_scal_@var{m}): Document.
29375 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
29376 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
29377 internal functions.
29378 * fold-const-call.c (fold_const_call): Handle them.
29379 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
29380 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
29381 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
29382 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
29383 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
29384 (UNSPEC_XORV): New unspecs.
29385 (optab): Add entries for them.
29386 (BITWISEV): New int iterator.
29387 (bit_reduc_op): New int attributes.
29388
29389 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29390 Alan Hayward <alan.hayward@arm.com>
29391 David Sherwood <david.sherwood@arm.com>
29392
29393 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
29394 * internal-fn.def (VEC_SHL_INSERT): New internal function.
29395 * optabs.def (vec_shl_insert_optab): New optab.
29396 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
29397 (duplicate_and_interleave): Likewise.
29398 * tree-vect-loop.c: Include internal-fn.h.
29399 (neutral_op_for_slp_reduction): New function, split out from
29400 get_initial_defs_for_reduction.
29401 (get_initial_def_for_reduction): Handle option 2 for variable-length
29402 vectors by loading the neutral value into a vector and then shifting
29403 the initial value into element 0.
29404 (get_initial_defs_for_reduction): Replace the code argument with
29405 the neutral value calculated by neutral_op_for_slp_reduction.
29406 Use gimple_build_vector for constant-length vectors.
29407 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
29408 but the first group_size elements have a neutral value.
29409 Use duplicate_and_interleave otherwise.
29410 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
29411 Update call to get_initial_defs_for_reduction. Handle SLP
29412 reductions for variable-length vectors by creating one vector
29413 result for each scalar result, with the elements associated
29414 with other scalar results stubbed out with the neutral value.
29415 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
29416 Require IFN_VEC_SHL_INSERT for double reductions on
29417 variable-length vectors, or SLP reductions that have
29418 a neutral value. Require can_duplicate_and_interleave_p
29419 support for variable-length unchained SLP reductions if there
29420 is no neutral value, such as for MIN/MAX reductions. Also require
29421 the number of vector elements to be a multiple of the number of
29422 SLP statements when doing variable-length unchained SLP reductions.
29423 Update call to vect_create_epilog_for_reduction.
29424 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
29425 and remove initial values.
29426 (duplicate_and_interleave): Make public.
29427 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
29428 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
29429
29430 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29431 Alan Hayward <alan.hayward@arm.com>
29432 David Sherwood <david.sherwood@arm.com>
29433
29434 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
29435 (can_duplicate_and_interleave_p): New function.
29436 (vect_get_and_check_slp_defs): Take the vector of statements
29437 rather than just the current one. Remove excess parentheses.
29438 Restriction rejectinon of vect_constant_def and vect_external_def
29439 for variable-length vectors to boolean types, or types for which
29440 can_duplicate_and_interleave_p is false.
29441 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
29442 (duplicate_and_interleave): New function.
29443 (vect_get_constant_vectors): Use gimple_build_vector for
29444 constant-length vectors and suitable variable-length constant
29445 vectors. Use duplicate_and_interleave for other variable-length
29446 vectors. Don't defer the update when inserting new statements.
29447
29448 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29449 Alan Hayward <alan.hayward@arm.com>
29450 David Sherwood <david.sherwood@arm.com>
29451
29452 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
29453 min_profitable_iters doesn't go negative.
29454
29455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29456 Alan Hayward <alan.hayward@arm.com>
29457 David Sherwood <david.sherwood@arm.com>
29458
29459 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
29460 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
29461 * optabs.def (vec_mask_load_lanes_optab): New optab.
29462 (vec_mask_store_lanes_optab): Likewise.
29463 * internal-fn.def (MASK_LOAD_LANES): New internal function.
29464 (MASK_STORE_LANES): Likewise.
29465 * internal-fn.c (mask_load_lanes_direct): New macro.
29466 (mask_store_lanes_direct): Likewise.
29467 (expand_mask_load_optab_fn): Handle masked operations.
29468 (expand_mask_load_lanes_optab_fn): New macro.
29469 (expand_mask_store_optab_fn): Handle masked operations.
29470 (expand_mask_store_lanes_optab_fn): New macro.
29471 (direct_mask_load_lanes_optab_supported_p): Likewise.
29472 (direct_mask_store_lanes_optab_supported_p): Likewise.
29473 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
29474 parameter.
29475 (vect_load_lanes_supported): Likewise.
29476 * tree-vect-data-refs.c (strip_conversion): New function.
29477 (can_group_stmts_p): Likewise.
29478 (vect_analyze_data_ref_accesses): Use it instead of checking
29479 for a pair of assignments.
29480 (vect_store_lanes_supported): Take a masked_p parameter.
29481 (vect_load_lanes_supported): Likewise.
29482 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
29483 vect_store_lanes_supported and vect_load_lanes_supported.
29484 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
29485 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
29486 parameter. Don't allow gaps for masked accesses.
29487 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
29488 and vect_load_lanes_supported.
29489 (get_load_store_type): Take a masked_p parameter and update
29490 call to get_group_load_store_type.
29491 (vectorizable_store): Update call to get_load_store_type.
29492 Handle IFN_MASK_STORE_LANES.
29493 (vectorizable_load): Update call to get_load_store_type.
29494 Handle IFN_MASK_LOAD_LANES.
29495
29496 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29497 Alan Hayward <alan.hayward@arm.com>
29498 David Sherwood <david.sherwood@arm.com>
29499
29500 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
29501 modes for SVE.
29502 * config/aarch64/aarch64-protos.h
29503 (aarch64_sve_struct_memory_operand_p): Declare.
29504 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
29505 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
29506 (VPRED, vpred): Handle SVE structure modes.
29507 * config/aarch64/constraints.md (Utx): New constraint.
29508 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
29509 (aarch64_sve_struct_nonimmediate_operand): New predicates.
29510 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
29511 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
29512 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
29513 structure modes. Split into pieces after RA.
29514 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
29515 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
29516 New patterns.
29517 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
29518 SVE structure modes.
29519 (aarch64_classify_address): Likewise.
29520 (sizetochar): Move earlier in file.
29521 (aarch64_print_operand): Handle SVE register lists.
29522 (aarch64_array_mode): New function.
29523 (aarch64_sve_struct_memory_operand_p): Likewise.
29524 (TARGET_ARRAY_MODE): Redefine.
29525
29526 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29527 Alan Hayward <alan.hayward@arm.com>
29528 David Sherwood <david.sherwood@arm.com>
29529
29530 * target.def (array_mode): New target hook.
29531 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
29532 * doc/tm.texi: Regenerate.
29533 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
29534 * hooks.c (hook_optmode_mode_uhwi_none): New function.
29535 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
29536 targetm.array_mode.
29537 * stor-layout.c (mode_for_array): Likewise. Support polynomial
29538 type sizes.
29539
29540 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29541 Alan Hayward <alan.hayward@arm.com>
29542 David Sherwood <david.sherwood@arm.com>
29543
29544 * fold-const.c (fold_binary_loc): Check the argument types
29545 rather than the result type when testing for a vector operation.
29546
29547 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29548
29549 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
29550 * doc/tm.texi: Regenerate.
29551
29552 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29553 Alan Hayward <alan.hayward@arm.com>
29554 David Sherwood <david.sherwood@arm.com>
29555
29556 * doc/invoke.texi (-msve-vector-bits=): Document new option.
29557 (sve): Document new AArch64 extension.
29558 * doc/md.texi (w): Extend the description of the AArch64
29559 constraint to include SVE vectors.
29560 (Upl, Upa): Document new AArch64 predicate constraints.
29561 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
29562 enum.
29563 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
29564 (msve-vector-bits=): New option.
29565 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
29566 SVE when these are disabled.
29567 (sve): New extension.
29568 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
29569 modes. Adjust their number of units based on aarch64_sve_vg.
29570 (MAX_BITSIZE_MODE_ANY_MODE): Define.
29571 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
29572 aarch64_addr_query_type.
29573 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
29574 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
29575 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
29576 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
29577 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
29578 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
29579 (aarch64_simd_imm_zero_p): Delete.
29580 (aarch64_check_zero_based_sve_index_immediate): Declare.
29581 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29582 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29583 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29584 (aarch64_sve_float_mul_immediate_p): Likewise.
29585 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29586 rather than an rtx.
29587 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
29588 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
29589 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
29590 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
29591 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
29592 (aarch64_regmode_natural_size): Likewise.
29593 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
29594 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
29595 left one place.
29596 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
29597 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
29598 for VG and the SVE predicate registers.
29599 (V_ALIASES): Add a "z"-prefixed alias.
29600 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
29601 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
29602 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
29603 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
29604 (REG_CLASS_NAMES): Add entries for them.
29605 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
29606 and the predicate registers.
29607 (aarch64_sve_vg): Declare.
29608 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
29609 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
29610 (REGMODE_NATURAL_SIZE): Define.
29611 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
29612 SVE macros.
29613 * config/aarch64/aarch64.c: Include cfgrtl.h.
29614 (simd_immediate_info): Add a constructor for series vectors,
29615 and an associated step field.
29616 (aarch64_sve_vg): New variable.
29617 (aarch64_dbx_register_number): Handle VG and the predicate registers.
29618 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
29619 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
29620 (VEC_ANY_DATA, VEC_STRUCT): New constants.
29621 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
29622 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
29623 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
29624 (aarch64_get_mask_mode): New functions.
29625 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
29626 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
29627 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
29628 predicate modes and predicate registers. Explicitly restrict
29629 GPRs to modes of 16 bytes or smaller. Only allow FP registers
29630 to store a vector mode if it is recognized by
29631 aarch64_classify_vector_mode.
29632 (aarch64_regmode_natural_size): New function.
29633 (aarch64_hard_regno_caller_save_mode): Return the original mode
29634 for predicates.
29635 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
29636 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
29637 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
29638 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
29639 functions.
29640 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
29641 does not overlap dest if the function is frame-related. Handle
29642 SVE constants.
29643 (aarch64_split_add_offset): New function.
29644 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
29645 them aarch64_add_offset.
29646 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
29647 and update call to aarch64_sub_sp.
29648 (aarch64_add_cfa_expression): New function.
29649 (aarch64_expand_prologue): Pass extra temporary registers to the
29650 functions above. Handle the case in which we need to emit new
29651 DW_CFA_expressions for registers that were originally saved
29652 relative to the stack pointer, but now have to be expressed
29653 relative to the frame pointer.
29654 (aarch64_output_mi_thunk): Pass extra temporary registers to the
29655 functions above.
29656 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
29657 IP0 and IP1 values for SVE frames.
29658 (aarch64_expand_vec_series): New function.
29659 (aarch64_expand_sve_widened_duplicate): Likewise.
29660 (aarch64_expand_sve_const_vector): Likewise.
29661 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
29662 Handle SVE constants. Use emit_move_insn to move a force_const_mem
29663 into the register, rather than emitting a SET directly.
29664 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
29665 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
29666 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
29667 (offset_9bit_signed_scaled_p): New functions.
29668 (aarch64_replicate_bitmask_imm): New function.
29669 (aarch64_bitmask_imm): Use it.
29670 (aarch64_cannot_force_const_mem): Reject expressions involving
29671 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
29672 (aarch64_classify_index): Handle SVE indices, by requiring
29673 a plain register index with a scale that matches the element size.
29674 (aarch64_classify_address): Handle SVE addresses. Assert that
29675 the mode of the address is VOIDmode or an integer mode.
29676 Update call to aarch64_classify_symbol.
29677 (aarch64_classify_symbolic_expression): Update call to
29678 aarch64_classify_symbol.
29679 (aarch64_const_vec_all_in_range_p): New function.
29680 (aarch64_print_vector_float_operand): Likewise.
29681 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
29682 "vN" for FP registers with SVE modes. Handle (const ...) vectors
29683 and the FP immediates 1.0 and 0.5.
29684 (aarch64_print_address_internal): Handle SVE addresses.
29685 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
29686 (aarch64_regno_regclass): Handle predicate registers.
29687 (aarch64_secondary_reload): Handle big-endian reloads of SVE
29688 data modes.
29689 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
29690 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
29691 (aarch64_convert_sve_vector_bits): New function.
29692 (aarch64_override_options): Use it to handle -msve-vector-bits=.
29693 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29694 rather than an rtx.
29695 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29696 Handle SVE vector and predicate modes. Accept VL-based constants
29697 that need only one temporary register, and VL offsets that require
29698 no temporary registers.
29699 (aarch64_conditional_register_usage): Mark the predicate registers
29700 as fixed if SVE isn't available.
29701 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29702 Return true for SVE vector and predicate modes.
29703 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29704 rather than an unsigned int. Handle SVE modes.
29705 (aarch64_preferred_simd_mode): Update call accordingly. Handle
29706 SVE modes.
29707 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29708 if SVE is enabled.
29709 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29710 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29711 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29712 (aarch64_sve_float_mul_immediate_p): New functions.
29713 (aarch64_sve_valid_immediate): New function.
29714 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29715 Explicitly reject structure modes. Check for INDEX constants.
29716 Handle PTRUE and PFALSE constants.
29717 (aarch64_check_zero_based_sve_index_immediate): New function.
29718 (aarch64_simd_imm_zero_p): Delete.
29719 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29720 vector modes. Accept constants in the range of CNT[BHWD].
29721 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29722 ask for an Advanced SIMD mode.
29723 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29724 (aarch64_simd_vector_alignment): Handle SVE predicates.
29725 (aarch64_vectorize_preferred_vector_alignment): New function.
29726 (aarch64_simd_vector_alignment_reachable): Use it instead of
29727 the vector size.
29728 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29729 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29730 functions.
29731 (MAX_VECT_LEN): Delete.
29732 (expand_vec_perm_d): Add a vec_flags field.
29733 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29734 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29735 (aarch64_evpc_ext): Don't apply a big-endian lane correction
29736 for SVE modes.
29737 (aarch64_evpc_rev): Rename to...
29738 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
29739 (aarch64_evpc_rev_global): New function.
29740 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29741 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29742 MAX_VECT_LEN.
29743 (aarch64_evpc_sve_tbl): New function.
29744 (aarch64_expand_vec_perm_const_1): Update after rename of
29745 aarch64_evpc_rev. Handle SVE permutes too, trying
29746 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29747 than aarch64_evpc_tbl.
29748 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29749 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29750 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29751 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29752 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29753 (aarch64_expand_sve_vcond): New functions.
29754 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29755 of aarch64_vector_mode_p.
29756 (aarch64_dwarf_poly_indeterminate_value): New function.
29757 (aarch64_compute_pressure_classes): Likewise.
29758 (aarch64_can_change_mode_class): Likewise.
29759 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29760 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29761 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29762 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
29763 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
29764 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
29765 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
29766 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
29767 constraints.
29768 (Dn, Dl, Dr): Accept const as well as const_vector.
29769 (Dz): Likewise. Compare against CONST0_RTX.
29770 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
29771 of "vector" where appropriate.
29772 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
29773 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
29774 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
29775 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
29776 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
29777 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
29778 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
29779 (v_int_equiv): Extend to SVE modes.
29780 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
29781 mode attributes.
29782 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
29783 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
29784 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
29785 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
29786 (SVE_COND_FP_CMP): New int iterators.
29787 (perm_hilo): Handle the new unpack unspecs.
29788 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
29789 attributes.
29790 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
29791 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
29792 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
29793 (aarch64_equality_operator, aarch64_constant_vector_operand)
29794 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
29795 (aarch64_sve_nonimmediate_operand): Likewise.
29796 (aarch64_sve_general_operand): Likewise.
29797 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
29798 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
29799 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
29800 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
29801 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
29802 (aarch64_sve_float_arith_immediate): Likewise.
29803 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
29804 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
29805 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
29806 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
29807 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
29808 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
29809 (aarch64_sve_float_arith_operand): Likewise.
29810 (aarch64_sve_float_arith_with_sub_operand): Likewise.
29811 (aarch64_sve_float_mul_operand): Likewise.
29812 (aarch64_sve_vec_perm_operand): Likewise.
29813 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
29814 (aarch64_mov_operand): Accept const_poly_int and const_vector.
29815 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
29816 as well as const_vector.
29817 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
29818 in file. Use CONST0_RTX and CONSTM1_RTX.
29819 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
29820 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
29821 Use aarch64_simd_imm_zero.
29822 * config/aarch64/aarch64-sve.md: New file.
29823 * config/aarch64/aarch64.md: Include it.
29824 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29825 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29826 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29827 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29828 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29829 (sve): New attribute.
29830 (enabled): Disable instructions with the sve attribute unless
29831 TARGET_SVE.
29832 (movqi, movhi): Pass CONST_POLY_INT operaneds through
29833 aarch64_expand_mov_immediate.
29834 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29835 CNT[BHSD] immediates.
29836 (movti): Split CONST_POLY_INT moves into two halves.
29837 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29838 Split additions that need a temporary here if the destination
29839 is the stack pointer.
29840 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29841 (*add<mode>3_poly_1): New instruction.
29842 (set_clobber_cc): New expander.
29843
29844 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29845
29846 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29847 parameter and use it instead of GET_MODE_SIZE (innermode). Use
29848 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29849 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29850 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
29851 Change innermode from fixed_mode_size to machine_mode.
29852 (simplify_subreg): Update call accordingly. Handle a constant-sized
29853 subreg of a variable-length CONST_VECTOR.
29854
29855 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29856 Alan Hayward <alan.hayward@arm.com>
29857 David Sherwood <david.sherwood@arm.com>
29858
29859 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29860 (add_offset_to_base): New function, split out from...
29861 (create_mem_ref): ...here. When handling a scale other than 1,
29862 check first whether the address is valid without the offset.
29863 Add it into the base if so, leaving the index and scale as-is.
29864
29865 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29866
29867 PR c++/83778
29868 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29869 fold_for_warn before checking if arg2 is INTEGER_CST.
29870
29871 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
29872
29873 * config/rs6000/predicates.md (load_multiple_operation): Delete.
29874 (store_multiple_operation): Delete.
29875 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29876 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29877 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29878 guarded by TARGET_STRING.
29879 (rs6000_output_load_multiple): Delete.
29880 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29881 OPTION_MASK_STRING / TARGET_STRING handling.
29882 (print_operand) <'N', 'O'>: Add comment that these are unused now.
29883 (const rs6000_opt_masks) <"string">: Change mask to 0.
29884 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29885 (MASK_STRING): Delete.
29886 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29887 parts. Simplify.
29888 (load_multiple): Delete.
29889 (*ldmsi8): Delete.
29890 (*ldmsi7): Delete.
29891 (*ldmsi6): Delete.
29892 (*ldmsi5): Delete.
29893 (*ldmsi4): Delete.
29894 (*ldmsi3): Delete.
29895 (store_multiple): Delete.
29896 (*stmsi8): Delete.
29897 (*stmsi7): Delete.
29898 (*stmsi6): Delete.
29899 (*stmsi5): Delete.
29900 (*stmsi4): Delete.
29901 (*stmsi3): Delete.
29902 (movmemsi_8reg): Delete.
29903 (corresponding unnamed define_insn): Delete.
29904 (movmemsi_6reg): Delete.
29905 (corresponding unnamed define_insn): Delete.
29906 (movmemsi_4reg): Delete.
29907 (corresponding unnamed define_insn): Delete.
29908 (movmemsi_2reg): Delete.
29909 (corresponding unnamed define_insn): Delete.
29910 (movmemsi_1reg): Delete.
29911 (corresponding unnamed define_insn): Delete.
29912 * config/rs6000/rs6000.opt (mno-string): New.
29913 (mstring): Replace by deprecation warning stub.
29914 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29915
29916 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29917
29918 * regrename.c (regrename_do_replace): If replacing the same
29919 reg multiple times, try to reuse last created gen_raw_REG.
29920
29921 PR debug/81155
29922 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29923 main to workaround a bug in GDB.
29924
29925 2018-01-12 Tom de Vries <tom@codesourcery.com>
29926
29927 PR target/83737
29928 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29929
29930 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
29931
29932 PR rtl-optimization/80481
29933 * ira-color.c (get_cap_member): New function.
29934 (allocnos_conflict_by_live_ranges_p): Use it.
29935 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29936 (setup_slot_coalesced_allocno_live_ranges): Ditto.
29937
29938 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
29939
29940 PR target/83628
29941 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29942 (*saddl_se_1): Ditto.
29943 (*ssubsi_1): Ditto.
29944 (*ssubl_se_1): Ditto.
29945
29946 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29947
29948 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29949 rather than wi::to_widest for DR_INITs.
29950 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29951 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29952 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29953 INTEGER_CSTs.
29954 (vect_analyze_group_access_1): Note that here.
29955
29956 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29957
29958 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29959 polynomial type sizes.
29960
29961 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29962
29963 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29964 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29965 (gimple_add_tmp_var): Likewise.
29966
29967 2018-01-12 Martin Liska <mliska@suse.cz>
29968
29969 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29970 (gimple_alloc_sizes): Likewise.
29971 (dump_gimple_statistics): Use PRIu64 in printf format.
29972 * gimple.h: Change uint64_t to int.
29973
29974 2018-01-12 Martin Liska <mliska@suse.cz>
29975
29976 * tree-core.h: Use uint64_t instead of int.
29977 * tree.c (tree_node_counts): Likewise.
29978 (tree_node_sizes): Likewise.
29979 (dump_tree_statistics): Use PRIu64 in printf format.
29980
29981 2018-01-12 Martin Liska <mliska@suse.cz>
29982
29983 * Makefile.in: As qsort_chk is implemented in vec.c, add
29984 vec.o to linkage of gencfn-macros.
29985 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29986 passing the info to record_node_allocation_statistics.
29987 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29988 and pass the info.
29989 * ggc-common.c (struct ggc_usage): Add operator== and use
29990 it in operator< and compare function.
29991 * mem-stats.h (struct mem_usage): Likewise.
29992 * vec.c (struct vec_usage): Remove operator< and compare
29993 function. Can be simply inherited.
29994
29995 2018-01-12 Martin Jambor <mjambor@suse.cz>
29996
29997 PR target/81616
29998 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29999 * tree-ssa-math-opts.c: Include domwalk.h.
30000 (convert_mult_to_fma_1): New function.
30001 (fma_transformation_info): New type.
30002 (fma_deferring_state): Likewise.
30003 (cancel_fma_deferring): New function.
30004 (result_of_phi): Likewise.
30005 (last_fma_candidate_feeds_initial_phi): Likewise.
30006 (convert_mult_to_fma): Added deferring logic, split actual
30007 transformation to convert_mult_to_fma_1.
30008 (math_opts_dom_walker): New type.
30009 (math_opts_dom_walker::after_dom_children): New method, body moved
30010 here from pass_optimize_widening_mul::execute, added deferring logic
30011 bits.
30012 (pass_optimize_widening_mul::execute): Moved most of code to
30013 math_opts_dom_walker::after_dom_children.
30014 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
30015 * config/i386/i386.c (ix86_option_override_internal): Added
30016 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
30017
30018 2018-01-12 Richard Biener <rguenther@suse.de>
30019
30020 PR debug/83157
30021 * dwarf2out.c (gen_variable_die): Do not reset old_die for
30022 inline instance vars.
30023
30024 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
30025
30026 PR target/81819
30027 * config/rx/rx.c (rx_is_restricted_memory_address):
30028 Handle SUBREG case.
30029
30030 2018-01-12 Richard Biener <rguenther@suse.de>
30031
30032 PR tree-optimization/80846
30033 * target.def (split_reduction): New target hook.
30034 * targhooks.c (default_split_reduction): New function.
30035 * targhooks.h (default_split_reduction): Declare.
30036 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
30037 target requests first reduce vectors by combining low and high
30038 parts.
30039 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
30040 (get_vectype_for_scalar_type_and_size): Export.
30041 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
30042 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
30043 * doc/tm.texi: Regenerate.
30044 * config/i386/i386.c (ix86_split_reduction): Implement
30045 TARGET_VECTORIZE_SPLIT_REDUCTION.
30046
30047 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30048
30049 PR target/83368
30050 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
30051 in PIC mode except for TARGET_VXWORKS_RTP.
30052 * config/sparc/sparc.c: Include cfgrtl.h.
30053 (TARGET_INIT_PIC_REG): Define.
30054 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
30055 (sparc_pic_register_p): New predicate.
30056 (sparc_legitimate_address_p): Use it.
30057 (sparc_legitimize_pic_address): Likewise.
30058 (sparc_delegitimize_address): Likewise.
30059 (sparc_mode_dependent_address_p): Likewise.
30060 (gen_load_pcrel_sym): Remove 4th parameter.
30061 (load_got_register): Adjust call to above. Remove obsolete stuff.
30062 (sparc_expand_prologue): Do not call load_got_register here.
30063 (sparc_flat_expand_prologue): Likewise.
30064 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
30065 (sparc_use_pseudo_pic_reg): New function.
30066 (sparc_init_pic_reg): Likewise.
30067 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30068 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
30069
30070 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
30071
30072 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
30073 Add item for branch_cost.
30074
30075 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30076
30077 PR rtl-optimization/83565
30078 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
30079 not extend the result to a larger mode for rotate operations.
30080 (num_sign_bit_copies1): Likewise.
30081
30082 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30083
30084 PR target/40411
30085 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
30086 -symbolic.
30087 Use values-Xc.o for -pedantic.
30088 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
30089
30090 2018-01-12 Martin Liska <mliska@suse.cz>
30091
30092 PR ipa/83054
30093 * ipa-devirt.c (final_warning_record::grow_type_warnings):
30094 New function.
30095 (possible_polymorphic_call_targets): Use it.
30096 (ipa_devirt): Likewise.
30097
30098 2018-01-12 Martin Liska <mliska@suse.cz>
30099
30100 * profile-count.h (enum profile_quality): Use 0 as invalid
30101 enum value of profile_quality.
30102
30103 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
30104
30105 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
30106 -mext-string options.
30107
30108 2018-01-12 Richard Biener <rguenther@suse.de>
30109
30110 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
30111 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
30112 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
30113 Likewise.
30114 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
30115
30116 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
30117
30118 * configure.ac (--with-long-double-format): Add support for the
30119 configuration option to change the default long double format on
30120 PowerPC systems.
30121 * config.gcc (powerpc*-linux*-*): Likewise.
30122 * configure: Regenerate.
30123 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
30124 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
30125 used without modification.
30126
30127 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30128
30129 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
30130 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
30131 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
30132 MISC_BUILTIN_SPEC_BARRIER.
30133 (rs6000_init_builtins): Likewise.
30134 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
30135 enum value.
30136 (speculation_barrier): New define_insn.
30137 * doc/extend.texi: Document __builtin_speculation_barrier.
30138
30139 2018-01-11 Jakub Jelinek <jakub@redhat.com>
30140
30141 PR target/83203
30142 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
30143 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
30144 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
30145 iterators.
30146 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
30147 integral modes instead of "ss" and "sd".
30148 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
30149 vectors with 32-bit and 64-bit elements.
30150 (vecdupssescalarmodesuffix): New mode attribute.
30151 (vec_dup<mode>): Use it.
30152
30153 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
30154
30155 PR target/83330
30156 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
30157 frame if argument is passed on stack.
30158
30159 2018-01-11 Jakub Jelinek <jakub@redhat.com>
30160
30161 PR target/82682
30162 * ree.c (combine_reaching_defs): Optimize also
30163 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
30164 reg2=any_extend(exp); reg1=reg2;, formatting fix.
30165
30166 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
30167
30168 PR middle-end/83189
30169 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
30170
30171 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
30172
30173 PR middle-end/83718
30174 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
30175 after they are computed.
30176
30177 2018-01-11 Bin Cheng <bin.cheng@arm.com>
30178
30179 PR tree-optimization/83695
30180 * gimple-loop-linterchange.cc
30181 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
30182 reset cached scev information after interchange.
30183 (pass_linterchange::execute): Remove call to scev_reset_htab.
30184
30185 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30186
30187 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
30188 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
30189 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
30190 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
30191 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
30192 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
30193 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
30194 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
30195 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
30196 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
30197 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
30198 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
30199 (V_lane_reg): Likewise.
30200 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
30201 New define_expand.
30202 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
30203 (vfmal_lane_low<mode>_intrinsic,
30204 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
30205 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
30206 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
30207 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
30208 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
30209 vfmsl_lane_high<mode>_intrinsic): New define_insns.
30210
30211 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30212
30213 * config/arm/arm-cpus.in (fp16fml): New feature.
30214 (ALL_SIMD): Add fp16fml.
30215 (armv8.2-a): Add fp16fml as an option.
30216 (armv8.3-a): Likewise.
30217 (armv8.4-a): Add fp16fml as part of fp16.
30218 * config/arm/arm.h (TARGET_FP16FML): Define.
30219 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
30220 when appropriate.
30221 * config/arm/arm-modes.def (V2HF): Define.
30222 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
30223 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
30224 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
30225 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
30226 vfmsl_low, vfmsl_high): New set of builtins.
30227 * config/arm/iterators.md (PLUSMINUS): New code iterator.
30228 (vfml_op): New code attribute.
30229 (VFMLHALVES): New int iterator.
30230 (VFML, VFMLSEL): New mode attributes.
30231 (V_reg): Define mapping for V2HF.
30232 (V_hi, V_lo): New mode attributes.
30233 (VF_constraint): Likewise.
30234 (vfml_half, vfml_half_selector): New int attributes.
30235 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
30236 define_expand.
30237 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
30238 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
30239 New define_insn.
30240 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
30241 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
30242 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
30243 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
30244 documentation.
30245 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
30246 Document new effective target and option set.
30247
30248 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30249
30250 * config/arm/arm-cpus.in (armv8_4): New feature.
30251 (ARMv8_4a): New fgroup.
30252 (armv8.4-a): New arch.
30253 * config/arm/arm-tables.opt: Regenerate.
30254 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
30255 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
30256 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
30257 Add matching rules for -march=armv8.4-a and extensions.
30258 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
30259
30260 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
30261
30262 PR target/81821
30263 * config/rx/rx.md (BW): New mode attribute.
30264 (sync_lock_test_and_setsi): Add mode suffix to insn output.
30265
30266 2018-01-11 Richard Biener <rguenther@suse.de>
30267
30268 PR tree-optimization/83435
30269 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
30270 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
30271 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
30272
30273 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30274 Alan Hayward <alan.hayward@arm.com>
30275 David Sherwood <david.sherwood@arm.com>
30276
30277 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
30278 field.
30279 (aarch64_classify_address): Initialize it. Track polynomial offsets.
30280 (aarch64_print_address_internal): Use it to check for a zero offset.
30281
30282 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30283 Alan Hayward <alan.hayward@arm.com>
30284 David Sherwood <david.sherwood@arm.com>
30285
30286 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
30287 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
30288 Return a poly_int64 rather than a HOST_WIDE_INT.
30289 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
30290 rather than a HOST_WIDE_INT.
30291 * config/aarch64/aarch64.h (aarch64_frame): Protect with
30292 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
30293 hard_fp_offset, frame_size, initial_adjust, callee_offset and
30294 final_offset from HOST_WIDE_INT to poly_int64.
30295 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
30296 to_constant when getting the number of units in an Advanced SIMD
30297 mode.
30298 (aarch64_builtin_vectorized_function): Check for a constant number
30299 of units.
30300 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
30301 GET_MODE_SIZE.
30302 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
30303 attribute instead of GET_MODE_NUNITS.
30304 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
30305 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
30306 GET_MODE_SIZE for fixed-size registers.
30307 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
30308 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
30309 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
30310 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
30311 (aarch64_print_operand, aarch64_print_address_internal)
30312 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
30313 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
30314 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
30315 Handle polynomial GET_MODE_SIZE.
30316 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
30317 wider than SImode without modification.
30318 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
30319 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
30320 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
30321 passing and returning SVE modes.
30322 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
30323 rather than GEN_INT.
30324 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
30325 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
30326 (aarch64_allocate_and_probe_stack_space): Likewise.
30327 (aarch64_layout_frame): Cope with polynomial offsets.
30328 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
30329 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
30330 polynomial offsets.
30331 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
30332 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
30333 poly_int64 rather than a HOST_WIDE_INT.
30334 (aarch64_get_separate_components, aarch64_process_components)
30335 (aarch64_expand_prologue, aarch64_expand_epilogue)
30336 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
30337 (aarch64_anchor_offset): New function, split out from...
30338 (aarch64_legitimize_address): ...here.
30339 (aarch64_builtin_vectorization_cost): Handle polynomial
30340 TYPE_VECTOR_SUBPARTS.
30341 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
30342 GET_MODE_NUNITS.
30343 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
30344 number of elements from the PARALLEL rather than the mode.
30345 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
30346 rather than GET_MODE_BITSIZE.
30347 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
30348 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
30349 (aarch64_expand_vec_perm_const_1): Handle polynomial
30350 d->perm.length () and d->perm elements.
30351 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
30352 Apply to_constant to d->perm elements.
30353 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
30354 polynomial CONST_VECTOR_NUNITS.
30355 (aarch64_move_pointer): Take amount as a poly_int64 rather
30356 than an int.
30357 (aarch64_progress_pointer): Avoid temporary variable.
30358 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
30359 the mode attribute instead of GET_MODE.
30360
30361 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30362 Alan Hayward <alan.hayward@arm.com>
30363 David Sherwood <david.sherwood@arm.com>
30364
30365 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
30366 x exists before using it.
30367 (aarch64_add_constant_internal): Rename to...
30368 (aarch64_add_offset_1): ...this. Replace regnum with separate
30369 src and dest rtxes. Handle the case in which they're different,
30370 including when the offset is zero. Replace scratchreg with an rtx.
30371 Use 2 additions if there is no spare register into which we can
30372 move a 16-bit constant.
30373 (aarch64_add_constant): Delete.
30374 (aarch64_add_offset): Replace reg with separate src and dest
30375 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
30376 Use aarch64_add_offset_1.
30377 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
30378 an rtx rather than an int. Take the delta as a poly_int64
30379 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
30380 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
30381 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
30382 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
30383 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
30384 and aarch64_add_sp.
30385 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
30386 aarch64_add_constant.
30387
30388 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30389
30390 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
30391 Use scalar_float_mode.
30392
30393 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30394
30395 * config/aarch64/aarch64-simd.md
30396 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
30397 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
30398 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
30399 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
30400 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
30401 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
30402 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
30403 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
30404 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
30405 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
30406
30407 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30408
30409 PR target/83514
30410 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
30411 targ_options->x_arm_arch_string is non NULL.
30412
30413 2018-01-11 Tamar Christina <tamar.christina@arm.com>
30414
30415 * config/aarch64/aarch64.h
30416 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
30417
30418 2018-01-11 Sudakshina Das <sudi.das@arm.com>
30419
30420 PR target/82096
30421 * expmed.c (emit_store_flag_force): Swap if const op0
30422 and change VOIDmode to mode of op0.
30423
30424 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30425
30426 PR rtl-optimization/83761
30427 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
30428 than bytes to mode_for_size.
30429
30430 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30431
30432 PR middle-end/83189
30433 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
30434 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
30435 profile.
30436
30437 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30438
30439 PR middle-end/83575
30440 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
30441 when in layout mode.
30442 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
30443 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
30444 partition fixup.
30445
30446 2018-01-10 Michael Collison <michael.collison@arm.com>
30447
30448 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
30449 * config/aarch64/aarch64-option-extension.def: Add
30450 AARCH64_OPT_EXTENSION of 'fp16fml'.
30451 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30452 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
30453 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
30454 * config/aarch64/constraints.md (Ui7): New constraint.
30455 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
30456 (VFMLA_SEL_W): Ditto.
30457 (f16quad): Ditto.
30458 (f16mac1): Ditto.
30459 (VFMLA16_LOW): New int iterator.
30460 (VFMLA16_HIGH): Ditto.
30461 (UNSPEC_FMLAL): New unspec.
30462 (UNSPEC_FMLSL): Ditto.
30463 (UNSPEC_FMLAL2): Ditto.
30464 (UNSPEC_FMLSL2): Ditto.
30465 (f16mac): New code attribute.
30466 * config/aarch64/aarch64-simd-builtins.def
30467 (aarch64_fmlal_lowv2sf): Ditto.
30468 (aarch64_fmlsl_lowv2sf): Ditto.
30469 (aarch64_fmlalq_lowv4sf): Ditto.
30470 (aarch64_fmlslq_lowv4sf): Ditto.
30471 (aarch64_fmlal_highv2sf): Ditto.
30472 (aarch64_fmlsl_highv2sf): Ditto.
30473 (aarch64_fmlalq_highv4sf): Ditto.
30474 (aarch64_fmlslq_highv4sf): Ditto.
30475 (aarch64_fmlal_lane_lowv2sf): Ditto.
30476 (aarch64_fmlsl_lane_lowv2sf): Ditto.
30477 (aarch64_fmlal_laneq_lowv2sf): Ditto.
30478 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
30479 (aarch64_fmlalq_lane_lowv4sf): Ditto.
30480 (aarch64_fmlsl_lane_lowv4sf): Ditto.
30481 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
30482 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
30483 (aarch64_fmlal_lane_highv2sf): Ditto.
30484 (aarch64_fmlsl_lane_highv2sf): Ditto.
30485 (aarch64_fmlal_laneq_highv2sf): Ditto.
30486 (aarch64_fmlsl_laneq_highv2sf): Ditto.
30487 (aarch64_fmlalq_lane_highv4sf): Ditto.
30488 (aarch64_fmlsl_lane_highv4sf): Ditto.
30489 (aarch64_fmlalq_laneq_highv4sf): Ditto.
30490 (aarch64_fmlsl_laneq_highv4sf): Ditto.
30491 * config/aarch64/aarch64-simd.md:
30492 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
30493 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30494 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
30495 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30496 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
30497 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
30498 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
30499 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
30500 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
30501 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
30502 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
30503 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
30504 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
30505 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
30506 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
30507 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
30508 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
30509 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
30510 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
30511 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
30512 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
30513 (vfmlsl_low_u32): Ditto.
30514 (vfmlalq_low_u32): Ditto.
30515 (vfmlslq_low_u32): Ditto.
30516 (vfmlal_high_u32): Ditto.
30517 (vfmlsl_high_u32): Ditto.
30518 (vfmlalq_high_u32): Ditto.
30519 (vfmlslq_high_u32): Ditto.
30520 (vfmlal_lane_low_u32): Ditto.
30521 (vfmlsl_lane_low_u32): Ditto.
30522 (vfmlal_laneq_low_u32): Ditto.
30523 (vfmlsl_laneq_low_u32): Ditto.
30524 (vfmlalq_lane_low_u32): Ditto.
30525 (vfmlslq_lane_low_u32): Ditto.
30526 (vfmlalq_laneq_low_u32): Ditto.
30527 (vfmlslq_laneq_low_u32): Ditto.
30528 (vfmlal_lane_high_u32): Ditto.
30529 (vfmlsl_lane_high_u32): Ditto.
30530 (vfmlal_laneq_high_u32): Ditto.
30531 (vfmlsl_laneq_high_u32): Ditto.
30532 (vfmlalq_lane_high_u32): Ditto.
30533 (vfmlslq_lane_high_u32): Ditto.
30534 (vfmlalq_laneq_high_u32): Ditto.
30535 (vfmlslq_laneq_high_u32): Ditto.
30536 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
30537 (AARCH64_FL_FOR_ARCH8_4): New.
30538 (AARCH64_ISA_F16FML): New ISA flag.
30539 (TARGET_F16FML): New feature flag for fp16fml.
30540 (doc/invoke.texi): Document new fp16fml option.
30541
30542 2018-01-10 Michael Collison <michael.collison@arm.com>
30543
30544 * config/aarch64/aarch64-builtins.c:
30545 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
30546 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30547 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
30548 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
30549 (AARCH64_ISA_SHA3): New ISA flag.
30550 (TARGET_SHA3): New feature flag for sha3.
30551 * config/aarch64/iterators.md (sha512_op): New int attribute.
30552 (CRYPTO_SHA512): New int iterator.
30553 (UNSPEC_SHA512H): New unspec.
30554 (UNSPEC_SHA512H2): Ditto.
30555 (UNSPEC_SHA512SU0): Ditto.
30556 (UNSPEC_SHA512SU1): Ditto.
30557 * config/aarch64/aarch64-simd-builtins.def
30558 (aarch64_crypto_sha512hqv2di): New builtin.
30559 (aarch64_crypto_sha512h2qv2di): Ditto.
30560 (aarch64_crypto_sha512su0qv2di): Ditto.
30561 (aarch64_crypto_sha512su1qv2di): Ditto.
30562 (aarch64_eor3qv8hi): Ditto.
30563 (aarch64_rax1qv2di): Ditto.
30564 (aarch64_xarqv2di): Ditto.
30565 (aarch64_bcaxqv8hi): Ditto.
30566 * config/aarch64/aarch64-simd.md:
30567 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
30568 (aarch64_crypto_sha512su0qv2di): Ditto.
30569 (aarch64_crypto_sha512su1qv2di): Ditto.
30570 (aarch64_eor3qv8hi): Ditto.
30571 (aarch64_rax1qv2di): Ditto.
30572 (aarch64_xarqv2di): Ditto.
30573 (aarch64_bcaxqv8hi): Ditto.
30574 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
30575 (vsha512h2q_u64): Ditto.
30576 (vsha512su0q_u64): Ditto.
30577 (vsha512su1q_u64): Ditto.
30578 (veor3q_u16): Ditto.
30579 (vrax1q_u64): Ditto.
30580 (vxarq_u64): Ditto.
30581 (vbcaxq_u16): Ditto.
30582 * config/arm/types.md (crypto_sha512): New type attribute.
30583 (crypto_sha3): Ditto.
30584 (doc/invoke.texi): Document new sha3 option.
30585
30586 2018-01-10 Michael Collison <michael.collison@arm.com>
30587
30588 * config/aarch64/aarch64-builtins.c:
30589 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
30590 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30591 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
30592 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
30593 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
30594 (AARCH64_ISA_SM4): New ISA flag.
30595 (TARGET_SM4): New feature flag for sm4.
30596 * config/aarch64/aarch64-simd-builtins.def
30597 (aarch64_sm3ss1qv4si): Ditto.
30598 (aarch64_sm3tt1aq4si): Ditto.
30599 (aarch64_sm3tt1bq4si): Ditto.
30600 (aarch64_sm3tt2aq4si): Ditto.
30601 (aarch64_sm3tt2bq4si): Ditto.
30602 (aarch64_sm3partw1qv4si): Ditto.
30603 (aarch64_sm3partw2qv4si): Ditto.
30604 (aarch64_sm4eqv4si): Ditto.
30605 (aarch64_sm4ekeyqv4si): Ditto.
30606 * config/aarch64/aarch64-simd.md:
30607 (aarch64_sm3ss1qv4si): Ditto.
30608 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
30609 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
30610 (aarch64_sm4eqv4si): Ditto.
30611 (aarch64_sm4ekeyqv4si): Ditto.
30612 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
30613 (sm3part_op): Ditto.
30614 (CRYPTO_SM3TT): Ditto.
30615 (CRYPTO_SM3PART): Ditto.
30616 (UNSPEC_SM3SS1): New unspec.
30617 (UNSPEC_SM3TT1A): Ditto.
30618 (UNSPEC_SM3TT1B): Ditto.
30619 (UNSPEC_SM3TT2A): Ditto.
30620 (UNSPEC_SM3TT2B): Ditto.
30621 (UNSPEC_SM3PARTW1): Ditto.
30622 (UNSPEC_SM3PARTW2): Ditto.
30623 (UNSPEC_SM4E): Ditto.
30624 (UNSPEC_SM4EKEY): Ditto.
30625 * config/aarch64/constraints.md (Ui2): New constraint.
30626 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
30627 * config/arm/types.md (crypto_sm3): New type attribute.
30628 (crypto_sm4): Ditto.
30629 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
30630 (vsm3tt1aq_u32): Ditto.
30631 (vsm3tt1bq_u32): Ditto.
30632 (vsm3tt2aq_u32): Ditto.
30633 (vsm3tt2bq_u32): Ditto.
30634 (vsm3partw1q_u32): Ditto.
30635 (vsm3partw2q_u32): Ditto.
30636 (vsm4eq_u32): Ditto.
30637 (vsm4ekeyq_u32): Ditto.
30638 (doc/invoke.texi): Document new sm4 option.
30639
30640 2018-01-10 Michael Collison <michael.collison@arm.com>
30641
30642 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
30643 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
30644 (AARCH64_FL_FOR_ARCH8_4): New.
30645 (AARCH64_FL_V8_4): New flag.
30646 (doc/invoke.texi): Document new armv8.4-a option.
30647
30648 2018-01-10 Michael Collison <michael.collison@arm.com>
30649
30650 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30651 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
30652 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
30653 * config/aarch64/aarch64-option-extension.def: Add
30654 AARCH64_OPT_EXTENSION of 'sha2'.
30655 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
30656 (crypto): Disable sha2 and aes if crypto disabled.
30657 (crypto): Enable aes and sha2 if enabled.
30658 (simd): Disable sha2 and aes if simd disabled.
30659 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
30660 New flags.
30661 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
30662 (TARGET_SHA2): New feature flag for sha2.
30663 (TARGET_AES): New feature flag for aes.
30664 * config/aarch64/aarch64-simd.md:
30665 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
30666 conditional on TARGET_AES.
30667 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
30668 (aarch64_crypto_sha1hsi): Make pattern conditional
30669 on TARGET_SHA2.
30670 (aarch64_crypto_sha1hv4si): Ditto.
30671 (aarch64_be_crypto_sha1hv4si): Ditto.
30672 (aarch64_crypto_sha1su1v4si): Ditto.
30673 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
30674 (aarch64_crypto_sha1su0v4si): Ditto.
30675 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
30676 (aarch64_crypto_sha256su0v4si): Ditto.
30677 (aarch64_crypto_sha256su1v4si): Ditto.
30678 (doc/invoke.texi): Document new aes and sha2 options.
30679
30680 2018-01-10 Martin Sebor <msebor@redhat.com>
30681
30682 PR tree-optimization/83781
30683 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
30684 as string arrays.
30685
30686 2018-01-11 Martin Sebor <msebor@gmail.com>
30687 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30688
30689 PR tree-optimization/83501
30690 PR tree-optimization/81703
30691
30692 * tree-ssa-strlen.c (get_string_cst): Rename...
30693 (get_string_len): ...to this. Handle global constants.
30694 (handle_char_store): Adjust.
30695
30696 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
30697 Jim Wilson <jimw@sifive.com>
30698
30699 * config/riscv/riscv-protos.h (riscv_output_return): New.
30700 * config/riscv/riscv.c (struct machine_function): New naked_p field.
30701 (riscv_attribute_table, riscv_output_return),
30702 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30703 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30704 (riscv_compute_frame_info): Only compute frame->mask if not a naked
30705 function.
30706 (riscv_expand_prologue): Add early return for naked function.
30707 (riscv_expand_epilogue): Likewise.
30708 (riscv_function_ok_for_sibcall): Return false for naked function.
30709 (riscv_set_current_function): New.
30710 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30711 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30712 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30713 * doc/extend.texi (RISC-V Function Attributes): New.
30714
30715 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
30716
30717 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30718 check for 128-bit long double before checking TCmode.
30719 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30720 128-bit long doubles before checking TFmode or TCmode.
30721 (FLOAT128_IBM_P): Likewise.
30722
30723 2018-01-10 Martin Sebor <msebor@redhat.com>
30724
30725 PR tree-optimization/83671
30726 * builtins.c (c_strlen): Unconditionally return zero for the empty
30727 string.
30728 Use -Warray-bounds for warnings.
30729 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30730 for non-constant array indices with COMPONENT_REF, arrays of
30731 arrays, and pointers to arrays.
30732 (gimple_fold_builtin_strlen): Determine and set length range for
30733 non-constant character arrays.
30734
30735 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
30736
30737 PR middle-end/81897
30738 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30739 empty blocks.
30740
30741 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
30742
30743 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30744
30745 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30746
30747 PR target/83399
30748 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30749 VECTOR_MEM_ALTIVEC_OR_VSX_P.
30750 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30751 indexed_or_indirect_operand predicate.
30752 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30753 (*vsx_le_perm_load_v8hi): Likewise.
30754 (*vsx_le_perm_load_v16qi): Likewise.
30755 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30756 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30757 (*vsx_le_perm_store_v8hi): Likewise.
30758 (*vsx_le_perm_store_v16qi): Likewise.
30759 (eight unnamed splitters): Likewise.
30760
30761 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30762
30763 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
30764 * config/rs6000/emmintrin.h: Likewise.
30765 * config/rs6000/mmintrin.h: Likewise.
30766 * config/rs6000/xmmintrin.h: Likewise.
30767
30768 2018-01-10 David Malcolm <dmalcolm@redhat.com>
30769
30770 PR c++/43486
30771 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
30772 "public_flag".
30773 * tree.c (tree_nop_conversion): Return true for location wrapper
30774 nodes.
30775 (maybe_wrap_with_location): New function.
30776 (selftest::check_strip_nops): New function.
30777 (selftest::test_location_wrappers): New function.
30778 (selftest::tree_c_tests): Call it.
30779 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
30780 (maybe_wrap_with_location): New decl.
30781 (EXPR_LOCATION_WRAPPER_P): New macro.
30782 (location_wrapper_p): New inline function.
30783 (tree_strip_any_location_wrapper): New inline function.
30784
30785 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
30786
30787 PR target/83735
30788 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
30789 stack_realign_offset for the largest alignment of stack slot
30790 actually used.
30791 (ix86_find_max_used_stack_alignment): New function.
30792 (ix86_finalize_stack_frame_flags): Use it. Set
30793 max_used_stack_alignment if we don't realign stack.
30794 * config/i386/i386.h (machine_function): Add
30795 max_used_stack_alignment.
30796
30797 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
30798
30799 * config/arm/arm.opt (-mbranch-cost): New option.
30800 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
30801 account.
30802
30803 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
30804
30805 PR target/83629
30806 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
30807 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
30808
30809 2018-01-10 Richard Biener <rguenther@suse.de>
30810
30811 PR debug/83765
30812 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
30813 early out so it also covers the case where we have a non-NULL
30814 origin.
30815
30816 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30817
30818 PR tree-optimization/83753
30819 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
30820 for non-strided grouped accesses if the number of elements is 1.
30821
30822 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30823
30824 PR target/81616
30825 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30826 * i386.h (TARGET_USE_GATHER): Define.
30827 * x86-tune.def (X86_TUNE_USE_GATHER): New.
30828
30829 2018-01-10 Martin Liska <mliska@suse.cz>
30830
30831 PR bootstrap/82831
30832 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30833 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30834 partitioning.
30835 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30836 CLEANUP_NO_PARTITIONING is not set.
30837
30838 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30839
30840 * doc/rtl.texi: Remove documentation of (const ...) wrappers
30841 for vectors, as a partial revert of r254296.
30842 * rtl.h (const_vec_p): Delete.
30843 (const_vec_duplicate_p): Don't test for vector CONSTs.
30844 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30845 * expmed.c (make_tree): Likewise.
30846
30847 Revert:
30848 * common.md (E, F): Use CONSTANT_P instead of checking for
30849 CONST_VECTOR.
30850 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30851 checking for CONST_VECTOR.
30852
30853 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30854
30855 PR middle-end/83575
30856 * predict.c (force_edge_cold): Handle in more sane way edges
30857 with no prediction.
30858
30859 2018-01-09 Carl Love <cel@us.ibm.com>
30860
30861 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30862 V4SI, V4SF types.
30863 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30864 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30865 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30866 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
30867 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30868 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
30869 * config/rs6000/rs6000-protos.h: Add extern defition for
30870 rs6000_generate_float2_double_code.
30871 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30872 function.
30873 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30874 (float2_v2df): Add define_expand.
30875
30876 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
30877
30878 PR target/83628
30879 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30880 op_mode in the force_to_mode call.
30881
30882 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30883
30884 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30885 instead of checking each element individually.
30886 (aarch64_evpc_uzp): Likewise.
30887 (aarch64_evpc_zip): Likewise.
30888 (aarch64_evpc_ext): Likewise.
30889 (aarch64_evpc_rev): Likewise.
30890 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30891 instead of checking each element individually. Return true without
30892 generating rtl if
30893 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30894 whether all selected elements come from the same input, instead of
30895 checking each element individually. Remove calls to gen_rtx_REG,
30896 start_sequence and end_sequence and instead assert that no rtl is
30897 generated.
30898
30899 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30900
30901 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30902 order of HIGH and CONST checks.
30903
30904 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30905
30906 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30907 if the destination isn't an SSA_NAME.
30908
30909 2018-01-09 Richard Biener <rguenther@suse.de>
30910
30911 PR tree-optimization/83668
30912 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30913 move prologue...
30914 (canonicalize_loop_form): ... here, renamed from ...
30915 (canonicalize_loop_closed_ssa_form): ... this and amended to
30916 swap successor edges for loop exit blocks to make us use
30917 the RPO order we need for initial schedule generation.
30918
30919 2018-01-09 Joseph Myers <joseph@codesourcery.com>
30920
30921 PR tree-optimization/64811
30922 * match.pd: When optimizing comparisons with Inf, avoid
30923 introducing or losing exceptions from comparisons with NaN.
30924
30925 2018-01-09 Martin Liska <mliska@suse.cz>
30926
30927 PR sanitizer/82517
30928 * asan.c (shadow_mem_size): Add gcc_assert.
30929
30930 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
30931
30932 Don't save registers in main().
30933
30934 PR target/83738
30935 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30936 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30937 * config/avr/avr.c (avr_set_current_function): Don't error if
30938 naked, OS_task or OS_main are specified at the same time.
30939 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30940 OS_main.
30941 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30942 attribute.
30943 * common/config/avr/avr-common.c (avr_option_optimization_table):
30944 Switch on -mmain-is-OS_task for optimizing compilations.
30945
30946 2018-01-09 Richard Biener <rguenther@suse.de>
30947
30948 PR tree-optimization/83572
30949 * graphite.c: Include cfganal.h.
30950 (graphite_transform_loops): Connect infinite loops to exit
30951 and remove fake edges at the end.
30952
30953 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30954
30955 * ipa-inline.c (edge_badness): Revert accidental checkin.
30956
30957 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30958
30959 PR ipa/80763
30960 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30961 symbols; not inline clones.
30962
30963 2018-01-09 Jakub Jelinek <jakub@redhat.com>
30964
30965 PR target/83507
30966 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30967 hard registers. Formatting fixes.
30968
30969 PR preprocessor/83722
30970 * gcc.c (try_generate_repro): Pass
30971 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30972 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30973 do_report_bug.
30974
30975 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
30976 Kito Cheng <kito.cheng@gmail.com>
30977
30978 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30979 (riscv_leaf_function_p): Delete.
30980 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30981
30982 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30983
30984 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30985 function.
30986 (do_ifelse): New function.
30987 (do_isel): New function.
30988 (do_sub3): New function.
30989 (do_add3): New function.
30990 (do_load_mask_compare): New function.
30991 (do_overlap_load_compare): New function.
30992 (expand_compare_loop): New function.
30993 (expand_block_compare): Call expand_compare_loop() when appropriate.
30994 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30995 option description.
30996 (-mblock-compare-inline-loop-limit): New option.
30997
30998 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30999
31000 PR target/83677
31001 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
31002 Reverse order of second and third operands in first alternative.
31003 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
31004 of first and second elements in UNSPEC_VPERMR vector.
31005 (altivec_expand_vec_perm_le): Likewise.
31006
31007 2018-01-08 Jeff Law <law@redhat.com>
31008
31009 PR rtl-optimizatin/81308
31010 * tree-switch-conversion.c (cfg_altered): New file scoped static.
31011 (process_switch): If group_case_labels makes a change, then set
31012 cfg_altered.
31013 (pass_convert_switch::execute): If a switch is converted, then
31014 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
31015
31016 PR rtl-optimization/81308
31017 * recog.c (split_all_insns): Conditionally cleanup the CFG after
31018 splitting insns.
31019
31020 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
31021
31022 PR target/83663 - Revert r255946
31023 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
31024 generation for cases where splatting a value is not useful.
31025 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
31026 across a vec_duplicate and a paradoxical subreg forming a vector
31027 mode to a vec_concat.
31028
31029 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31030
31031 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
31032 -march=armv8.3-a variants.
31033 * config/arm/t-multilib: Likewise.
31034 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
31035
31036 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31037
31038 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
31039 to generate rtl.
31040 (cceq_ior_compare_complement): Give it a name so I can use it, and
31041 change boolean_or_operator predicate to boolean_operator so it can
31042 be used to generate a crand.
31043 (eqne): New code iterator.
31044 (bd/bd_neg): New code_attrs.
31045 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
31046 a single define_insn.
31047 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
31048 decrement (bdnzt/bdnzf/bdzt/bdzf).
31049 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
31050 with the new names of the branch decrement patterns, and added the
31051 names of the branch decrement conditional patterns.
31052
31053 2018-01-08 Richard Biener <rguenther@suse.de>
31054
31055 PR tree-optimization/83563
31056 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
31057 cache.
31058
31059 2018-01-08 Richard Biener <rguenther@suse.de>
31060
31061 PR middle-end/83713
31062 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
31063
31064 2018-01-08 Richard Biener <rguenther@suse.de>
31065
31066 PR tree-optimization/83685
31067 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
31068 references to abnormals.
31069
31070 2018-01-08 Richard Biener <rguenther@suse.de>
31071
31072 PR lto/83719
31073 * dwarf2out.c (output_indirect_strings): Handle empty
31074 skeleton_debug_str_hash.
31075 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
31076
31077 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
31078
31079 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
31080 (emit_store_direct): Likewise.
31081 (arc_trampoline_adjust_address): Likewise.
31082 (arc_asm_trampoline_template): New function.
31083 (arc_initialize_trampoline): Use asm_trampoline_template.
31084 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
31085 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
31086 * config/arc/arc.md (flush_icache): Delete pattern.
31087
31088 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
31089
31090 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
31091 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
31092 munaligned-access.
31093
31094 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
31095
31096 PR target/83681
31097 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
31098 by not USED_FOR_TARGET.
31099 (make_pass_resolve_sw_modes): Likewise.
31100
31101 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
31102
31103 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
31104 USED_FOR_TARGET.
31105
31106 2018-01-08 Richard Biener <rguenther@suse.de>
31107
31108 PR middle-end/83580
31109 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
31110
31111 2018-01-08 Richard Biener <rguenther@suse.de>
31112
31113 PR middle-end/83517
31114 * match.pd ((t * 2) / 2) -> t): Add missing :c.
31115
31116 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
31117
31118 PR middle-end/81897
31119 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
31120 basic blocks with a small number of successors.
31121 (convert_control_dep_chain_into_preds): Improve handling of
31122 forwarder blocks.
31123 (dump_predicates): Split apart into...
31124 (dump_pred_chain): ...here...
31125 (dump_pred_info): ...and here.
31126 (can_one_predicate_be_invalidated_p): Add debugging printfs.
31127 (can_chain_union_be_invalidated_p): Improve check for invalidation
31128 of paths.
31129 (uninit_uses_cannot_happen): Avoid unnecessary if
31130 convert_control_dep_chain_into_preds yielded nothing.
31131
31132 2018-01-06 Martin Sebor <msebor@redhat.com>
31133
31134 PR tree-optimization/83640
31135 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
31136 subtracting negative offset from size.
31137 (builtin_access::overlap): Adjust offset bounds of the access to fall
31138 within the size of the object if possible.
31139
31140 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
31141
31142 PR rtl-optimization/83699
31143 * expmed.c (extract_bit_field_1): Restrict the vector usage of
31144 extract_bit_field_as_subreg to cases in which the extracted
31145 value is also a vector.
31146
31147 * lra-constraints.c (process_alt_operands): Test for the equivalence
31148 substitutions when detecting a possible reload cycle.
31149
31150 2018-01-06 Jakub Jelinek <jakub@redhat.com>
31151
31152 PR debug/83480
31153 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
31154 by default if flag_selective_schedling{,2}. Formatting fixes.
31155
31156 PR rtl-optimization/83682
31157 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
31158 if it has non-VECTOR_MODE element mode.
31159 (vec_duplicate_p): Likewise.
31160
31161 PR middle-end/83694
31162 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
31163 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
31164
31165 2018-01-05 Jakub Jelinek <jakub@redhat.com>
31166
31167 PR target/83604
31168 * config/i386/i386-builtin.def
31169 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
31170 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
31171 Require also OPTION_MASK_ISA_AVX512F in addition to
31172 OPTION_MASK_ISA_GFNI.
31173 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
31174 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
31175 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
31176 to OPTION_MASK_ISA_GFNI.
31177 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
31178 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
31179 OPTION_MASK_ISA_AVX512BW.
31180 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
31181 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
31182 addition to OPTION_MASK_ISA_GFNI.
31183 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
31184 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
31185 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
31186 to OPTION_MASK_ISA_GFNI.
31187 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
31188 a requirement for all ISAs rather than any of them with a few
31189 exceptions.
31190 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
31191 processing.
31192 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
31193 bitmasks to be enabled with 3 exceptions, instead of requiring any
31194 enabled ISA with lots of exceptions.
31195 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
31196 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
31197 Change avx512bw in isa attribute to avx512f.
31198 * config/i386/sgxintrin.h: Add license boilerplate.
31199 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
31200 to __AVX512F__ and __AVX512VL to __AVX512VL__.
31201 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
31202 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
31203 defined.
31204 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
31205 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
31206 temporarily sse2 rather than sse if not enabled already.
31207
31208 PR target/83604
31209 * config/i386/sse.md (VI248_VLBW): Rename to ...
31210 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
31211 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
31212 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
31213 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
31214 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
31215 mode iterator instead of VI248_VLBW.
31216
31217 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
31218
31219 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
31220 (record_modified): Skip clobbers; add debug output.
31221 (param_change_prob): Use sreal frequencies.
31222
31223 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
31224
31225 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
31226 punt for user-aligned variables.
31227
31228 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
31229
31230 * tree-chrec.c (chrec_contains_symbols): Return true for
31231 POLY_INT_CST.
31232
31233 2018-01-05 Sudakshina Das <sudi.das@arm.com>
31234
31235 PR target/82439
31236 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
31237 of (x|y) == x for BICS pattern.
31238
31239 2018-01-05 Jakub Jelinek <jakub@redhat.com>
31240
31241 PR tree-optimization/83605
31242 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
31243 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
31244 can throw.
31245
31246 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
31247
31248 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
31249 * config/epiphany/rtems.h: New file.
31250
31251 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31252 Uros Bizjak <ubizjak@gmail.com>
31253
31254 PR target/83554
31255 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
31256 QIreg_operand instead of register_operand predicate.
31257 * config/i386/i386.c (ix86_rop_should_change_byte_p,
31258 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
31259 comments instead of -fmitigate[-_]rop.
31260
31261 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
31262
31263 PR bootstrap/81926
31264 * cgraphunit.c (symbol_table::compile): Switch to text_section
31265 before calling assembly_start debug hook.
31266 * run-rtl-passes.c (run_rtl_passes): Likewise.
31267 Include output.h.
31268
31269 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31270
31271 * tree-vrp.c (extract_range_from_binary_expr_1): Check
31272 range_int_cst_p rather than !symbolic_range_p before calling
31273 extract_range_from_multiplicative_op_1.
31274
31275 2018-01-04 Jeff Law <law@redhat.com>
31276
31277 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
31278 redundant test in assertion.
31279
31280 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31281
31282 * doc/rtl.texi: Document machine_mode wrapper classes.
31283
31284 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31285
31286 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
31287 using tree_to_uhwi.
31288
31289 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31290
31291 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
31292 the VEC_PERM_EXPR fold to fail.
31293
31294 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31295
31296 PR debug/83585
31297 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
31298 to switched_sections.
31299
31300 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31301
31302 PR target/83680
31303 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
31304 test for d.testing.
31305
31306 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
31307
31308 PR target/83387
31309 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
31310 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
31311
31312 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31313
31314 PR debug/83666
31315 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
31316 is BLKmode and bitpos not zero or mode change is needed.
31317
31318 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31319
31320 PR target/83675
31321 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
31322 TARGET_VIS2.
31323
31324 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
31325
31326 PR target/83628
31327 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
31328 instead of MULT rtx. Update all corresponding splitters.
31329 (*saddl_se): Ditto.
31330 (*ssub<modesuffix>): Ditto.
31331 (*ssubl_se): Ditto.
31332 (*cmp_sadd_di): Update split patterns.
31333 (*cmp_sadd_si): Ditto.
31334 (*cmp_sadd_sidi): Ditto.
31335 (*cmp_ssub_di): Ditto.
31336 (*cmp_ssub_si): Ditto.
31337 (*cmp_ssub_sidi): Ditto.
31338 * config/alpha/predicates.md (const23_operand): New predicate.
31339 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
31340 Look for ASHIFT, not MULT inner operand.
31341 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
31342
31343 2018-01-04 Martin Liska <mliska@suse.cz>
31344
31345 PR gcov-profile/83669
31346 * gcov.c (output_intermediate_file): Add version to intermediate
31347 gcov file.
31348 * doc/gcov.texi: Document new field 'version' in intermediate
31349 file format. Fix location of '-k' option of gcov command.
31350
31351 2018-01-04 Martin Liska <mliska@suse.cz>
31352
31353 PR ipa/82352
31354 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
31355
31356 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31357
31358 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
31359
31360 2018-01-03 Martin Sebor <msebor@redhat.com>
31361
31362 PR tree-optimization/83655
31363 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
31364 checking calls with invalid arguments.
31365
31366 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31367
31368 * tree-vect-stmts.c (vect_get_store_rhs): New function.
31369 (vectorizable_mask_load_store): Delete.
31370 (vectorizable_call): Return false for masked loads and stores.
31371 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
31372 instead of gimple_assign_rhs1.
31373 (vectorizable_load): Handle IFN_MASK_LOAD.
31374 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
31375
31376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31377
31378 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
31379 split out from..,
31380 (vectorizable_mask_load_store): ...here.
31381 (vectorizable_load): ...and here.
31382
31383 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31384
31385 * tree-vect-stmts.c (vect_build_all_ones_mask)
31386 (vect_build_zero_merge_argument): New functions, split out from...
31387 (vectorizable_load): ...here.
31388
31389 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31390
31391 * tree-vect-stmts.c (vect_check_store_rhs): New function,
31392 split out from...
31393 (vectorizable_mask_load_store): ...here.
31394 (vectorizable_store): ...and here.
31395
31396 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31397
31398 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
31399 split out from...
31400 (vectorizable_mask_load_store): ...here.
31401
31402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31403
31404 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
31405 (vect_model_store_cost): Take a vec_load_store_type instead of a
31406 vect_def_type.
31407 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
31408 (vect_model_store_cost): Take a vec_load_store_type instead of a
31409 vect_def_type.
31410 (vectorizable_mask_load_store): Update accordingly.
31411 (vectorizable_store): Likewise.
31412 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
31413
31414 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31415
31416 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
31417 IFN_MASK_LOAD calls here rather than...
31418 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
31419
31420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31421 Alan Hayward <alan.hayward@arm.com>
31422 David Sherwood <david.sherwood@arm.com>
31423
31424 * expmed.c (extract_bit_field_1): For vector extracts,
31425 fall back to extract_bit_field_as_subreg if vec_extract
31426 isn't available.
31427
31428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31429 Alan Hayward <alan.hayward@arm.com>
31430 David Sherwood <david.sherwood@arm.com>
31431
31432 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
31433 they are variable or constant sized.
31434 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
31435 slots for constant-sized data.
31436
31437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31438 Alan Hayward <alan.hayward@arm.com>
31439 David Sherwood <david.sherwood@arm.com>
31440
31441 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
31442 handling COND_EXPRs with boolean comparisons, try to find a better
31443 basis for the mask type than the boolean itself.
31444
31445 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31446
31447 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
31448 is calculated and how it can be overridden.
31449 * genmodes.c (max_bitsize_mode_any_mode): New variable.
31450 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
31451 if defined.
31452 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
31453 if nonzero.
31454
31455 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31456 Alan Hayward <alan.hayward@arm.com>
31457 David Sherwood <david.sherwood@arm.com>
31458
31459 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
31460 Remove the mode argument.
31461 (aarch64_simd_valid_immediate): Remove the mode and inverse
31462 arguments.
31463 * config/aarch64/iterators.md (bitsize): New iterator.
31464 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
31465 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
31466 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
31467 aarch64_simd_valid_immediate.
31468 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
31469 (aarch64_reg_or_bic_imm): Likewise.
31470 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
31471 with an insn_type enum and msl with a modifier_type enum.
31472 Replace element_width with a scalar_mode. Change the shift
31473 to unsigned int. Add constructors for scalar_float_mode and
31474 scalar_int_mode elements.
31475 (aarch64_vect_float_const_representable_p): Delete.
31476 (aarch64_can_const_movi_rtx_p)
31477 (aarch64_simd_scalar_immediate_valid_for_move)
31478 (aarch64_simd_make_constant): Update call to
31479 aarch64_simd_valid_immediate.
31480 (aarch64_advsimd_valid_immediate_hs): New function.
31481 (aarch64_advsimd_valid_immediate): Likewise.
31482 (aarch64_simd_valid_immediate): Remove mode and inverse
31483 arguments. Rewrite to use the above. Use const_vec_duplicate_p
31484 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
31485 and aarch64_float_const_representable_p on the result.
31486 (aarch64_output_simd_mov_immediate): Remove mode argument.
31487 Update call to aarch64_simd_valid_immediate and use of
31488 simd_immediate_info.
31489 (aarch64_output_scalar_simd_mov_immediate): Update call
31490 accordingly.
31491
31492 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31493 Alan Hayward <alan.hayward@arm.com>
31494 David Sherwood <david.sherwood@arm.com>
31495
31496 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
31497 (mode_nunits): Likewise CONST_MODE_NUNITS.
31498 * machmode.def (ADJUST_NUNITS): Document.
31499 * genmodes.c (mode_data::need_nunits_adj): New field.
31500 (blank_mode): Update accordingly.
31501 (adj_nunits): New variable.
31502 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
31503 parameter.
31504 (emit_mode_size_inline): Set need_bytesize_adj for all modes
31505 listed in adj_nunits.
31506 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
31507 listed in adj_nunits. Don't emit case statements for such modes.
31508 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
31509 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
31510 nothing if adj_nunits is nonnull.
31511 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
31512 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
31513 (emit_mode_fbit): Update use of print_maybe_const_decl.
31514 (emit_move_size): Likewise. Treat the array as non-const
31515 if adj_nunits.
31516 (emit_mode_adjustments): Handle adj_nunits.
31517
31518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31519
31520 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
31521 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
31522 (VECTOR_MODES): Use it.
31523 (make_vector_modes): Take the prefix as an argument.
31524
31525 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31526 Alan Hayward <alan.hayward@arm.com>
31527 David Sherwood <david.sherwood@arm.com>
31528
31529 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
31530 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
31531 for MODE_VECTOR_BOOL.
31532 * machmode.def (VECTOR_BOOL_MODE): Document.
31533 * genmodes.c (VECTOR_BOOL_MODE): New macro.
31534 (make_vector_bool_mode): New function.
31535 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
31536 MODE_VECTOR_BOOL.
31537 * lto-streamer-in.c (lto_input_mode_table): Likewise.
31538 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
31539 Likewise.
31540 * stor-layout.c (int_mode_for_mode): Likewise.
31541 * tree.c (build_vector_type_for_mode): Likewise.
31542 * varasm.c (output_constant_pool_2): Likewise.
31543 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
31544 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
31545 for MODE_VECTOR_BOOL.
31546 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
31547 of mode class checks.
31548 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
31549 instead of a list of mode class checks.
31550 (expand_vector_scalar_condition): Likewise.
31551 (type_for_widest_vector_mode): Handle BImode as an inner mode.
31552
31553 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31554 Alan Hayward <alan.hayward@arm.com>
31555 David Sherwood <david.sherwood@arm.com>
31556
31557 * machmode.h (mode_size): Change from unsigned short to
31558 poly_uint16_pod.
31559 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
31560 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31561 or if measurement_type is not polynomial.
31562 (fixed_size_mode::includes_p): Check for constant-sized modes.
31563 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
31564 return a poly_uint16 rather than an unsigned short.
31565 (emit_mode_size): Change the type of mode_size from unsigned short
31566 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
31567 (emit_mode_adjustments): Cope with polynomial vector sizes.
31568 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31569 for GET_MODE_SIZE.
31570 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31571 for GET_MODE_SIZE.
31572 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
31573 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
31574 * caller-save.c (setup_save_areas): Likewise.
31575 (replace_reg_with_saved_mem): Likewise.
31576 * calls.c (emit_library_call_value_1): Likewise.
31577 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
31578 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
31579 (gen_lowpart_for_combine): Likewise.
31580 * convert.c (convert_to_integer_1): Likewise.
31581 * cse.c (equiv_constant, cse_insn): Likewise.
31582 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
31583 (cselib_subst_to_values): Likewise.
31584 * dce.c (word_dce_process_block): Likewise.
31585 * df-problems.c (df_word_lr_mark_ref): Likewise.
31586 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
31587 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
31588 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
31589 (rtl_for_decl_location): Likewise.
31590 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
31591 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
31592 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
31593 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
31594 (expand_expr_real_1): Likewise.
31595 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
31596 (pad_below): Likewise.
31597 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31598 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
31599 * ira.c (get_subreg_tracking_sizes): Likewise.
31600 * ira-build.c (ira_create_allocno_objects): Likewise.
31601 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
31602 (ira_sort_regnos_for_alter_reg): Likewise.
31603 * ira-costs.c (record_operand_costs): Likewise.
31604 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
31605 (resolve_simple_move): Likewise.
31606 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
31607 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
31608 (lra_constraints): Likewise.
31609 (CONST_POOL_OK_P): Reject variable-sized modes.
31610 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
31611 (add_pseudo_to_slot, lra_spill): Likewise.
31612 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31613 * optabs-query.c (get_best_extraction_insn): Likewise.
31614 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31615 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
31616 (expand_mult_highpart, valid_multiword_target_p): Likewise.
31617 * recog.c (offsettable_address_addr_space_p): Likewise.
31618 * regcprop.c (maybe_mode_change): Likewise.
31619 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
31620 * regrename.c (build_def_use): Likewise.
31621 * regstat.c (dump_reg_info): Likewise.
31622 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
31623 (find_reloads, find_reloads_subreg_address): Likewise.
31624 * reload1.c (eliminate_regs_1): Likewise.
31625 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
31626 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
31627 (simplify_binary_operation_1, simplify_subreg): Likewise.
31628 * targhooks.c (default_function_arg_padding): Likewise.
31629 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
31630 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
31631 (verify_gimple_assign_ternary): Likewise.
31632 * tree-inline.c (estimate_move_cost): Likewise.
31633 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31634 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
31635 (get_address_cost_ainc): Likewise.
31636 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31637 (vect_supportable_dr_alignment): Likewise.
31638 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31639 (vectorizable_reduction): Likewise.
31640 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
31641 (vectorizable_operation, vectorizable_load): Likewise.
31642 * tree.c (build_same_sized_truth_vector_type): Likewise.
31643 * valtrack.c (cleanup_auto_inc_dec): Likewise.
31644 * var-tracking.c (emit_note_insn_var_location): Likewise.
31645 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
31646 (ADDR_VEC_ALIGN): Likewise.
31647
31648 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31649 Alan Hayward <alan.hayward@arm.com>
31650 David Sherwood <david.sherwood@arm.com>
31651
31652 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
31653 unsigned short.
31654 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31655 or if measurement_type is polynomial.
31656 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
31657 * combine.c (make_extraction): Likewise.
31658 * dse.c (find_shift_sequence): Likewise.
31659 * dwarf2out.c (mem_loc_descriptor): Likewise.
31660 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
31661 (extract_bit_field, extract_low_bits): Likewise.
31662 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
31663 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
31664 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
31665 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
31666 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31667 * reload.c (find_reloads): Likewise.
31668 * reload1.c (alter_reg): Likewise.
31669 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
31670 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
31671 * tree-if-conv.c (predicate_mem_writes): Likewise.
31672 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
31673 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
31674 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
31675 * valtrack.c (dead_debug_insert_temp): Likewise.
31676 * varasm.c (mergeable_constant_section): Likewise.
31677 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
31678
31679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31680 Alan Hayward <alan.hayward@arm.com>
31681 David Sherwood <david.sherwood@arm.com>
31682
31683 * expr.c (expand_assignment): Cope with polynomial mode sizes
31684 when assigning to a CONCAT.
31685
31686 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31687 Alan Hayward <alan.hayward@arm.com>
31688 David Sherwood <david.sherwood@arm.com>
31689
31690 * machmode.h (mode_precision): Change from unsigned short to
31691 poly_uint16_pod.
31692 (mode_to_precision): Return a poly_uint16 rather than an unsigned
31693 short.
31694 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31695 or if measurement_type is not polynomial.
31696 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
31697 in which the mode is already known to be a scalar_int_mode.
31698 * genmodes.c (emit_mode_precision): Change the type of mode_precision
31699 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
31700 initializer.
31701 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31702 for GET_MODE_PRECISION.
31703 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31704 for GET_MODE_PRECISION.
31705 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31706 as polynomial.
31707 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31708 (expand_field_assignment, make_extraction): Likewise.
31709 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31710 (get_last_value): Likewise.
31711 * convert.c (convert_to_integer_1): Likewise.
31712 * cse.c (cse_insn): Likewise.
31713 * expr.c (expand_expr_real_1): Likewise.
31714 * lra-constraints.c (simplify_operand_subreg): Likewise.
31715 * optabs-query.c (can_atomic_load_p): Likewise.
31716 * optabs.c (expand_atomic_load): Likewise.
31717 (expand_atomic_store): Likewise.
31718 * ree.c (combine_reaching_defs): Likewise.
31719 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31720 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31721 * tree.h (type_has_mode_precision_p): Likewise.
31722 * ubsan.c (instrument_si_overflow): Likewise.
31723
31724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31725 Alan Hayward <alan.hayward@arm.com>
31726 David Sherwood <david.sherwood@arm.com>
31727
31728 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31729 polynomial numbers of units.
31730 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31731 (valid_vector_subparts_p): New function.
31732 (build_vector_type): Remove temporary shim and take the number
31733 of units as a poly_uint64 rather than an int.
31734 (build_opaque_vector_type): Take the number of units as a
31735 poly_uint64 rather than an int.
31736 * tree.c (build_vector_from_ctor): Handle polynomial
31737 TYPE_VECTOR_SUBPARTS.
31738 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31739 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31740 (build_vector_from_val): If the number of units is variable,
31741 use build_vec_duplicate_cst for constant operands and
31742 VEC_DUPLICATE_EXPR otherwise.
31743 (make_vector_type): Remove temporary is_constant ().
31744 (build_vector_type, build_opaque_vector_type): Take the number of
31745 units as a poly_uint64 rather than an int.
31746 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31747 VECTOR_CST_NELTS.
31748 * cfgexpand.c (expand_debug_expr): Likewise.
31749 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31750 (store_constructor, expand_expr_real_1): Likewise.
31751 (const_scalar_mask_from_tree): Likewise.
31752 * fold-const-call.c (fold_const_reduction): Likewise.
31753 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31754 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31755 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31756 (fold_relational_const): Likewise.
31757 (native_interpret_vector): Likewise. Change the size from an
31758 int to an unsigned int.
31759 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31760 TYPE_VECTOR_SUBPARTS.
31761 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31762 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
31763 duplicating a non-constant operand into a variable-length vector.
31764 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
31765 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
31766 * ipa-icf.c (sem_variable::equals): Likewise.
31767 * match.pd: Likewise.
31768 * omp-simd-clone.c (simd_clone_subparts): Likewise.
31769 * print-tree.c (print_node): Likewise.
31770 * stor-layout.c (layout_type): Likewise.
31771 * targhooks.c (default_builtin_vectorization_cost): Likewise.
31772 * tree-cfg.c (verify_gimple_comparison): Likewise.
31773 (verify_gimple_assign_binary): Likewise.
31774 (verify_gimple_assign_ternary): Likewise.
31775 (verify_gimple_assign_single): Likewise.
31776 * tree-pretty-print.c (dump_generic_node): Likewise.
31777 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31778 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
31779 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
31780 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
31781 (vect_shift_permute_load_chain): Likewise.
31782 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
31783 (expand_vector_condition, optimize_vector_constructor): Likewise.
31784 (lower_vec_perm, get_compute_type): Likewise.
31785 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31786 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
31787 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
31788 (vect_recog_mask_conversion_pattern): Likewise.
31789 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
31790 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
31791 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31792 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
31793 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
31794 (vectorizable_shift, vectorizable_operation, vectorizable_store)
31795 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
31796 (supportable_widening_operation): Likewise.
31797 (supportable_narrowing_operation): Likewise.
31798 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
31799 Likewise.
31800 * varasm.c (output_constant): Likewise.
31801
31802 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31803 Alan Hayward <alan.hayward@arm.com>
31804 David Sherwood <david.sherwood@arm.com>
31805
31806 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
31807 so that both the length == 3 and length != 3 cases set up their
31808 own permute vectors. Add comments explaining why we know the
31809 number of elements is constant.
31810 (vect_permute_load_chain): Likewise.
31811
31812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31813 Alan Hayward <alan.hayward@arm.com>
31814 David Sherwood <david.sherwood@arm.com>
31815
31816 * machmode.h (mode_nunits): Change from unsigned char to
31817 poly_uint16_pod.
31818 (ONLY_FIXED_SIZE_MODES): New macro.
31819 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
31820 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
31821 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
31822 New typedefs.
31823 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
31824 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31825 or if measurement_type is not polynomial.
31826 * genmodes.c (ZERO_COEFFS): New macro.
31827 (emit_mode_nunits_inline): Make mode_nunits_inline return a
31828 poly_uint16.
31829 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31830 Use ZERO_COEFFS when emitting initializers.
31831 * data-streamer.h (bp_pack_poly_value): New function.
31832 (bp_unpack_poly_value): Likewise.
31833 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31834 for GET_MODE_NUNITS.
31835 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31836 for GET_MODE_NUNITS.
31837 * tree.c (make_vector_type): Remove temporary shim and make
31838 the real function take the number of units as a poly_uint64
31839 rather than an int.
31840 (build_vector_type_for_mode): Handle polynomial nunits.
31841 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31842 * emit-rtl.c (const_vec_series_p_1): Likewise.
31843 (gen_rtx_CONST_VECTOR): Likewise.
31844 * fold-const.c (test_vec_duplicate_folding): Likewise.
31845 * genrecog.c (validate_pattern): Likewise.
31846 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31847 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31848 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31849 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31850 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31851 * rtlanal.c (subreg_get_info): Likewise.
31852 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31853 (vect_grouped_load_supported): Likewise.
31854 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31855 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31856 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31857 (simplify_const_unary_operation, simplify_binary_operation_1)
31858 (simplify_const_binary_operation, simplify_ternary_operation)
31859 (test_vector_ops_duplicate, test_vector_ops): Likewise.
31860 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31861 instead of CONST_VECTOR_NUNITS.
31862 * varasm.c (output_constant_pool_2): Likewise.
31863 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31864 explicit-encoded elements in the XVEC for variable-length vectors.
31865
31866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31867
31868 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31869
31870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31871 Alan Hayward <alan.hayward@arm.com>
31872 David Sherwood <david.sherwood@arm.com>
31873
31874 * coretypes.h (fixed_size_mode): Declare.
31875 (fixed_size_mode_pod): New typedef.
31876 * builtins.h (target_builtins::x_apply_args_mode)
31877 (target_builtins::x_apply_result_mode): Change type to
31878 fixed_size_mode_pod.
31879 * builtins.c (apply_args_size, apply_result_size, result_vector)
31880 (expand_builtin_apply_args_1, expand_builtin_apply)
31881 (expand_builtin_return): Update accordingly.
31882
31883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31884
31885 * cse.c (hash_rtx_cb): Hash only the encoded elements.
31886 * cselib.c (cselib_hash_rtx): Likewise.
31887 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31888 CONST_VECTOR encoding.
31889
31890 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31891 Jeff Law <law@redhat.com>
31892
31893 PR target/83641
31894 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31895 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31896 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31897 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31898
31899 PR target/83641
31900 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31901 explicitly probe *sp in a noreturn function if there were any callee
31902 register saves or frame pointer is needed.
31903
31904 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31905
31906 PR debug/83621
31907 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31908 BLKmode for ternary, binary or unary expressions.
31909
31910 PR debug/83645
31911 * var-tracking.c (delete_vta_debug_insn): New inline function.
31912 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31913 insns from get_insns () to NULL instead of each bb separately.
31914 Use delete_vta_debug_insn. No longer static.
31915 (vt_debug_insns_local, variable_tracking_main_1): Adjust
31916 delete_vta_debug_insns callers.
31917 * rtl.h (delete_vta_debug_insns): Declare.
31918 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31919 instead of variable_tracking_main.
31920
31921 2018-01-03 Martin Sebor <msebor@redhat.com>
31922
31923 PR tree-optimization/83603
31924 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31925 arguments past the endof the argument list in functions declared
31926 without a prototype.
31927 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31928 Avoid checking when arguments are null.
31929
31930 2018-01-03 Martin Sebor <msebor@redhat.com>
31931
31932 PR c/83559
31933 * doc/extend.texi (attribute const): Fix a typo.
31934 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31935 issuing -Wsuggest-attribute for void functions.
31936
31937 2018-01-03 Martin Sebor <msebor@redhat.com>
31938
31939 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31940 offset_int::from instead of wide_int::to_shwi.
31941 (maybe_diag_overlap): Remove assertion.
31942 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31943 * gimple-ssa-sprintf.c (format_directive): Same.
31944 (parse_directive): Same.
31945 (sprintf_dom_walker::compute_format_length): Same.
31946 (try_substitute_return_value): Same.
31947
31948 2018-01-03 Jeff Law <law@redhat.com>
31949
31950 PR middle-end/83654
31951 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31952 non-constant residual for zero at runtime and avoid probing in
31953 that case. Reorganize code for trailing problem to mirror handling
31954 of the residual.
31955
31956 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31957
31958 PR tree-optimization/83501
31959 * tree-ssa-strlen.c (get_string_cst): New.
31960 (handle_char_store): Call get_string_cst.
31961
31962 2018-01-03 Martin Liska <mliska@suse.cz>
31963
31964 PR tree-optimization/83593
31965 * tree-ssa-strlen.c: Include tree-cfg.h.
31966 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31967 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31968 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31969 to false.
31970 (strlen_dom_walker::before_dom_children): Call
31971 gimple_purge_dead_eh_edges. Dump tranformation with details
31972 dump flags.
31973 (strlen_dom_walker::before_dom_children): Update call by adding
31974 new argument cleanup_eh.
31975 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31976
31977 2018-01-03 Martin Liska <mliska@suse.cz>
31978
31979 PR ipa/83549
31980 * cif-code.def (VARIADIC_THUNK): New enum value.
31981 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31982 thunks.
31983
31984 2018-01-03 Jan Beulich <jbeulich@suse.com>
31985
31986 * sse.md (mov<mode>_internal): Tighten condition for when to use
31987 vmovdqu<ssescalarsize> for TI and OI modes.
31988
31989 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31990
31991 Update copyright years.
31992
31993 2018-01-03 Martin Liska <mliska@suse.cz>
31994
31995 PR ipa/83594
31996 * ipa-visibility.c (function_and_variable_visibility): Skip
31997 functions with noipa attribure.
31998
31999 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32000
32001 * gcc.c (process_command): Update copyright notice dates.
32002 * gcov-dump.c (print_version): Ditto.
32003 * gcov.c (print_version): Ditto.
32004 * gcov-tool.c (print_version): Ditto.
32005 * gengtype.c (create_file): Ditto.
32006 * doc/cpp.texi: Bump @copying's copyright year.
32007 * doc/cppinternals.texi: Ditto.
32008 * doc/gcc.texi: Ditto.
32009 * doc/gccint.texi: Ditto.
32010 * doc/gcov.texi: Ditto.
32011 * doc/install.texi: Ditto.
32012 * doc/invoke.texi: Ditto.
32013
32014 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32015
32016 * vector-builder.h (vector_builder::m_full_nelts): Change from
32017 unsigned int to poly_uint64.
32018 (vector_builder::full_nelts): Update prototype accordingly.
32019 (vector_builder::new_vector): Likewise.
32020 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
32021 (vector_builder::operator ==): Likewise.
32022 (vector_builder::finalize): Likewise.
32023 * int-vector-builder.h (int_vector_builder::int_vector_builder):
32024 Take the number of elements as a poly_uint64 rather than an
32025 unsigned int.
32026 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
32027 from unsigned int to poly_uint64.
32028 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
32029 (vec_perm_indices::new_vector): Likewise.
32030 (vec_perm_indices::length): Likewise.
32031 (vec_perm_indices::nelts_per_input): Likewise.
32032 (vec_perm_indices::input_nelts): Likewise.
32033 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
32034 number of elements per input as a poly_uint64 rather than an
32035 unsigned int. Use the original encoding for variable-length
32036 vectors, rather than clamping each individual element.
32037 For the second and subsequent elements in each pattern,
32038 clamp the step and base before clamping their sum.
32039 (vec_perm_indices::series_p): Handle polynomial element counts.
32040 (vec_perm_indices::all_in_range_p): Likewise.
32041 (vec_perm_indices_to_tree): Likewise.
32042 (vec_perm_indices_to_rtx): Likewise.
32043 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
32044 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
32045 (tree_vector_builder::new_binary_operation): Handle polynomial
32046 element counts. Return false if we need to know the number
32047 of elements at compile time.
32048 * fold-const.c (fold_vec_perm): Punt if the number of elements
32049 isn't known at compile time.
32050
32051 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32052
32053 * vec-perm-indices.h (vec_perm_builder): Change element type
32054 from HOST_WIDE_INT to poly_int64.
32055 (vec_perm_indices::element_type): Update accordingly.
32056 (vec_perm_indices::clamp): Handle polynomial element_types.
32057 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32058 (vec_perm_indices::all_in_range_p): Likewise.
32059 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
32060 than shwi trees.
32061 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
32062 polynomial vec_perm_indices element types.
32063 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
32064 * fold-const.c (fold_vec_perm): Likewise.
32065 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
32066 * tree-vect-generic.c (lower_vec_perm): Likewise.
32067 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32068 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
32069 element type to HOST_WIDE_INT.
32070
32071 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32072 Alan Hayward <alan.hayward@arm.com>
32073 David Sherwood <david.sherwood@arm.com>
32074
32075 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
32076 rather than an int. Use plus_constant.
32077 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
32078 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
32079
32080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32081 Alan Hayward <alan.hayward@arm.com>
32082 David Sherwood <david.sherwood@arm.com>
32083
32084 * calls.c (emit_call_1, expand_call): Change struct_value_size from
32085 a HOST_WIDE_INT to a poly_int64.
32086
32087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32088 Alan Hayward <alan.hayward@arm.com>
32089 David Sherwood <david.sherwood@arm.com>
32090
32091 * calls.c (load_register_parameters): Cope with polynomial
32092 mode sizes. Require a constant size for BLKmode parameters
32093 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
32094 forces a parameter to be padded at the lsb end in order to
32095 fill a complete number of words, require the parameter size
32096 to be ordered wrt UNITS_PER_WORD.
32097
32098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32099 Alan Hayward <alan.hayward@arm.com>
32100 David Sherwood <david.sherwood@arm.com>
32101
32102 * reload1.c (spill_stack_slot_width): Change element type
32103 from unsigned int to poly_uint64_pod.
32104 (alter_reg): Treat mode sizes as polynomial.
32105
32106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32107 Alan Hayward <alan.hayward@arm.com>
32108 David Sherwood <david.sherwood@arm.com>
32109
32110 * reload.c (complex_word_subreg_p): New function.
32111 (reload_inner_reg_of_subreg, push_reload): Use it.
32112
32113 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32114 Alan Hayward <alan.hayward@arm.com>
32115 David Sherwood <david.sherwood@arm.com>
32116
32117 * lra-constraints.c (process_alt_operands): Reject matched
32118 operands whose sizes aren't ordered.
32119 (match_reload): Refer to this check here.
32120
32121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32122 Alan Hayward <alan.hayward@arm.com>
32123 David Sherwood <david.sherwood@arm.com>
32124
32125 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
32126 that the mode size is in the set {1, 2, 4, 8, 16}.
32127
32128 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32129 Alan Hayward <alan.hayward@arm.com>
32130 David Sherwood <david.sherwood@arm.com>
32131
32132 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
32133 Use plus_constant instead of gen_rtx_PLUS.
32134
32135 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32136 Alan Hayward <alan.hayward@arm.com>
32137 David Sherwood <david.sherwood@arm.com>
32138
32139 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
32140 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
32141 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
32142 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
32143 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
32144 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
32145 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
32146 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
32147 * config/i386/i386.c (ix86_push_rounding): ...this new function.
32148 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
32149 a poly_int64.
32150 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
32151 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
32152 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
32153 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
32154 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
32155 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
32156 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
32157 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
32158 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
32159 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
32160 function.
32161 * expr.c (emit_move_resolve_push): Treat the input and result
32162 of PUSH_ROUNDING as a poly_int64.
32163 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
32164 (emit_push_insn): Likewise.
32165 * lra-eliminations.c (mark_not_eliminable): Likewise.
32166 * recog.c (push_operand): Likewise.
32167 * reload1.c (elimination_effects): Likewise.
32168 * rtlanal.c (nonzero_bits1): Likewise.
32169 * calls.c (store_one_arg): Likewise. Require the padding to be
32170 known at compile time.
32171
32172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32173 Alan Hayward <alan.hayward@arm.com>
32174 David Sherwood <david.sherwood@arm.com>
32175
32176 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
32177 Use plus_constant instead of gen_rtx_PLUS.
32178
32179 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32180 Alan Hayward <alan.hayward@arm.com>
32181 David Sherwood <david.sherwood@arm.com>
32182
32183 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
32184 rather than an int.
32185
32186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32187 Alan Hayward <alan.hayward@arm.com>
32188 David Sherwood <david.sherwood@arm.com>
32189
32190 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
32191 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
32192 via stack temporaries. Treat the mode size as polynomial too.
32193
32194 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32195 Alan Hayward <alan.hayward@arm.com>
32196 David Sherwood <david.sherwood@arm.com>
32197
32198 * expr.c (expand_expr_real_2): When handling conversions involving
32199 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
32200 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
32201 as a poly_uint64 too.
32202
32203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32204 Alan Hayward <alan.hayward@arm.com>
32205 David Sherwood <david.sherwood@arm.com>
32206
32207 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
32208
32209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32210 Alan Hayward <alan.hayward@arm.com>
32211 David Sherwood <david.sherwood@arm.com>
32212
32213 * combine.c (can_change_dest_mode): Handle polynomial
32214 REGMODE_NATURAL_SIZE.
32215 * expmed.c (store_bit_field_1): Likewise.
32216 * expr.c (store_constructor): Likewise.
32217 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
32218 and polynomial REGMODE_NATURAL_SIZE.
32219 (gen_lowpart_common): Likewise.
32220 * reginfo.c (record_subregs_of_mode): Likewise.
32221 * rtlanal.c (read_modify_subreg_p): Likewise.
32222
32223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32224 Alan Hayward <alan.hayward@arm.com>
32225 David Sherwood <david.sherwood@arm.com>
32226
32227 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
32228 numbers of elements.
32229
32230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32231 Alan Hayward <alan.hayward@arm.com>
32232 David Sherwood <david.sherwood@arm.com>
32233
32234 * match.pd: Cope with polynomial numbers of vector elements.
32235
32236 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32237 Alan Hayward <alan.hayward@arm.com>
32238 David Sherwood <david.sherwood@arm.com>
32239
32240 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
32241 in a POINTER_PLUS_EXPR.
32242
32243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32244 Alan Hayward <alan.hayward@arm.com>
32245 David Sherwood <david.sherwood@arm.com>
32246
32247 * omp-simd-clone.c (simd_clone_subparts): New function.
32248 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
32249 (ipa_simd_modify_function_body): Likewise.
32250
32251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32252 Alan Hayward <alan.hayward@arm.com>
32253 David Sherwood <david.sherwood@arm.com>
32254
32255 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
32256 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
32257 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
32258 (expand_vector_condition, vector_element): Likewise.
32259 (subparts_gt): New function.
32260 (get_compute_type): Use subparts_gt.
32261 (count_type_subparts): Delete.
32262 (expand_vector_operations_1): Use subparts_gt instead of
32263 count_type_subparts.
32264
32265 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32266 Alan Hayward <alan.hayward@arm.com>
32267 David Sherwood <david.sherwood@arm.com>
32268
32269 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
32270 (vect_compile_time_alias): ...this new function. Do the calculation
32271 on poly_ints rather than trees.
32272 (vect_prune_runtime_alias_test_list): Update call accordingly.
32273
32274 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32275 Alan Hayward <alan.hayward@arm.com>
32276 David Sherwood <david.sherwood@arm.com>
32277
32278 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
32279 numbers of units.
32280 (vect_schedule_slp_instance): Likewise.
32281
32282 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32283 Alan Hayward <alan.hayward@arm.com>
32284 David Sherwood <david.sherwood@arm.com>
32285
32286 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
32287 constant and extern definitions for variable-length vectors.
32288 (vect_get_constant_vectors): Note that the number of units
32289 is known to be constant.
32290
32291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32292 Alan Hayward <alan.hayward@arm.com>
32293 David Sherwood <david.sherwood@arm.com>
32294
32295 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
32296 of units as polynomial. Choose between WIDE and NARROW based
32297 on multiple_p.
32298
32299 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32300 Alan Hayward <alan.hayward@arm.com>
32301 David Sherwood <david.sherwood@arm.com>
32302
32303 * tree-vect-stmts.c (simd_clone_subparts): New function.
32304 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
32305
32306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32307 Alan Hayward <alan.hayward@arm.com>
32308 David Sherwood <david.sherwood@arm.com>
32309
32310 * tree-vect-stmts.c (vectorizable_call): Treat the number of
32311 vectors as polynomial. Use build_index_vector for
32312 IFN_GOMP_SIMD_LANE.
32313
32314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32315 Alan Hayward <alan.hayward@arm.com>
32316 David Sherwood <david.sherwood@arm.com>
32317
32318 * tree-vect-stmts.c (get_load_store_type): Treat the number of
32319 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
32320 for variable-length vectors.
32321 (vectorizable_mask_load_store): Treat the number of units as
32322 polynomial, asserting that it is constant if the condition has
32323 already been enforced.
32324 (vectorizable_store, vectorizable_load): Likewise.
32325
32326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32327 Alan Hayward <alan.hayward@arm.com>
32328 David Sherwood <david.sherwood@arm.com>
32329
32330 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
32331 of units as polynomial. Punt if we can't tell at compile time
32332 which vector contains the final result.
32333
32334 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32335 Alan Hayward <alan.hayward@arm.com>
32336 David Sherwood <david.sherwood@arm.com>
32337
32338 * tree-vect-loop.c (vectorizable_induction): Treat the number
32339 of units as polynomial. Punt on SLP inductions. Use an integer
32340 VEC_SERIES_EXPR for variable-length integer reductions. Use a
32341 cast of such a series for variable-length floating-point
32342 reductions.
32343
32344 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32345 Alan Hayward <alan.hayward@arm.com>
32346 David Sherwood <david.sherwood@arm.com>
32347
32348 * tree.h (build_index_vector): Declare.
32349 * tree.c (build_index_vector): New function.
32350 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
32351 of units as polynomial, forcibly converting it to a constant if
32352 vectorizable_reduction has already enforced the condition.
32353 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
32354 to create a {1,2,3,...} vector.
32355 (vectorizable_reduction): Treat the number of units as polynomial.
32356 Choose vectype_in based on the largest scalar element size rather
32357 than the smallest number of units. Enforce the restrictions
32358 relied on above.
32359
32360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32361 Alan Hayward <alan.hayward@arm.com>
32362 David Sherwood <david.sherwood@arm.com>
32363
32364 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
32365 number of units as polynomial.
32366
32367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32368 Alan Hayward <alan.hayward@arm.com>
32369 David Sherwood <david.sherwood@arm.com>
32370
32371 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
32372 * target.def (autovectorize_vector_sizes): Return the vector sizes
32373 by pointer, using vector_sizes rather than a bitmask.
32374 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
32375 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
32376 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
32377 Likewise.
32378 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
32379 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
32380 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
32381 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
32382 * omp-general.c (omp_max_vf): Likewise.
32383 * omp-low.c (omp_clause_aligned_alignment): Likewise.
32384 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
32385 * tree-vect-loop.c (vect_analyze_loop): Likewise.
32386 * tree-vect-slp.c (vect_slp_bb): Likewise.
32387 * doc/tm.texi: Regenerate.
32388 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
32389 to a poly_uint64.
32390 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
32391 the vector size as a poly_uint64 rather than an unsigned int.
32392 (current_vector_size): Change from an unsigned int to a poly_uint64.
32393 (get_vectype_for_scalar_type): Update accordingly.
32394 * tree.h (build_truth_vector_type): Take the size and number of
32395 units as a poly_uint64 rather than an unsigned int.
32396 (build_vector_type): Add a temporary overload that takes
32397 the number of units as a poly_uint64 rather than an unsigned int.
32398 * tree.c (make_vector_type): Likewise.
32399 (build_truth_vector_type): Take the number of units as a poly_uint64
32400 rather than an unsigned int.
32401
32402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32403 Alan Hayward <alan.hayward@arm.com>
32404 David Sherwood <david.sherwood@arm.com>
32405
32406 * target.def (get_mask_mode): Take the number of units and length
32407 as poly_uint64s rather than unsigned ints.
32408 * targhooks.h (default_get_mask_mode): Update accordingly.
32409 * targhooks.c (default_get_mask_mode): Likewise.
32410 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
32411 * doc/tm.texi: Regenerate.
32412
32413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32414 Alan Hayward <alan.hayward@arm.com>
32415 David Sherwood <david.sherwood@arm.com>
32416
32417 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
32418 * omp-general.c (omp_max_vf): Likewise.
32419 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
32420 (expand_omp_simd): Handle polynomial safelen.
32421 * omp-low.c (omplow_simd_context): Add a default constructor.
32422 (omplow_simd_context::max_vf): Change from int to poly_uint64.
32423 (lower_rec_simd_input_clauses): Update accordingly.
32424 (lower_rec_input_clauses): Likewise.
32425
32426 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32427 Alan Hayward <alan.hayward@arm.com>
32428 David Sherwood <david.sherwood@arm.com>
32429
32430 * tree-vectorizer.h (vect_nunits_for_cost): New function.
32431 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
32432 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
32433 (vect_analyze_slp_cost): Likewise.
32434 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
32435 (vect_model_load_cost): Likewise.
32436
32437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32438 Alan Hayward <alan.hayward@arm.com>
32439 David Sherwood <david.sherwood@arm.com>
32440
32441 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
32442 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
32443 from an unsigned int * to a poly_uint64_pod *.
32444 (calculate_unrolling_factor): New function.
32445 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
32446
32447 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32448 Alan Hayward <alan.hayward@arm.com>
32449 David Sherwood <david.sherwood@arm.com>
32450
32451 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
32452 from an unsigned int to a poly_uint64.
32453 (_loop_vec_info::slp_unrolling_factor): Likewise.
32454 (_loop_vec_info::vectorization_factor): Change from an int
32455 to a poly_uint64.
32456 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
32457 (vect_get_num_vectors): New function.
32458 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
32459 (vect_get_num_copies): Use vect_get_num_vectors.
32460 (vect_analyze_data_ref_dependences): Change max_vf from an int *
32461 to an unsigned int *.
32462 (vect_analyze_data_refs): Change min_vf from an int * to a
32463 poly_uint64 *.
32464 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32465 than an unsigned HOST_WIDE_INT.
32466 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
32467 (vect_analyze_data_ref_dependence): Change max_vf from an int *
32468 to an unsigned int *.
32469 (vect_analyze_data_ref_dependences): Likewise.
32470 (vect_compute_data_ref_alignment): Handle polynomial vf.
32471 (vect_enhance_data_refs_alignment): Likewise.
32472 (vect_prune_runtime_alias_test_list): Likewise.
32473 (vect_shift_permute_load_chain): Likewise.
32474 (vect_supportable_dr_alignment): Likewise.
32475 (dependence_distance_ge_vf): Take the vectorization factor as a
32476 poly_uint64 rather than an unsigned HOST_WIDE_INT.
32477 (vect_analyze_data_refs): Change min_vf from an int * to a
32478 poly_uint64 *.
32479 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
32480 vfm1 as a poly_uint64 rather than an int. Make the same change
32481 for the returned bound_scalar.
32482 (vect_gen_vector_loop_niters): Handle polynomial vf.
32483 (vect_do_peeling): Likewise. Update call to
32484 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
32485 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
32486 be constant.
32487 * tree-vect-loop.c (vect_determine_vectorization_factor)
32488 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
32489 (vect_get_known_peeling_cost): Likewise.
32490 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
32491 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
32492 (vect_transform_loop): Likewise. Use the lowest possible VF when
32493 updating the upper bounds of the loop.
32494 (vect_min_worthwhile_factor): Make static. Return an unsigned int
32495 rather than an int.
32496 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
32497 polynomial unroll factors.
32498 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
32499 (vect_make_slp_decision): Likewise.
32500 (vect_supported_load_permutation_p): Likewise, and polynomial
32501 vf too.
32502 (vect_analyze_slp_cost): Handle polynomial vf.
32503 (vect_slp_analyze_node_operations): Likewise.
32504 (vect_slp_analyze_bb_1): Likewise.
32505 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32506 than an unsigned HOST_WIDE_INT.
32507 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
32508 (vectorizable_load): Handle polynomial vf.
32509 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
32510 a poly_uint64.
32511 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
32512
32513 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32514 Alan Hayward <alan.hayward@arm.com>
32515 David Sherwood <david.sherwood@arm.com>
32516
32517 * match.pd: Handle bit operations involving three constants
32518 and try to fold one pair.
32519
32520 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32521
32522 * tree-vect-loop-manip.c: Include gimple-fold.h.
32523 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
32524 niters_maybe_zero parameters. Handle other cases besides a step of 1.
32525 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
32526 Add a path that uses a step of VF instead of 1, but disable it
32527 for now.
32528 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
32529 and niters_no_overflow parameters. Update calls to
32530 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
32531 Create a new SSA name if the latter choses to use a ste other
32532 than zero, and return it via niters_vector_mult_vf_var.
32533 * tree-vect-loop.c (vect_transform_loop): Update calls to
32534 vect_do_peeling, vect_gen_vector_loop_niters and
32535 slpeel_make_loop_iterate_ntimes.
32536 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
32537 (vect_gen_vector_loop_niters): Update declarations after above changes.
32538
32539 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
32540
32541 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
32542 128-bit round to integer instructions.
32543 (ceil<mode>2): Likewise.
32544 (btrunc<mode>2): Likewise.
32545 (round<mode>2): Likewise.
32546
32547 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32548
32549 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
32550 unaligned VSX load/store on P8/P9.
32551 (expand_block_clear): Allow the use of unaligned VSX
32552 load/store on P8/P9.
32553
32554 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32555
32556 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
32557 New function.
32558 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
32559 swap associated with both a load and a store.
32560
32561 2018-01-02 Andrew Waterman <andrew@sifive.com>
32562
32563 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
32564 * config/riscv/riscv.md (clear_cache): Use it.
32565
32566 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
32567
32568 * web.c: Remove out-of-date comment.
32569
32570 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32571
32572 * expr.c (fixup_args_size_notes): Check that any existing
32573 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
32574 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
32575 (emit_single_push_insn): ...here.
32576
32577 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32578
32579 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
32580 (const_vector_encoded_nelts): New function.
32581 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
32582 (const_vector_int_elt, const_vector_elt): Declare.
32583 * emit-rtl.c (const_vector_int_elt_1): New function.
32584 (const_vector_elt): Likewise.
32585 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
32586 of CONST_VECTOR_ELT.
32587
32588 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32589
32590 * expr.c: Include rtx-vector-builder.h.
32591 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
32592 directly on the tree encoding.
32593 (const_vector_from_tree): Likewise.
32594 * optabs.c: Include rtx-vector-builder.h.
32595 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
32596 sequence of "u" values.
32597 * vec-perm-indices.c: Include rtx-vector-builder.h.
32598 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
32599 directly on the vec_perm_indices encoding.
32600
32601 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32602
32603 * doc/rtl.texi (const_vector): Describe new encoding scheme.
32604 * Makefile.in (OBJS): Add rtx-vector-builder.o.
32605 * rtx-vector-builder.h: New file.
32606 * rtx-vector-builder.c: Likewise.
32607 * rtl.h (rtx_def::u2): Add a const_vector field.
32608 (CONST_VECTOR_NPATTERNS): New macro.
32609 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
32610 (CONST_VECTOR_DUPLICATE_P): Likewise.
32611 (CONST_VECTOR_STEPPED_P): Likewise.
32612 (CONST_VECTOR_ENCODED_ELT): Likewise.
32613 (const_vec_duplicate_p): Check for a duplicated vector encoding.
32614 (unwrap_const_vec_duplicate): Likewise.
32615 (const_vec_series_p): Check for a non-duplicated vector encoding.
32616 Say that the function only returns true for integer vectors.
32617 * emit-rtl.c: Include rtx-vector-builder.h.
32618 (gen_const_vec_duplicate_1): Delete.
32619 (gen_const_vector): Call gen_const_vec_duplicate instead of
32620 gen_const_vec_duplicate_1.
32621 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
32622 (gen_const_vec_duplicate): Use rtx_vector_builder.
32623 (gen_const_vec_series): Likewise.
32624 (gen_rtx_CONST_VECTOR): Likewise.
32625 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
32626 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32627 Build a new vector rather than modifying a CONST_VECTOR in-place.
32628 (handle_special_swappables): Update call accordingly.
32629 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
32630 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32631 Build a new vector rather than modifying a CONST_VECTOR in-place.
32632 (handle_special_swappables): Update call accordingly.
32633
32634 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32635
32636 * simplify-rtx.c (simplify_const_binary_operation): Use
32637 CONST_VECTOR_ELT instead of XVECEXP.
32638
32639 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32640
32641 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
32642 the selector elements to be different from the data elements
32643 if the selector is a VECTOR_CST.
32644 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
32645 ssizetype for the selector.
32646
32647 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32648
32649 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
32650 before testing each element individually.
32651 * tree-vect-generic.c (lower_vec_perm): Likewise.
32652
32653 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32654
32655 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
32656 * selftest-run-tests.c (selftest::run_tests): Call it.
32657 * vector-builder.h (vector_builder::operator ==): New function.
32658 (vector_builder::operator !=): Likewise.
32659 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
32660 (vec_perm_indices::all_from_input_p): New function.
32661 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32662 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
32663 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
32664 instead of reading the VECTOR_CST directly. Detect whether both
32665 vector inputs are the same before constructing the vec_perm_indices,
32666 and update the number of inputs argument accordingly. Use the
32667 utility functions added above. Only construct sel2 if we need to.
32668
32669 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32670
32671 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
32672 the broadcast of the low byte.
32673 (expand_mult_highpart): Use an explicit encoding for the permutes.
32674 * optabs-query.c (can_mult_highpart_p): Likewise.
32675 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
32676 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32677 (vectorizable_bswap): Likewise.
32678 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
32679 explicit encoding for the power-of-2 permutes.
32680 (vect_permute_store_chain): Likewise.
32681 (vect_grouped_load_supported): Likewise.
32682 (vect_permute_load_chain): Likewise.
32683
32684 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32685
32686 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
32687 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
32688 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
32689 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32690 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
32691 (vect_gen_perm_mask_any): Likewise.
32692
32693 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32694
32695 * int-vector-builder.h: New file.
32696 * vec-perm-indices.h: Include int-vector-builder.h.
32697 (vec_perm_indices): Redefine as an int_vector_builder.
32698 (auto_vec_perm_indices): Delete.
32699 (vec_perm_builder): Redefine as a stand-alone class.
32700 (vec_perm_indices::vec_perm_indices): New function.
32701 (vec_perm_indices::clamp): Likewise.
32702 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32703 (vec_perm_indices::new_vector): New function.
32704 (vec_perm_indices::new_expanded_vector): Update for new
32705 vec_perm_indices class.
32706 (vec_perm_indices::rotate_inputs): New function.
32707 (vec_perm_indices::all_in_range_p): Operate directly on the
32708 encoded form, without computing elided elements.
32709 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32710 encoding. Update for new vec_perm_indices class.
32711 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32712 the given vec_perm_builder.
32713 (expand_vec_perm_var): Update vec_perm_builder constructor.
32714 (expand_mult_highpart): Use vec_perm_builder instead of
32715 auto_vec_perm_indices.
32716 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32717 vec_perm_indices instead of auto_vec_perm_indices. Use a single
32718 or double series encoding as appropriate.
32719 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32720 vec_perm_indices instead of auto_vec_perm_indices.
32721 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32722 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32723 (vect_permute_store_chain): Likewise.
32724 (vect_grouped_load_supported): Likewise.
32725 (vect_permute_load_chain): Likewise.
32726 (vect_shift_permute_load_chain): Likewise.
32727 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32728 (vect_transform_slp_perm_load): Likewise.
32729 (vect_schedule_slp_instance): Likewise.
32730 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32731 (vectorizable_mask_load_store): Likewise.
32732 (vectorizable_bswap): Likewise.
32733 (vectorizable_store): Likewise.
32734 (vectorizable_load): Likewise.
32735 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32736 vec_perm_indices instead of auto_vec_perm_indices. Use
32737 tree_to_vec_perm_builder to read the vector from a tree.
32738 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32739 vec_perm_builder instead of a vec_perm_indices.
32740 (have_whole_vector_shift): Use vec_perm_builder and
32741 vec_perm_indices instead of auto_vec_perm_indices. Leave the
32742 truncation to calc_vec_perm_mask_for_shift.
32743 (vect_create_epilog_for_reduction): Likewise.
32744 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32745 from auto_vec_perm_indices to vec_perm_indices.
32746 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32747 instead of changing individual elements.
32748 (aarch64_vectorize_vec_perm_const): Use new_vector to install
32749 the vector in d.perm.
32750 * config/arm/arm.c (expand_vec_perm_d::perm): Change
32751 from auto_vec_perm_indices to vec_perm_indices.
32752 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32753 instead of changing individual elements.
32754 (arm_vectorize_vec_perm_const): Use new_vector to install
32755 the vector in d.perm.
32756 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32757 Update vec_perm_builder constructor.
32758 (rs6000_expand_interleave): Likewise.
32759 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32760 (rs6000_expand_interleave): Likewise.
32761
32762 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32763
32764 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
32765 to qimode could truncate the indices.
32766 * optabs.c (expand_vec_perm_var): Likewise.
32767
32768 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32769
32770 * Makefile.in (OBJS): Add vec-perm-indices.o.
32771 * vec-perm-indices.h: New file.
32772 * vec-perm-indices.c: Likewise.
32773 * target.h (vec_perm_indices): Replace with a forward class
32774 declaration.
32775 (auto_vec_perm_indices): Move to vec-perm-indices.h.
32776 * optabs.h: Include vec-perm-indices.h.
32777 (expand_vec_perm): Delete.
32778 (selector_fits_mode_p, expand_vec_perm_var): Declare.
32779 (expand_vec_perm_const): Declare.
32780 * target.def (vec_perm_const_ok): Replace with...
32781 (vec_perm_const): ...this new hook.
32782 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
32783 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
32784 * doc/tm.texi: Regenerate.
32785 * optabs.def (vec_perm_const): Delete.
32786 * doc/md.texi (vec_perm_const): Likewise.
32787 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
32788 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
32789 expand_vec_perm for constant permutation vectors. Assert that
32790 the mode of variable permutation vectors is the integer equivalent
32791 of the mode that is being permuted.
32792 * optabs-query.h (selector_fits_mode_p): Declare.
32793 * optabs-query.c: Include vec-perm-indices.h.
32794 (selector_fits_mode_p): New function.
32795 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
32796 is defined, instead of checking whether the vec_perm_const_optab
32797 exists. Use targetm.vectorize.vec_perm_const instead of
32798 targetm.vectorize.vec_perm_const_ok. Check whether the indices
32799 fit in the vector mode before using a variable permute.
32800 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
32801 vec_perm_indices instead of an rtx.
32802 (expand_vec_perm): Replace with...
32803 (expand_vec_perm_const): ...this new function. Take the selector
32804 as a vec_perm_indices rather than an rtx. Also take the mode of
32805 the selector. Update call to shift_amt_for_vec_perm_mask.
32806 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
32807 Use vec_perm_indices::new_expanded_vector to expand the original
32808 selector into bytes. Check whether the indices fit in the vector
32809 mode before using a variable permute.
32810 (expand_vec_perm_var): Make global.
32811 (expand_mult_highpart): Use expand_vec_perm_const.
32812 * fold-const.c: Includes vec-perm-indices.h.
32813 * tree-ssa-forwprop.c: Likewise.
32814 * tree-vect-data-refs.c: Likewise.
32815 * tree-vect-generic.c: Likewise.
32816 * tree-vect-loop.c: Likewise.
32817 * tree-vect-slp.c: Likewise.
32818 * tree-vect-stmts.c: Likewise.
32819 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
32820 Delete.
32821 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
32822 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
32823 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
32824 (aarch64_vectorize_vec_perm_const): ...this new function.
32825 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32826 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32827 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32828 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32829 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32830 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32831 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32832 into...
32833 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
32834 check for NEON modes.
32835 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32836 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32837 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32838 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32839 into...
32840 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
32841 the old VEC_PERM_CONST conditions.
32842 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32843 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32844 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32845 (ia64_vectorize_vec_perm_const_ok): Merge into...
32846 (ia64_vectorize_vec_perm_const): ...this new function.
32847 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32848 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32849 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32850 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32851 * config/mips/mips.c (mips_expand_vec_perm_const)
32852 (mips_vectorize_vec_perm_const_ok): Merge into...
32853 (mips_vectorize_vec_perm_const): ...this new function.
32854 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32855 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32856 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32857 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32858 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32859 (rs6000_expand_vec_perm_const): Delete.
32860 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32861 Delete.
32862 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32863 (altivec_expand_vec_perm_const_le): Take each operand individually.
32864 Operate on constant selectors rather than rtxes.
32865 (altivec_expand_vec_perm_const): Likewise. Update call to
32866 altivec_expand_vec_perm_const_le.
32867 (rs6000_expand_vec_perm_const): Delete.
32868 (rs6000_vectorize_vec_perm_const_ok): Delete.
32869 (rs6000_vectorize_vec_perm_const): New function.
32870 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32871 an element count and rtx array.
32872 (rs6000_expand_extract_even): Update call accordingly.
32873 (rs6000_expand_interleave): Likewise.
32874 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32875 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32876 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32877 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32878 (rs6000_expand_vec_perm_const): Delete.
32879 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32880 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32881 (altivec_expand_vec_perm_const_le): Take each operand individually.
32882 Operate on constant selectors rather than rtxes.
32883 (altivec_expand_vec_perm_const): Likewise. Update call to
32884 altivec_expand_vec_perm_const_le.
32885 (rs6000_expand_vec_perm_const): Delete.
32886 (rs6000_vectorize_vec_perm_const_ok): Delete.
32887 (rs6000_vectorize_vec_perm_const): New function. Remove stray
32888 reference to the SPE evmerge intructions.
32889 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32890 an element count and rtx array.
32891 (rs6000_expand_extract_even): Update call accordingly.
32892 (rs6000_expand_interleave): Likewise.
32893 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32894 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32895 new function.
32896 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32897
32898 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32899
32900 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32901 vector mode and that that mode matches the mode of the data
32902 being permuted.
32903 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32904 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
32905 directly using expand_vec_perm_1 when forcing selectors into
32906 registers.
32907 (expand_vec_perm_var): New function, split out from expand_vec_perm.
32908
32909 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32910
32911 * optabs-query.h (can_vec_perm_p): Delete.
32912 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32913 * optabs-query.c (can_vec_perm_p): Split into...
32914 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32915 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32916 particular selector is valid.
32917 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32918 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32919 (vect_grouped_load_supported): Likewise.
32920 (vect_shift_permute_load_chain): Likewise.
32921 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32922 (vect_transform_slp_perm_load): Likewise.
32923 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32924 (vectorizable_bswap): Likewise.
32925 (vect_gen_perm_mask_checked): Likewise.
32926 * fold-const.c (fold_ternary_loc): Likewise. Don't take
32927 implementations of variable permutation vectors into account
32928 when deciding which selector to use.
32929 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32930 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32931 with a false third argument.
32932 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32933 to test whether the constant selector is valid and can_vec_perm_var_p
32934 to test whether a variable selector is valid.
32935
32936 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32937
32938 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32939 * optabs-query.c (can_vec_perm_p): Likewise.
32940 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32941 instead of vec_perm_indices.
32942 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32943 (vect_gen_perm_mask_checked): Likewise,
32944 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32945 (vect_gen_perm_mask_checked): Likewise,
32946
32947 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32948
32949 * optabs-query.h (qimode_for_vec_perm): Declare.
32950 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32951 (qimode_for_vec_perm): ...this new function.
32952 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32953
32954 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32955
32956 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32957 does not have a conditional at the top.
32958
32959 2018-01-02 Richard Biener <rguenther@suse.de>
32960
32961 * ipa-inline.c (big_speedup_p): Fix expression.
32962
32963 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32964
32965 PR target/81616
32966 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32967 for generic 4->6.
32968
32969 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32970
32971 PR target/81616
32972 Generic tuning.
32973 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32974 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32975 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32976 cond_taken_branch_cost 3->4.
32977
32978 2018-01-01 Jakub Jelinek <jakub@redhat.com>
32979
32980 PR tree-optimization/83581
32981 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32982 TODO_cleanup_cfg if any changes have been made.
32983
32984 PR middle-end/83608
32985 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32986 convert_modes if target mode has the right side, but different mode
32987 class.
32988
32989 PR middle-end/83609
32990 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32991 last argument when extracting from CONCAT. If either from_real or
32992 from_imag is NULL, use expansion through memory. If result is not
32993 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32994 the parts directly to inner mode, if even that fails, use expansion
32995 through memory.
32996
32997 PR middle-end/83623
32998 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32999 check for bswap in mode rather than HImode and use that in expand_unop
33000 too.
33001 \f
33002 Copyright (C) 2018 Free Software Foundation, Inc.
33003
33004 Copying and distribution of this file, with or without modification,
33005 are permitted in any medium without royalty provided the copyright
33006 notice and this notice are preserved.